|
|
       
- Select File | New | Project from the Visual Studio
2005 File menu. Select the Windows Application
project, give it a name and location. Click the OK button to close
the dialog.
- Right-click the project References and select Add
Reference from the context menu. Select the reference for the
class library containing your report from the list on the
Projects tab. Note: If the class library resides
in another solution you will need to use the Browse tab and navigate to the
assembly containing the report.
- From the ToolBox drag a Telerik ReportViewer control to the Windows form.
- Rebuild the Windows Forms project.
- Set the Report property from the drop down
list. This will be the report that was defined in the class
library.
Note | Once the report
is selected, notice that a component representing the report appears in
the tray below Windows form designer. The component allows you to
access the properties of the report in your report viewing application,
providing access to report parameters, styles and page
settings. |
- Add a call to the report viewers RefreshReport() method, just after the
call to InitializeComponent() in the form constructor.
CopyC# public Form1()
{
InitializeComponent();
reportViewer1.RefreshReport();
}
CopyVB.NET Public Sub New()
InitializeComponent()
reportViewer1.RefreshReport()
End Sub
- Right-click the Windows report viewing application and
select Set as Startup Project from the context
menu.
- Press F5 to run the report.
|