FlexReport for WPF | ComponentOne
In This Topic
    Create Reports
    In This Topic

    In the previous topic, you learned about loading reports that you already have in your application. At times, you may also want to customize the report, or use the data source objects that are defined in your Visual Studio application rather than use the connection strings and record sources. In such scenarios, FlexReport provides the Edit Report option, which helps to create or edit reports.

    The Edit Report option can be seen when you right-click the FlexReport component. Selecting the Edit Report option invokes the FlexReportDesigner application.

    You can also click the smart tag () of the component to open the C1FlexReport Tasks menu and select the Edit Report option.

    Note: If the Edit Report command doesn't appear on the context menu and Properties window, it is probably because the control could not find the FlexReportDesigner application. To fix this, simply run the FlexReportDesigner application once in stand-alone mode. The designer will save its location to the registry, and the FlexReport component should be able to find it afterwards.

    The FlexReportDesigner application shows the report that is currently loaded in the FlexReport component. If the FlexReport component is empty, then the Designer shows the FlexReport Wizard so that you can create a new report.

    When you open the FlexReportDesigner application using the Edit Report option, there are few differences in comparison to opening the designer application in the stand-alone mode, which are given below:

    To use data source objects defined in your application, click the Data Sources button in the Designer, then select the Tables option in the Select a Data Source dialog box.

    The Tables page shows a list of data objects currently defined on the form (the page will not be visible if there aren't any valid data sources on the form). Alternatively, you can use the Connection string to build and select a connection string and record source as usual.

    For example, if the main form contains a DataSet object with several DataTables attached to it, the data source picker dialog box might look like this:

    Once you are done creating or editing the report, you can close the Designer by selecting File | Save and File | Exit from the menu. This will save the report definition directly into the FlexReport component (as if you had loaded it from a file using the Load Report command).

    If you change your mind and decide to cancel the changes, quit the Designer selecting File | Exit from the menu and choose No to discard the changes.