FlexViewer for WPF > Quick Start: FlexViewer for WPF |
The quick start guide familiarizes you with rendering a report in the FlexViewer control. In this section, you learn to load and render FlexReport to the FlexViewer control.
To create a simple WPF application using the FlexViewer control, follow these steps:
To load a report definition from a file, follow these steps:
Dim rep As New C1FlexReport() 'load report definition rep.Load("..\..\TelephoneBillReport.flxr", "TelephoneBill")
//load report definition C1FlexReport rep = new C1FlexReport(); rep.Load(@"..\..\TelephoneBillReport.flxr", "TelephoneBill");
To render a report, you need to load the report first. Once the report definition has been created, a data source is defined, and the report definition is loaded, you can render the report to the FlexViewer control.
Add the following code to the Button_Click event in the code view to render the FlexReport in FlexViewer control:
'preview the report
Viewer.DocumentSource = rep
//preview the report
Viewer.DocumentSource = rep;
This is how the report appears on rendering to FlexViewer.