ActiveReports WebViewer ASP.NET sample describes the standard ActiveReports web control feature and generating a parameterized report.

type=note
Note: To run this sample, you must have
Sample Location
Visual Basic.NET
https://github.com/activereports/WebSamples19/tree/main/WebViewer_ASP.NET_VB.NET
C#
https://github.com/activereports/WebSamples19/tree/main/WebViewer_ASP.NET_C#
Details
When you run the sample, the Default.aspx page appears in your browser. This page provides links to other sample pages that demonstrate the following web features.
WebControl for ASP.NET: This link opens the WebControl.aspx page that allows you to select any of the three Viewer Types and it also allows you to select from Section, Page and RDLX report Type.
The three Viewer Types that are available are as follows:
- HtmlViewer
- AcrobatReader
- RawHtml

Parameterized Report Example: This link opens the page that demonstrates how to generate a report by passing a parameter to the report.

The project contains the following elements:
- PageReports: The PageReports folder contains the Invoice_Grouped and PurchaseReport report.
- RDLXReports: The RdlxReports folder contains the SalesReceipt report.
- RPXReports: The RpxReports folder contains the following reports - Invoice, InvoiceFiltered, NwindLabels, NwindLabelsFiltered, and Params.
The Invoice.rpx report is used to demonstrate the WebViewer control options and is opened by clicking WebControl for ASP.NET on the Default.aspx page. For detailed information on the Invoice report, see the Cross Section Control Sample.
The Params report is used by the ParameterReport.aspx page to demonstrate how to generate a report by passing a parameter to the report.
- Default.aspx: This is the main Web form of the sample that shows the introductory text and links to the following sample pages.
- WebControl for ASP.NET (WebControl.aspx)
- Parameterized Report Example(ParameterReport.aspx)
- ParameterReport.aspx: The web form that demonstrates how to generate a report by passing a parameter to the report. This sample uses the Params report from the RpxReports folder of this project. The date list is created by changing the SQL query of the report at run time. In this sample, when the date is selected from the Calendar control, the SQL query is updated and the report is generated. The report is generated dynamically in the SelectedIndexChanged event of the Calendar control. On this form, you can select the Viewer to display the report - HTMLViewer, AcrobatReader, or RawHTML.
type=note
Note: This sample requires write permissions to the ReportOutput folder that is located in the web samples directory.
- Web.config: The configuration file that allows ActiveReports to process reports on the Web.
- WebControl.aspx: This page is opened by clicking WebControl for ASP.NET on the Default.aspx page. By default, it displays the WebViewer control with the Invoice report. In this page, you can select from HTMLViewer, AcrobatReader, RawHtml viewer types and can also select from Page, Section and RDLX report types to be displayed.