ComponentOne WebReports for ASP.NET: WebReports for ASP.NET Task-Based Help > Copying Report Definitions into WebReports for ASP.NET

Copying Report Definitions into WebReports for ASP.NET

Report definitions can be copied into C1WebReport without deploying report definition files. This can be done by following these steps:

1.   Add a C1WebReport control to your Web page.

2.   Select View | Component Designer, and add the C1Report component to the Component Designer.

3.   Right-click the C1Report, select Load Report, then load the report from a report definition file. This will copy the entire report definition into the component. After this is done, you will not need the report definition file anymore.

4.   In the Page_Load event, copy the report definition from the C1Report component into the C1WebReport control:

      Visual Basic

Private Sub Page_Load(ByVal sender As Object, ByVale As System.EventArgs) Handles Me.Load

    C1WebReport1.Report.ReportDefinition = C1Report1.ReportDefinition

End Sub

      C#

private void Page_Load (object sender, System.EventArgs e)

{

    c1WebReport1.Report.ReportDefinition = c1Report1.ReportDefinition;

}

If the reports are being created dynamically, the report can still be copied into C1WebReport using the code above, or you can simply pass the Report to the report builder routine.


Send comments about this topic to ComponentOne.
Copyright © 1987-2010 ComponentOne LLC. All rights reserved.