The Page Reports On Web sample demonstrates how to use the ActiveReports WebViewer control on the ASPX page to display reports. The sample offers two drop-down lists of CPL reports and WebViewer types.
Sample Location
Visual Basic.NET
<User Folder>\ComponentOne Samples\ActiveReports 8\Page Reports\CPL\Web\VB.NET\PageReportsOnWeb
C#
<User Folder>\ComponentOne Samples\ActiveReports 8\Page Reports\CPL\Web\C#\PageReportsOnWeb
Runtime Features
When you run this sample, a webpage with two drop-down lists, one with CPL reports and the other with viewer types, appears. Select a report and the viewer type from the drop-down lists and click the Show button to see the report appear in the selected viewer type.
Project Details
Images folder
This folder contains two image files - bg.jpg and grapecity_logo.jpg, that are displayed on the Default.aspx page at runtime.
ActiveReports.ReportService.asmx
The report web service required for the proper functioning of the Web Viewer. The ActiveReports.ReportService.asmx is added automatically to the project when you place the WebViewer control on the form. You can also add this service by using Add New Item in the Visual Studio 2010 Project menu.
For the information on how to use the WebViewer control, see Getting Started with the Web Viewer.
Default.aspx
This is the main page that appears at runtime. This ASPX page contains drop-down lists to collect user input, a button to send the collected values to the WebViewer control.
Right-click the ASPX page and select View Code to see the code used to find the reports in the Reels folder installed along with the sample. To learn more about the CPL reports that you can select on this page, see CPL Report Loader. It also contains code that displays the selected report and sets the WebViewer type selected by the user.
The Source tab of the ASPX page contains the marquee tag to display a floating message below the WebViewer.
ErrorSelection.rdlx
This is the report that appears at runtime when you have clicked the Show button without selecting any specific report from the drop-down list. It contains a TextBox control that displays the error message.
Main.rdlx
This is the default report that appears in the WebViewer when you run this sample. It contains a
FormattedText control with the
HTML property set to the welcome message text. This text is displayed when you run this sample.
Web.config
The configuration file that contains the httpHandlers that allow ActiveReports to process reports on the Web.
Note that you need to manually update version information here when you update your version of ActiveReports.
See Also
Getting Started
Page Report Samples