The Bound Data sample demonstrates various ways to bind data in a section report.
When you run the sample, the Viewer control displays the form with seven tabs, each with a different data binding technique. Click to select a tab, and then click the Bind To button to create the report.
<User Folder>\ComponentOne Samples\ActiveReports Developer 7\Section Reports\VB.NET\Data\BoundData
<User Folder>\ComponentOne Samples\ActiveReports Developer 7\Section Reports\C#\Data\BoundData
The top panel of the MainForm comprises of seven tabs:
Bind to DataSet
Creates a DataSet from the sample database and binds it to a SectionReport object.
Bind to DataReader
Creates a DataReader from the sample database and binds it to a SectionReport object.
Bind to DataView
Creates a DataView from the sample database and binds it to a SectionReport object. This tab contains a ComboBox which lets you choose the company name from the NWind database.
Bind to DataTable
Creates a DataTable from the sample database and binds it to a SectionReport object.
Bind to SQL Server
Creates a SQL Server DataSource from a SQL server instance and binds it to a SectionReport object. The ComboBox present in this tab lets you populate the dropdown list with the existing SQL servers on the network.
Bind to OleDb
Creates an Oledb DataSource and binds it to a SectionReport object.
Bind to XML
Creates a XML DataSource from a file and binds it to a SectionReport object. The XML tab also features a Generate XML button that generates a DataSet and saves it as an XML data file. The generated file is then used as a data source for the report.
The MainForm uses the ActiveReports Viewer control in the bottom section of the form, and a panel docked to the top contains seven tabs, each with a different data binding technique.
Click to select a tab, and then double-click the button on the tab to jump to the button's Click event in the code.
The Invoice report uses three GroupHeader sections, a Detail section and a GroupFooter section as well as a label in the PageFooter section to display data.
Note: Except for the Detail section, all sections come in header and footer pairs. Unused sections have their Height properties set to 0 and their Visible properties set to False. |
This section also contains a Picture control, a number of Label controls, and two bound TextBox controls. The TextBoxes are bound using the DataField property in the Properties window, and the date is formatted using the OutputFormat property.
This section contains a number of labels and bound text boxes, as well as two Line controls.
This section contains several labels and several TextBoxes. Two of the TextBox controls use the following properties to summarize the detail data: SummaryFunc, 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.