FlexReport for WinForms | ComponentOne
FlexViewer / Export Reports
In This Topic
    Export Reports
    In This Topic

    FlexViewer lets you export the reports to different file formats. The viewer control transforms the information in the report into a device-specific/application-specific format.

    The Tools group in the FlexViewer ribbon provides the Export Tool, which when clicked invokes the Export to Report file dialog, so that you can save the report to the required file format.

    By default FlexViewer exports reports to the following formats:

    Export using FlexViewer via Code

    With FlexViewer control, you can preview the reports as well as export them. The reports can be exported to several file formats: .pdf, .html, .rtf, .docx, .xls, .xlsx, .zip, .tiff, .bmp, .png, .jpg, and .gif. The following code describes how to export a FlexReport using Export method of C1FlexViewer Class:

    'Load report definition
    C1FlexReport1.Load(@"reportFile", "reportName")
    
    'Specify the report shown by the viewer
    C1FlexViewer1.DocumentSource = C1FlexReport1
    
    'Export
    C1FlexViewer1.Export()
    
    //Load report definition
    c1FlexReport1.Load(@"reportFile", "reportName");
    
    //Specify the report shown by the viewer
    c1FlexViewer1.DocumentSource = c1FlexReport1;
    
    //Export
    c1FlexViewer1.Export();