Reports for WinForms | ComponentOne
In This Topic
    Previewing SSRS Reports
    In This Topic

    C1SsrsDocumentSource enables you to specify the location or name of the SSRS report to be viewed. It will then allow the C1PrintPreviewControl to display an SSRS report.

    It is not a visual component so it can be added onto a form but it appears in the component tray.

    Note: You must have access to the SSRS report server and have at least one report on that server before you start this topic.

    To preview or export an SSRS report, using the C1PrintPreviewControl, create a new WinForms application, using .NET framework 4.0 or above and complete the following steps:

    In the Designer

    1. From the toolbox, add the C1SSRSDocumentSource component onto the form. It appears in the component tray.
      If you cannot find the component in the toolbox, right click and select choose items. The Choose Toolbox Items dialog appears. Locate the component in the C1.Win.C1Document.dll and add it to the toolbox.
    2. Add the C1PrintPreviewControl onto the form, and set its height and width as desired.
    3. Right click the C1PrintPreviewControl and select Properties to open the properties window.
    4. Set the SsrsPaginated property to true to view the report in paginated mode. Or set it to false to view the report in non-paginated mode.
    5. Click the C1SSRSDocumentSource component, then click the smart tag to open the C1SSRSDocumentSource Tasks Menu.
    6. Check the checkbox next to the C1PrintPreviewControl. This assigns the C1SSRSDocumentSource component to the C1PrintPreviewControl's Document property.
    7. Right click the C1SSRSDocumentSource and select Properties to open the Properties window.
    8. Click the drop-down arrow next to the DocumentLocation property.
    9. Specify the address of the SSRS server and the full path to the report in the following dialog and click OK.
          
    10. Expand the ConnectionOptions property group.
    11. Click the drop-down arrow next to the Credential property.
    12. Specify the User Name, Password and Domain in the following dialog and click OK.
          

    Note: Ensure that the following DLLs are added to the project references.

    • C1.Win.C1Document.dll
    • C1.Win.dll
    • C1.Win.C1ImportServices.dll
    • C1.Win.C1Report.dll
    • C1.C1Report.dll
    • C1.C1Zip.dll

    What You've Accomplished

    You may be asked to set some parameters, based on which you see the specified SSRS report in the preview control.

    You can now export it to a number of supported external formats.