Alison Balteramp;#039;s Mastering Microsoft Office Access 1002003 [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Alison Balteramp;#039;s Mastering Microsoft Office Access 1002003 [Electronic resources] - نسخه متنی

Alison Balter

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید



Creating a New Report


You can create a new report in several waysthe most common is to select Reports from the Objects list in the Database window and double-click the Create Report by Using Wizard icon. If you prefer, you can click New on the toolbar for the database window to open the New Report dialog box (see Figure 6.8). Here, you can select from many options available for creating reports. You can create reports from scratch by using Design View; you can also create them with the help of five wizards. Three of the wizards help you build standard reports, one helps you build reports with charts, and the last wizard automates the process of creating mailing labels. The Report Wizards are so powerful that I use one of them to build the initial foundation for almost every report I create.

Figure 6.8. In the New Report dialog box, you can designate Design View or select from one of five wizards.


Creating a Report with the Report Wizard


To create a report with the Report Wizard, click Reports in the Objects list and then double-click the Create Report by Using Wizard icon. This launches the Report Wizard. The first step is to select the table or query that will supply data to the report. I prefer to base my reports on queries, or on embedded Structured Query Language (SQL) statements (a query stored as part of a report). This generally improves performance because it returns as small a dataset as possible. In a client/server environment, this is particularly pronounced because the query is usually run on the server and only the results are sent over the network wire. Basing reports on queries also enhances your ability to produce reports based on varying criteria.

After you have selected a table or query, you can select the fields you want to include in the report. The fields included in the selected table or query are displayed in the list box on the left. To add fields to the report, double-click the name of the field you want to add or click the field name and click the > button. In the example in Figure 6.9, five fields have been selected from the tblClients table.

Figure 6.9. The first step of the Report Wizard: table/field selection.


After you have selected a table or query and the fields you want to include on the report, click Next. The wizard prompts you to add group levels, which add report groupings, to the report. Add group levels if you need to visually separate groups of data or include summary calculations (subtotals) in your report. Report groupings are covered later in this chapter. If your report doesn't require groupings, click Next.

In the third step of the Report Wizard, you choose sorting levels for your report. Because the order of a query underlying a report is overridden by any sort order designated in the report, it's a good idea to designate a sort order for the report. You can add up to four sorting levels with the wizard. In the example shown in Figure 6.10, the report is sorted by the ClientID field. After you select the fields you want to sort on, and whether you wish to sort in ascending or descending order, click Next.

Figure 6.10. The third step of the Report Wizard: sorting report data.


In the fourth step of the Report Wizard, you decide on the report's layout and orientation. The layout options vary depending on what selections you made in the wizard's previous steps. The orientation can be Portrait or Landscape. This step of the Report Wizard also allows you to specify whether you want Access to adjust the width of each field so that all the fields fit on each page. After supplying Access with this information, click Next.

You choose a style for your report in the Report Wizard's fifth step. The choices are Bold, Casual, Compact, Corporate, Formal, and Soft Gray. You can preview each look before you make a decision. Any of the style attributes applied by the Report Wizard, as well as other report attributes defined by the wizard, can be modified in Report Design View any time after the wizard has produced the report. After you have selected a style, click Next.

The final step of the Report Wizard prompts you for the report's title. Access uses this title as both the name and the caption for the report. I supply a standard Access report name and modify the caption after the Report Wizard has finished its process. You're then given the opportunity to preview the report or modify the report's design. If you opt to modify the report's design, you're placed in Design View (see Figure 6.11). You can then preview the report at any time. You can optionally mark the check box Display Help on working with the Report to have Access display the help window and list the associated report topics.

Figure 6.11. Design View of a completed report.


NOTE

Another way to start the Report Wizard is to select Tables or Queries from the Objects list in the Database Container, and then click the table or query that you want the report to be based on. Use the New Object drop-down list on the toolbar to select Report. In the New Report dialog box, select Report Wizard. You don't have to use the Tables/Queries drop-down menu to select a table or query because the one you selected before invoking the wizard is automatically selected for you.

Creating a Report from Design View


Although you usually get started with most of your reports by using a Report Wizard, you should understand how to create a new report from Design view. To create a report without using a wizard, click Reports in the Objects list and then double-click the Create Report in Design View icon. The Report Design window appears. You must then set the Record Source of the report to the table or query upon which you want the report to be based. Another way to create a report from Design view is to click Reports in the Objects list and then click New to open the New Report dialog box. Click Design View and use the drop-down list to select the table or query on which the report will be based; then click OK. The Report Design window appears.


/ 544