ComponentOne FlexReport for WinForms
Upgrading C1Report to FlexReport
FlexReport for WinForms Overview > Upgrading C1Report to FlexReport

The reports created using C1Report are fully compatible with C1FlexReport. The following are the two simple ways to upgrade or convert your existing C1Report report definition (.xml) to C1FlexReport report definition (.flxr):

Upgrading C1Report report definition in the designer

  1. Run C1FlexReportDesigner.4.exe.
  2. Go to File|Open and select the C1Report report definition (.xml) that you want to upgrade. You will see the following dialog box:
    Upgrading C1Report to FlexReport
  3. Click OK.
  4. Go to File|Save.
  5. In the Save Report Definition File dialog box, specify the File name and click Save.

The report definition is saved as type .flxr. Your report definition is now converted from C1Report's .xml to C1FlexReport's .flxr. 

Upgrading the existing C1Report Windows Application Project to FlexReport Windows Application Project in Visual Studio

  1. Open existing Windows Application project that contains C1Report (.xml) file.
  2. Delete C1Report from the Form.
  3. Delete C1Report's previewing control C1PrintPreview or C1RibbonPreviewControl from the Form.
  4. Add C1FlexReport component to the Toolbox:
    1. Right-click a tab and select Choose items... A Choose Toolbox Items dialog box appears.
    2. Click Browse and select C1.Win.FlexReport.4.dll from the bin\v4.0 folder. The C1FlexReport component will be added in the Toolbox.
  5. Add FlexViewer control to the Toolbox:
    1. Right-click a tab and select Choose items... A Choose Toolbox Items dialog box appears.
    2. Click Browse and select C1.Win.FlexViewer.4.dll from the bin\v4.0 folder. The FlexViewer control will be added in the Toolbox.
  6. Drop C1FlexReport on the Form. The following dlls with the same version as the version of C1FlexReport should get added to the references:
    • C1.C1Pdf.4
    • C1.Win.4
    • C1.Win.BarCode.4
    • C1.Win.C1Document.4
    • C1.Win.FlexReport.4
    If these references do not have the same version, you need to add them manually.
  7. Drop FlexViewer control on the Form. The following dlls with the same version as the version of C1FlexViewer should get added to the references:
    • C1.C1Zip.4
    • C1.Win.C1DX.4
    • C1.Win.C1Ribbon.4
    • C1.Win.FlexViewer.4
    • C1.Win.ImportServices.4
    If these references do not have the same version, you need to add them manually.
  8. Add the following dlls to the references:
    • C1.C1Word.4
    • C1.C1Excel.4
    • C1.Win.C1Chart.4
    • C1.Win.C1Chart3D.4

    To use map and super-label custom fields, add following dlls to the references:
    • C1.Win.FlexReport.CustomFields.4
    • C1.WPF.Maps.4
    • C1.WPF.4
  9. Rename C1Report component to C1FlexReport component. In code, you can change the name of the component as follows:
    Dim report As New C1Report()
    'To
    Dim report As New C1FlexReport()
    
    C1Report report = new C1Report();
    
    //To   
    
    C1FlexReport report = new C1FlexReport();                  
    
                   
     
    
  10. Change the name of namespace from C1.C1Report to C1.Win.FlexReport in code-behind.
  11. Delete all references to the dlls of C1Report and its dependencies - C1.C1Report, C1.Win.C1Report, C1.Win.C1Barcode, and C1.Win.C1RibbonPreview.
  12. Delete namespace C1.Win.C1Preview.
  13. Delete license entires of C1Report and the referenced viewer (C1Preview or C1RibbonPreview) from licenses.licx.
  14. In order to bind C1FlexReport with C1FlexViewer, following code will have to be changed as follows:
           
    Dim c1r As C1.C1Report.C1Report = New C1Report()
    c1r.Load(filepath, reportname)
    C1PrintPreviewControl1.Document = clr
    'To
    Dim report As New C1FlexReport()
    report.Load(filepath, reportname)
    C1FlexViewer1.DocumentSource = report
    
    C1.C1Report.C1Report c1r = new C1Report();
    c1r.Load(filepath, reportname);
    c1PrintPreviewControl1.Document=clr;
    
    //To
    C1FlexReport report = new C1FlexReport();
    report.Load(filepath, reportname);
    c1FlexViewer1.DocumentSource = report; 
    
Note that FlexReport can be previewed at runtime by using FlexViewer control only. The FlexViewer control is not compatible with C1PrintPreviewControl or C1RibbonPreviewControl.