ActiveReports Developer 7
OleDb DataSource
See Also Support Forum
ActiveReports Developer 7 > ActiveReports Developer Guide > Samples and Walkthroughs > Samples > Page Report > CPL Samples > API > OleDb DataSource

Glossary Item Box

The OleDB Data Source sample demonstrates how to use the OleDb data provider for binding a report to data.


ShowSample Location

ShowVisual Basic.NET

<User Folder>\ComponentOne Samples\ActiveReports Developer 7\Page Reports\CPL\API\VB.NET\OleDbDataSource

ShowC#

<User Folder>\ComponentOne Samples\ActiveReports Developer 7\Page Reports\CPL\API\C#\OleDbDataSource

ShowRuntime Features

When you run this sample, the MainForm with the ActiveReports Viewer appears. The Viewer displays the report with the list of movies, their ratings and the release year information.
Note: To run this sample, you must have access to the Reels.mdb. A copy is located at [User Documents folder]\ComponentOne Samples\ActiveReports Developer 7\Data. If you are unable to access the data files in the sample, create the Data folder and place all the data files to this folder, or change the reference path to the data files within the folder according to your environment.

ShowProject Details

ShowDataLayer

This file is an internal class that contains code to create a data connection. It creates the OleDb data reader to read data from the Reels database and add it to an array to provide data for the report.

ShowMainForm

This is the main form that appears when you run this sample. It uses the ActiveReports Viewer control to display the report at runtime.

Right-click the form and select View Code to see how to load and show the report at runtime.

ShowOleDBReport.rdlx

This is the report that gets displayed in the Viewer at runtime.

The report uses the header with the Textbox to display the report heading and the footer with the Textbox to display the page number information. The body of the report has the Table data region to display data obtained from the OleDb data provider. For that, the Textbox controls of the Table are bound to the OleDB data source in the Value property.

See Also

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