ActiveReports Developer 7
Silverlight Viewer Sample
See Also Support Forum
ActiveReports Developer 7 > ActiveReports Developer Guide > Samples and Walkthroughs > Samples > Professional > Silverlight Viewer Sample

Glossary Item Box

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 Developer Professional Edition.


ShowSample Location

ShowVisual Basic.NET

<User Folder>\ComponentOne Samples\ActiveReports Developer 7\Professional\VB.NET\SilverLightViewer

ShowC#

<User Folder>\ComponentOne Samples\ActiveReports Developer 7\Professional\C#\SilverLightViewer

ShowRuntime 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.

  • RDF
  • RDLX
  • RPX
  • Code

ShowProject Details

ShowImages

The Images folder contains images that are used in the header of the ActiveReports7 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.

ShowMainPage.xaml

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 ActiveReports7 Silverlight Viewer.

ShowSilverlightViewer.Web Project

ShowReports

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.

ShowRDF

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.

ShowRDLX

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.

ShowRPX

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.

ShowActiveReports.ReportService.asmx

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.

ShowCodeReport

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

ShowInvoice Report

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

ShowPageHeader

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

ShowcustomerGroupHeader

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.

ShowDetail

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.

ShowcustomerGroupFooter

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.

ShowPageFooter

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.

ShowDefault.html

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

ShowReport.aspx

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.

ShowWeb.config

The configuration file that contains the httpHandlers that allow ActiveReports Developer to process reports on the Web.

Note that you need to manually update version information here when you update your version of ActiveReports Developer.

See Also

©2014. ComponentOne, a division of GrapeCity. All rights reserved.