To render a report, you need to bind the report to the FlexViewer control. Once the report definition has been created, a data source defined, and loaded into the C1FlexReport component, you can render the report to the printer, to the preview control - FlexViewer, or export to different file formats.
To preview the report in the FlexViewer control, the steps are as follows:
- From the Toolbox, double-click the FlexViewer control to add it to your project.
- From the Properties window, set the C1FlexViewer.Dock property to Fill.
- Select the Windows Form with your mouse and drag to resize it. For this example, we resized the Form to 600x500 so it better reveals the preview panel.
- Double-click the form and enter the following code in the Form_Load event handler: