Presentation is loading. Please wait.

Presentation is loading. Please wait.

Customizing Reports. Custom Reports A report is a formatted hardcopy of the contents of one or more tables from a database. Although you can format and.

Similar presentations


Presentation on theme: "Customizing Reports. Custom Reports A report is a formatted hardcopy of the contents of one or more tables from a database. Although you can format and."— Presentation transcript:

1 Customizing Reports

2 Custom Reports A report is a formatted hardcopy of the contents of one or more tables from a database. Although you can format and print data using datasheets, queries, and forms, reports allow you greater flexibility and provide a more professional, custom appearance. Reports can be used, for example, to print billing statements and mailing labels.

3 Report Sections An Access report is divided into seven sections. Although only the detail section is required, each report can contain any combination of the seven different sections or all of them.

4

5 Report Sections You don’t have to include all seven sections in your report. When you design your report, you determine which sections to include and what information to place in each section.

6 Sample report from the Restaurant Database Report Header Section Page Header Section Group Header Sections The Detail Section appearing for each group in the report.

7 Sample report from the Restaurant Database Report Footer Section Group Footer Sections Page Footer Section

8 Before you create a custom report, you should first plan the report’s contends and appearance.

9 Leonard has designed a custom report for us to create.

10 Report Header

11 Page Header

12 Detail Section

13 Report Footer Section

14 The Report window in Design view is similar to the Form window in Design view, which you used in the previous tutorial to customize forms.

15 In the design view, we can see the ToolBox button on the toolbar

16 Clicking this will produce the toolbox.

17 The page Header section is shown here!

18 The Detail section is shown here!

19 The Page Footer section is shown here!

20 To Create or get rid of a Page Header/Footer or Report Header/Footer section you can click View from the menu bar and click on the appropriate section option.

21 To create a calculated field on a report (or form) you must first be in the design view. UNBOUND Once in the design view, the first step is to create an “UNBOUND” text box that will be used for the calculated field. Conditional Values in Calculated Fields

22 To place an unbound text box in the report, we will use the Textbox tool on the tool box.

23 Conditional Values in Calculated Fields First, click on the tool to activate it and then release the mouse button.

24 Conditional Values in Calculated Fields Then position the pointer on the report where you would like the text box and again, click the mouse button.

25 Conditional Values in Calculated Fields This will place the Unbound text box on the report.

26 Conditional Values in Calculated Fields There are two way in which you can add a calculated conditional value text box to your report. The first way is to create a calculated field in an underlying query, as shown on page AC 6.06 in your books. Page AC 6.06

27 Conditional Values in Calculated Fields The second way is to add a calculation directly to an unbound field in the report.

28 Conditional Values in Calculated Fields To accomplish this, right click on the unbound text box (not it’s label) and select properties from the shortcut menu.

29 Conditional Values in Calculated Fields When the text box’s property window appears, click on the “All” tab and then right click on the “Control Source” property and select Zoom from the short cut menu.

30 Conditional Values in Calculated Fields This will zoom in to the control source property and will allow you more room for typing your expression

31 Conditional Values in Calculated Fields While in the Zoom Box, type the following expression. = IIF([Paid] is null,0,[InvoiceAmt]) Then Press the OK button.

32 Conditional Values in Calculated Fields This expression says: If the existing field named [Paid] in the underlying table or query is null (blank) then place a zero in this field, otherwise (else) place the value of the invoice amount for this record here. = IIF([Paid] is null,0,[InvoiceAmt])

33 Conditional Values in Calculated Fields Don’t forget the “=“ sign. This is not needed in a Query but is necessary when typing the expression in the control source of a text box on a form or report. = IIF([Paid] is null,0,[InvoiceAmt])

34 Conditional Values in Calculated Fields The IIF Function, referred to as the “Immediate IF” function, lets you assign one value to a calculated field if a condition is true, and another value if the condition is false. = IIF([Paid] is null,0,[InvoiceAmt])

35 You add bound controls to a report in the same way that you add them to a form. Adding Fields to a Report

