ActiveReports 12
Silverlight Viewer
ActiveReports 12 > ActiveReports User Guide > Samples and Walkthroughs > Samples > Professional > Silverlight Viewer

The Silverlight Viewer sample demonstrates the Silverlight Viewer with its various options of loading RPX, RDLX, and RDF reports. This Sample is part of the ActiveReports Professional Edition.

Note: Silverlight viewer is deprecated and will be obsolete in ActiveReports 13.

Sample Location

Visual Basic.NET

<User Folder>\GrapeCity Samples\ActiveReports 12\Professional\SilverLightViewer\VB.NET


<User Folder>\GrapeCity Samples\ActiveReports 12\Professional\SilverLightViewer\C#

Run-Time Features

When you run the project, the MainPage.xaml page with the Silverlight Viewer displaying the MainReport.rpx appears in your browser, and you will see a number of report options that the Silverlight Viewer will display.

Project Details


The Images folder contains images that are used in the header of the ActiveReports 12 Silverlight Viewer, including the images for the buttons to load and display an RDF, an RDLX, an RPX and a Code report in the Silverlight Viewer.


The user control that contains the Silverlight Viewer. The code behind this file, MainPage.xaml.vb (or .cs), handles the customization of the Silverlight Viewer application.

It contains code that handles the display of RDF, RDLX, RPX, and Code reports in the ActiveReports 12 Silverlight Viewer.

SilverlightViewer.Web Project


The Reports folder that contains the RDF, RDLX and RPX files of reports used in the sample. You can alter the project and add your own reports to this folder.


The EmployeeSales.rdf report that is displayed in the Silverlight Viewer by clicking the RDF button in the header of the Viewer.

The report displays the Sales by Employee chart and the list of employee names in the alphabetical order along with their total sales.


The SalesReport.rpx is displayed in the Silverlight Viewer by clicking the RDLX button in the header of the Viewer.  This report presents the Sales over time line chart along with the list of chart data.

The report contains two parameters, StartDate and EndDate. The report also has one TextBox with the Label property set to the expression, thus you can see the Document map of the report in the sidebar pane.


The Invoice1.rpx and MainReport.rpx reports. The Invoice1.rpx report is displayed in the Silverlight Viewer by clicking the RPX button in the header of the Viewer. The report displays the invoice form and the invoice details.

The MainReport.rpx report is the default report to be displayed in the Viewer when you run the sample project.


The report web service required for the proper functioning of the Silverlight Viewer. The ActiveReports.ReportService.asmx is added automatically to the project when you place the Viewer control on the form. You can also can add this service by using Add New Item in the Visual Studio 2010 Project menu.

For the information on how to use the Silverlight Viewer, see Using the Silverlight Viewer.


The Invoice report that is displayed in the Silverlight Viewer by clicking the Code button in the header of the Viewer.

Invoice Report

The Invoice report uses a PageHeader, a GroupHeader, a Detail section, a GroupFooter and a PageFooter section.


This section contains Label, Textbox, Shape and Line controls to create the report page header.


The DataField property of this section is set to OrderID. This setting, in conjunction with data ordered by the OrderID field, causes the report to print all of the information for one order ID value, including all of the related details and footers, before moving on to the next order ID. For more information on grouping, see Grouping Data in Section Reports.

This section also contains the Line, Shape, CrossSection controls, a number of Label controls, and two bound TextBox controls. The TextBoxes are bound using the DataField property in the Properties window.

In the lower part, the section contains labels for the data to follow in the Detail section.


This section contains bound TextBox controls. These TextBoxes render once for each row of data found in the current OrderID before the report moves on to the GroupFooter section.


The NewPage property of this section is set to After. This causes the report to break to a new page and generate a new invoice after this section prints its subtotals.

This section contains several labels and several TextBoxes. The subtotalTextBox control uses the following properties to summarize the detail data: SummaryRunning, SummaryGroup, and SummaryType. For more information, Create a Summary Report.

The Total TextBox does not use the DataField property or any of the summary properties, or even any code. To find the functionality of this TextBox, in design view, click the Script tab at the bottom of the report.


This section has one simple ReportInfo control. For more information about report sections and the order in which they print, see Section Report Structure and Section Report Events.


This is the html page that hosts the Silverlight Viewer in the browser.


This report contains the code to run the CodeReport, generate it in the rdf format and pass it to the Silverlight Viewer for display. This report is processed by the code of MainPage.xaml when you click the Code button in the Silverlight Viewer header.


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