Chapter 7 Working with Reports

Adding a Subreport to a Report To create a report by using a wizard

  1. On the Objects bar, click the table on which you want to base your report.

  2. On the Insert menu, click Report to display the New Report dialog box.

  3. Double-click Report Wizard.

  4. Follow the instructions of the Report Wizard, and then click Finish to preview the report.

Modifying a Report To change the height of a report section

  1. Open the report in Design view.

  2. Point to the top of the selector of the section you want to resize, and when the pointer changes to a two-headed vertical arrow, drag the selector up or down to expand or collapse the section.

Modifying a Report To create a custom date format in a Report Header

  1. Open the report in Design view.

  2. Click the Toolbox button to open it, if necessary.

  3. In the Toolbox, click the Text Box control, and then click where you want to insert the date in the Report Header section.

  4. Click the label that was created with the new text box, and press to delete it.

  5. Click the text box, and then press the key to display the Properties dialog box.

  6. On the Data tab, click Control Source, enter your custom date format, for example: =Format(Date(), "dd,mm,yyyy"), and then press .

Modifying a Report To add a group header or footer

  1. Open the report in Design view, and then click the Sorting and Grouping button on the toolbar.

  2. In the Group Properties area, double-click Group Header or Group Footer to change it to Yes.

Modifying a Report To report properties

  1. Open the report in Design view.

  2. Select the control you want to modify, press to display the Properties dialog box, if necessary, and then click the appropriate tab.

  3. Click the property you want to change, and then enter new values, or select a new setting from the drop-down list.

Creating a Report from Scratch To use a query as the basis for a report

  1. On the Objects bar, click Queries.

  2. Click the query on which you want to base the report.

  3. On the Insert menu, click Report.

  4. Click Report Wizard, and then click OK.

  5. Follow the wizard’s instructions, and then click Finish.

Creating a Report from Scratch To insert a title in a report

  1. Open the report in Design view.

  2. If the Toolbox isn’t displayed, click the Toolbox button on the toolbar.

  3. To give the report a title, click the Label control in the Toolbox, and then click the top of the Report Header section.

  4. Name the report, and press .

  5. Scroll down, and set the label’s font properties.

  6. If necessary, on the Format menu, point to Size, and then click To Fit.

  7. Move the label to the location you want it.

Creating a Report from Scratch To insert the date and time into a report

  1. On the Insert menu, click Date and Time to display the Date and Time dialog box.

  2. Make sure that Include Date is selected, and choose the date format you want. If you want to include the time, make sure that Include Time is selected, choose the time format, and then click OK.

  3. Drag the new text box containing =Date() to where you want it, and adjust its width and position as needed using the buttons and boxes on the Formatting toolbar.

Creating a Report from Scratch To give a report a label

  1. Click the Label button in the Toolbox, click in the location on the report where you want the label, type the label name, and then press .

  2. Set the font properties for the label, and then fine-tune the position of the label, in necessary.

Creating a Report from Scratch To insert a page number in a report

  1. In the Page Footer section, click Page Numbers on the Insert menu to display the Page Numbers dialog box.

  2. Select the options you want, and then click OK.

Adding a Subreport to a Report To add a subreport to a report

  1. Open the main report in Design view.

  2. Open the Toolbox, if necessary, click Subform/Subreport on the Toolbox, and then click on the report where you want to insert the subreport.

  3. Follow the instructions of the SubReport Wizard, and then click Finish.

Adding a Subreport to a Report To format a subreport

  1. Open the main report with the subreport in Design view.

  2. Click the subreport control, and press .

  3. Use the options in the Properties dialog box to make the necessary changes.

  4. Save your changes, and switch to Print Preview to view the results.

Adding a Subreport to a Report To use the Expression Builder in a text box in a report

  1. Open the report in Design view.

  2. Click an unbound text box control and press to open the Properties dialog box.

  3. Click the Data tab, click Control Source, and click the ... button to open the Expression Builder.

  4. Build your expression, and then click OK to close the Expression Builder.

  5. Press to enter the calculation in the unbound text box.

Previewing and Printing a Report To preview a report in Print Preview or Layout Preview

  1. Open the report in Design view.

  2. Click the down arrow to the right of the View button to display the list of views.

  3. Click Print Preview or Layout Preview.

  4. On the Navigation bar, click the Next Page button to view each page of the report.

Previewing and Printing a Report To print a report

  1. In the database window, click the report you want to print.

  2. On the toolbar, click the Print button.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset