ActiveReports 13
Exploring Section Reports
ActiveReports 13 > ActiveReports User Guide > Concepts > ActiveReports Designer > Report Explorer > Exploring Section Reports

By default, when you have a section report open in the ActiveReports Designer, you can see nodes like the following.

In the Report Explorer, in addition to removing controls, adding, editing or removing parameters, adding a data source, and dragging fields onto the report, you can also add, edit, or remove calculated fields; drag bound data fields onto the report as textbox controls; change report settings like margins, printer settings, styles, and ruler and grid settings. You can also select the report or any element in the report to display in the Properties window, where you can modify its properties.

To add a DataSource

  1. Click the gray report DataSource icon on the Detail section band to open the Report Data Source dialog.
  2. On the OLE DB tab, next to Connection String, click the Build button.
  3. In the Data Link Properties window that appears, select Microsoft Jet 4.0 OLE DB Provider and click the Next button. Click the ellipsis (...) button to browse to your database or the sample Northwind database, nwind.mdb.
  4. Once you have selected your *.mdb file, click Open.
  5. Click OK to close the window and fill in the Connection String field.
  6. In the Query field, enter a SQL query to select the data that you want, for example
    Example Query
    Copy Code
    SELECT * FROM Customers
    
  7. Click OK to save the data source and return to the report design surface. In the Report Explorer, under the Fields node, the Bound node is populated with fields returned by the query.

To add a calculated field

  1. In the Report Explorer, expand the Fields node.
  2. Right-click the Calculated node and select Add. The new calculated field is displayed in the Report Explorer and in the Properties window.
  3. In the Properties window, set the Formula property to a calculation, for example: = UnitPrice * 1.07
  4. Drag the field from the Report Explorer onto the design surface of your report to create a textbox that is bound to the field.

To bind a Field to a TextBox control

  1. In the Report Explorer, expand the Fields node, then the Bound or Calculated node that you want to use.
  2. Click the field that you want to bind to a TextBox control, drag it onto the report surface and drop it into the section where you want the TextBox to appear.
  3. A TextBox control is created and bound to the field with the filed name in the DataField property, and a related value in the Name and Text properties. For example, if you drag the City field onto the report, the DataField property of the TextBox becomes City, the Name and Text properties become txtCity1

To add parameters

  1. In the Report Explorer, right-click the Parameters node and select Add. The new parameter is displayed in the Report Explorer and in the Properties window.
  2. In the Properties window, set the Prompt property to a string value to ask users for data.
  3. Leave the PromptUser property set to True. When you run the report, a dialog displays the Prompt to the user.
  4. From the Report Explorer, drag the parameter to the report design area to create a TextBox that is bound to the parameter. When you run the report, the value that the user supplies in the prompt dialog displays in the bound TextBox on the report.

To change report settings

  1. In the Report Explorer, double-click the Settings node. The Report Settings dialog appears.
  2. You can set a number of options on the four tabs in the dialog.
  3. When you have finished changing report settings, click OK.
See Also