ActiveReport can interact with multiple data sources, including OLEDB, SQL, XML, and collection objects.
This article describes how to bind an Oracle database to ActiveReport.
This is an easy task. The following describes the binding method for distribution:
1. Use VS to create the ActiveReport7 (Code-Based) project.
2. Add Oracle. DataAccess. dll reference.
3. Add the Oracle. DataAccess namespace.
4. Add the following code to the Report Start event:
A. Set the database connection string
B. Set Data Query statements
C. Use the Data Adapter to retrieve Data and fill the DataTable
D. Set Data Source property to DataTable
E. Close the database connection string
The Code is as follows:
5. Now, add the display data control to the report and set the DataField attribute of the control to the field name in the DataTable.
6. view the binding result through the report designer.