• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 16. Working with Simple Reports ... > Adding Calculated Controls to a Repo...

Adding Calculated Controls to a Report

Calculated controls are useful in reports. You use calculated controls to determine extended values, such as quantity times unit price or quantity times cost. Now you have enough space at the right of the report to add two columns: one for the UnitPrice field and one for the extended inventory value, which is UnitPrice multiplied by UnitsInStock. The following subsections explain how to provide the data for and add these controls.

Changing the Report’s Record Source

You created the Inventory by Category report by selecting fields directly from the Products and Suppliers tables in the Report Wizard. Therefore, the Record Source property for the report as a whole is an SQL statement that selects only the fields that you chose initially in the Report Wizard. Although you can add fields to the report by creating unbound text box controls and using the Expression Builder to create an expression to retrieve the desired value, it’s a more straightforward process to create a query to select the desired fields and then substitute the new query as the report’s data source. You also can specify record-selection criteria in a query.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint