ActiveReports Developer 7
Page Unbound Data Sample
See Also Support Forum
ActiveReports Developer 7 > ActiveReports Developer Guide > Samples and Walkthroughs > Samples > Page Report > FPL Samples > Data > Page Unbound Data Sample

Glossary Item Box

The PageUnboundData sample demonstrates how to connect a page report to an unbound data source at runtime, using the DataSet provider with the LocateDataSource event. The reporting engine raises the LocateDataSource event when it needs input on the data to use.


ShowSample Location

ShowVisual Basic.NET

<User Folder>\ComponentOne Samples\ActiveReports Developer 7\Page Reports\FPL\Data\VB.NET\PageUnboundData

ShowC#

<User Folder>\ComponentOne Samples\ActiveReports Developer 7\Page Reports\FPL\Data\C#\PageUnboundData

ShowRuntime Features

When you run this sample, the Invoice2.rdlx report is displayed in the Viewer control. The report displays the Invoice form with the list of products along with the product ID, quantity and price of the products.

The report connects to an unbound data source at runtime using the LocateDataSource event and the DataSet provider.

ShowProject Details

ShowInvoice2.rdlx

In the Report Data Source dialog, the type of the report data source is set to DataSetProvider and the ConnectionString is left blank. In the DataSet dialog, data fields used on the report are added to the DataSet on the Fields page.

This report uses the Table, TextBox, Label and Shape controls to create an Invoice layout for displaying the customer transactions. The Container control at the bottom of the report contains a label, a textbox and line control. The textbox uses the Sum function to display the sum of the values returned by the expression indicated in the Value property.

ShowViewerForm

This is the main form that appears when you run this sample. It uses the ActiveReports Viewer control to display the report at runtime. The code-behind the form contains the code with the LocateDataSource event that connects the Invoice2.rdlx report to unbound data and the code that populates fields for the data table.

See Also

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