36 Reference Window All Fields Adding All Fields to a Report Display the report in the design view Click the field list button on the Report Design tool bar to display the field list. To place all fields in the report, double click the field list title bar to highlight all fields, then click anywhere in the highlighted area hold and drag the fields to the desired section of the report. Release the mouse button when the fields are in position. Page AC 6.08

37 Reference Window A Single Adding A Single Field to a Report Display the report in the design view Click the field list button on the Report Design tool bar to display the field list. To place a single field in the report, position the pointer on the field name in the field list, and then click, hold and drag the field name from the field list to the report. Release the mouse button when the pointer is correctly positioned. Page AC 6.08

38 By clicking the field list button on the tool bar we can view the fields in the underlying table or query.

39 The field list

40 We have the option of clicking on the Field List Title bar to select all fields and then click, hold and drag any one field to the detail section. This will insert all fields.

41 Or, we can click, hold and drag one field at a time to the detail section, selecting only certain fields, instead of all fields.

42 Notice the labels connected to each field.

43 If we select a label, or all labels (without the text box) we can cut these to the clipboard.

44 This will remove them from the detail section, leaving the text box only.

45 Clicking anywhere in the Page Header Section or on the Page Header Bar will select the Page Header. We can then paste the labels into this section.

46 Moving and resizing controls is identical to that of forms. This is covered on page AC 6.11 in your books.

47 Changing the Caption Property Each label has a Caption property that controls the text displayed in the label.

48 Changing the Caption Property The caption property for an object determines the text displayed for that object.

49 The default Caption property value for a bound control is the field name followed by a colon. Other controls, such as buttons and tab controls, have Caption properties as well.

50 You can change the value of a Caption property for an object by using the property sheet for that object. You should change the Caption property value for an object if the default value is difficult to read or understand.

51 You can change the caption property for a label by 1. Right-click the label box to select it and display the shortcut menu 2. Click Properties to display the property sheet 3. Find the Caption Property 4. Type the new Caption 5. Click the Close button to close the property sheet.

52 Aligning Controls You can align controls in a report or form using the Align command. This command provides options for aligning controls in different ways. For example, if you select objects in a column, you can use the Align Left option to align the left edges of the objects. Similarly, if you select objects in a row, you can use the Align Top option to align the top edges of the objects.

53 Aligning Controls The Align Right and Align Bottom options work in the same way. A fifth option, Align To Grid, aligns selected objects with the grid dots in the Report window.

54 Aligning Controls To use the Align Command, first, select the objects that you wish to align, then select Format from the Menu bar and then select Align.

55 Format Align Left Right Top Bottom To Grid

56 To preview the report, simply click on the Print Preview button on the Report’s Design toolbar.

57 To Zoom in and out you can use the Zoom buttons on the Report’s Print Preview tool bar, or...

58 ... Just click in the preview section to Zoom In or Click there again to Zoom Out.

59 Clicking in the preview of the report or using the Zoom buttons on the tool bar changes the size of the page displayed in Print Preview.

60 Page AC 6.18 Quick Check Review

61 Let’s take a few moments to break up into discussion groups. Each group will discuss the quick check questions on page AC 6.18 in your books. We will then review the answers at the end of the discussion.

62 Quick Check Review Session 6.1 1) The ____________ function lets you assign one value to a calculated field if a condition is true and a second value if the condition is false.

63 Quick Check Review Session 6.1 Additional Question What is the IIF function referred to as?

64 Quick Check Review Session 6.1 2) Describe the seven sections in an Access report.

65 Quick Check Review Session 6.1 3) What is a custom report?

66 Quick Check Review Session 6.1 4) What does the Report window in Design view have in common with the Form window in Design view? How does it differ?...

67 Quick Check Review Session 6.1 5) What is the Caption property for an object and when would you change it?

68 Quick Check Review Session 6.1 6) How do you left-align objects in a column?

69 Quick Check Review Session 6.1 7) What is the purpose of the Zoom button in Print Preview?

70 Your task today is to complete the exercises in Tutorial #6 Page AC 6.4 through Page AC 6.18 The disk is Level 2 Disk 1


Download ppt "Customizing Reports. Custom Reports A report is a formatted hardcopy of the contents of one or more tables from a database. Although you can format and."

Similar presentations


Ads by Google