• Microsoft access report. Create a report using the Report Wizard

    2.4.7. Reports in an Access 2007 database

    Report(report) is a database object that is used to display structured information on screen, print, or file. Reports allow you to extract from database tables or queries necessary information and present it in a form convenient for perception. The Report contains a header, a data area, a header, a footer, a note, and is paginated.

    At Microsoft Access 2007 to create reports Various means can be used (Fig. 1):

    • Report Wizard
    • Report designer
    • Report Tool
    • Blank report


    Rice. 1.

    It is advisable to perform reports using the Wizard or other specified tools, and modify them, i.e. You can make the necessary changes in layout or design mode. Microsoft Access 2007 provides two modes for making changes and additions to reports: layout mode and design mode.

    Layout mode is a more visual mode for editing and formatting (changing) reports than Design mode. In cases where it is impossible to make changes to the report in Layout mode, it is advisable to use Design mode.

    Report Wizard. To create a report using the Report Wizard, you must perform the following steps:

    • In the Access database window, click the Create tab and then click the Report Wizard button in the Reports group. The Create Reports dialog box appears.
    • In the Tables and reports field, click the arrow and select the Students table as the data source.
    • Click on the OK button (as a result we get the appearance of the “Create reports” window shown in Fig. 2).
    • We will transfer all “Available fields” to “Selected fields” by selecting them and clicking on the >> button.
    • In the next step (Add grouping levels?), click next.
    • At the "Select sort order for records" step. Select "Last Name" from the drop-down list to sort in ascending order.
    • At the "Select a layout type for the report" step. Select: Layout - block, orientation - portrait. Click on the Next button.
    • At the "Select the desired style" step. We choose - Graceful.
    • The next step is “Set the report name”. Enter the name - Students of master_reports. Next steps: View report; Change the report layout. Select View and click on the Finish button. Report opens in Preview mode, which allows you to see what the report will look like when printed (Fig. 3).
    • Switch to Design mode and edit and format the report. To switch from preview mode to design mode, in the navigation pane, right-click on the report name and context menu select design mode. The report will appear on the screen in Design mode (Fig. 4).



    Rice. 2.




    Rice. 3.




    Rice. 4.

    Editing:

    • remove the Student Code fields in the header and data area;
    • remove the GroupCode fields in the header and data area;
    • In place of the Group Code field, move the "Name" field from the "Student Groups" list;
    • move all fields in the header and data area to the left;
    • Change the inscription in the page title, enter NTU “KhPI” and press Enter;
    • Move the Caption. In the Footer, select the =Now() field and drag it to the Header under the name Students. The date will appear below the title.

    Formatting:

    1. Select the heading Students of NTU “KhPI”

    2. Change the typeface, font style and color, as well as the background fill color. Report in design mode will take the form shown in Figure 5.



    Rice. 5.

    3. Go to Preview mode. To switch to the preview mode, you need to right-click on the report name in the navigation area and select the “Preview” mode in the context menu (Figure 6).



    Rice. 6.

    Report Tool. For quick creation report, i.e. create with one click using the Report tool. In this case, the report is generated based on an existing table or query. The created report will display all records of the table or query on the basis of which the report is created. But the created report can be modified in layout or design mode.

    To create a report, you must do the following: In the navigation area, you need to select a table (for example, Students), based on which you want to create a report. Then go to the Create tab and click on the Report icon. A simple Report based on the current Students table will be displayed on the screen.

    Blank report tool. The Blank report tool allows you to create reports from scratch in layout mode. To do this, click Blank report in the Reports group on the Create tab. In the Access 2007 editing window, Report1 will appear with an empty data area, and the "Field List" area of ​​existing tables will be displayed on the right side of the window. Clicking on the "+" sign of a table (for example, Students) will open a list of required fields.

    Drag the required fields from this list into the report by clicking and holding the left mouse button. Using the tools from the "Controls" group on the Format tab, you can modify the report by adding a title, page numbers, date and time. If necessary, it can be modified in design mode. Save the report.

    Subject

    • Creating reports in MS Access.

    Target

    Lesson progress

    Methods for creating a report

    Using the function Auto report, you can quickly and easily create a report and then make specific changes to it.

    Creating an Auto Report

    To create an Auto Report you must perform the following steps:

    In the database window, click the Reports tab and then click the Create button. The New Report dialog box appears.

    Select the Autoreport: column or Autoreport: strip item in the list.

    In the data source field, click the arrow and select Table or Query as the data source.

    Click on the OK button.

    The Auto Report Wizard creates an auto report in a column or strip (user's choice) and opens it in Preview mode, which allows you to see what the report will look like when printed.

    1. On the object panel of the database window, click the Reports shortcut and click the New button. The New Report dialog box appears.


    2. In the list of the dialog box (New Report), select the item Report Wizard. The combo box at the bottom of the New Report dialog box contains the names of all tables and queries. databases, which can be used as a data source for the report. Expand this list and select the “Products” table in it. Click OK. The first Report Wizard dialog box appears.

    3. The first step is to determine which fields to include in your report. From the "Products" table, the report will use the following fields: "Product ID", "Brand" (ProductName), "Price" (UnitPrice), "InStock" (UnitsInStock). Using the ">" button (or double-clicking on a list item), move these fields one by one from the Available Fields list to the Selected Fields list. In the report, fields appear from left to right, according to the order in which they appear in the Selected Fields list.


    4. In addition, in order to see suppliers of goods and categories, you need to add the field “Name” (CompanyName) from the table “Suppliers” and “CategoryName” from the table “Types” (Categories) to the generated report. To add the first missing field, expand the list Tables and (Tables/Queries) and select the Table: Suppliers element. The vendor name should not appear at the end of the report.

    5. You can also customize the report type.


    6 . The Report Wizard allows you to specify value intervals by which data is grouped. To change them in the same (third) Report Wizard dialog box, click the Grouping Options button. The Grouping Intervals dialog box appears on the screen.

    7. For the report you are creating, select Normal from the Grouping Intervals list and click OK. To go to the fourth Report Wizard dialog box, click Next.

    8. Access 2002 allows you to sort records within a group by the value of a custom field, and sorting is carried out by no more than four fields. Select the ProductID field from the first drop-down list. The default sort order is ascending; if you want to select a descending sort order, then click on the button to the right of the drop-down list. To return to ascending sorting, click this button again.

    9. In the next Report Wizard dialog box, select one of the proposed report styles. The left side of the Wizard dialog box displays a thumbnail of the report of the selected style. For the report you are creating, select the Compact style, and then click Next to move to the final Report Wizard dialog box.

    10. In the last dialog box of the Report Wizard, enter as the report title: Items in stock. The Report Wizard will save the created report under the same name. Select the Preview the Report radio button and click Finish to complete creating the report. The Report Wizard will create the report and display it in Preview mode. If you need to get help on working with the report, first check the Show help on working with the report? (Display Help on Working with the Report?).

    Questions

    1. What are the ways to create reports in MS Access?

    2. How to create a report using the AutoReport function?

    3. Brief description stages of creating a report using the Report Wizard.

    List of sources used

    1. Lesson on the topic: “Creating reports in MS Access”, Oberemko V. A., mathematics teacher.

    2. Sergeev A. Download Access 2007. New features. - Peter Press, 2008

    3. Computer science: Workshop on computer technology. Tutorial/ Ed. N.V. Makarova. 3rd ed. M.: Finance and Statistics, 2004.

    4. Leontyev V.P. Latest encyclopedia personal computer 2003. - M.: OLMA-PRESS, 2003.

    Edited and sent by Kievsky teacher national university them. Taras Shevchenko Solovyov M. S.

    We worked on the lesson

    Soloviev M. S.

    Oberemko V. A.

    Ask a question about modern education, express an idea or solve a pressing problem, you can Educational forum, where an educational council of fresh thought and action meets internationally. Having created blog, You will not only increase your status as a competent teacher, but also make a significant contribution to the development of the school of the future.

    In this lesson we will talk about the topic “Ways to create a report in Microsoft Office Access". Access provides users with the means to create a report. Report - database object Microsoft data Access, designed to print data organized and formatted according to user requirements.

    When creating a report, you can use standard means, speeding up the process of creating a report or developing a special format using the report designer. The report designer allows you to create reports, both in tabular form and in free form.
    A tabular report is a printed table that organizes data into columns and rows. Each column contains a source table field or a calculated field, and a row represents a record. A tabular report allows you to print data from tables in the simplest and most natural form. However, they are not suitable in cases where the fields of the source table must be located in specially designated places in the report (mailing labels, checks, letters).
    Free-form reports eliminate the limitations of tabular reports. When receiving a free-form report, you can use the standard format that Access automatically creates for each table. In this format, the fields of the source table are arranged vertically. However, using the report designer, you can develop a special format where the fields of the source table are located in the required places in the report.
    Access uses the following tools to create a report (Fig. 1):

    • Report, which allows you to automatically create a report with fields arranged in one or more columns;
    • Report Wizard, which allows you to create a custom report based on selected fields;
    • Report designer, in which you can independently develop your own reports with specified properties;
    • Blank report, which allows you to independently insert fields and controls and modify the report form;
    • Stickers, which allows you to create a report for mailing labels or other labels.

    Fig. 1 - Methods for creating a report in Microsoft Office Access

    To create the simplest report in Access, you need to follow these steps:

    • open the database window;
    • Make sure the table is selected in the navigation pane;
    • execute command Report in the “Reports” group, on Lente in the tab Creation.

    A ready-to-use report will appear on the screen, which includes all the fields in the table. Their names are arranged horizontally in the order in which they appear in the table. Below the name of each field its value is displayed in the table.
    The arrangement of fields and records in automatically generated reports is not suitable for all cases, in particular when large quantities. However, reports can be useful when they are created based on queries that display only the required fields. You can also use a query to determine which records and their sort order will be included in the report.
    To reinforce the topic of How to create a report in Microsoft Office Access, watch the video tutorial.

    Using reports, you can view, format, and group information in a Microsoft Access database. For example, you can create a simple report in the form of a list of phone numbers of all contacts or a summary report of the company's sales results in different regions for different periods.

    This article provides an overview of reports in Access, the basics of creating a report and using the features to sort, group, and summarize data, and how to preview and print a report.

    Note: The information in this article applies only to classic Access databases. Access web apps do not support reports.

    In this article

    Understanding reports in Access

    Possibility of using the report

    A report is a database object convenient for presenting its information for one of the following purposes:

      display or disseminate summary data;

      archiving data snapshots;

      providing information about individual records;

      creation of inscriptions.

    Components of a report

    It's possible to create "unlinked" reports that don't display data, but in this article we'll look at a report that's linked to a data source (table or query). The report layout is divided into sections that can be viewed in Design view. Understanding how each section works will help you create better reports. For example, the choice of section to host a calculated control determines how the result is calculated. The following are the types of partitions and the purpose of each of them:

    Displaying a Section When Printing

    Using a section

    Report title.

    At the beginning of the report.

    The title includes information typically found on the cover, such as the company logo, report title, or date. If you place a calculated control in the report header that uses aggregation Sum function, the amount is calculated for the entire report. The report title is printed before the header.

    Header.

    At the top of every page.

    A header is used when you want the report title to be repeated on every page.

    Group title.

    At the beginning of each new group records.

    Used to print the group name. For example, if the report is grouped by products, you can specify their names in the group headings. If you place a calculated control that uses the Sum aggregation function in the group header, the sum will be calculated for the current group. A group header can have multiple sections depending on the added levels of grouping. More information To create group headers and footers, see Add Grouping, Sort, or Totals.

    Data area.

    Displayed once for each row in the record source.

    It houses the controls that make up the main content of the report.

    Group note.

    At the end of each group of entries.

    A group note can be used to print summary information for a group. A group footer can have multiple sections depending on the grouping levels you add.

    Footer.

    At the bottom of every page.

    Used for page numbering and for printing page-by-page information.

    Report note.

    At the end of the report.

    Note: In design view, the report note appears below the footer. However, in all other modes (such as Layout mode, Print mode, or Preview mode), this section is placed over footer, immediately after the last group note or data area line on the last page.

    You can use a report note to print totals and other summary information for the entire report.

    Creating a meaningful report is much easier if the tables in the database have well-designed structures and relationships. For initial information on planning and designing a database, see Understanding Database Design.

    Creating a report in Access

    To create a report for an Access database on your computer, follow these steps:

    Step 1: Select a recording source

    The record source for a report can be a table, a named query, or an embedded query. The record source must contain all the rows and columns of data that you want to display in the report.

    Step 2: Select a report tool

    Report tools are located on the tab Create in the group Reports. The following table describes these parameters:

    Tool

    Description

    Allows you to create a simple tabular report containing all the fields from the record source that is selected in the navigation pane.

    Report designer

    Opens a blank report in design mode, into which you can add the necessary fields and controls.

    Blank report

    Allows you to open a blank report in Layout view and display the Field List task pane from which you can add fields to the report.

    Report Wizard

    Launches a step-by-step wizard that helps you set margins, grouping and sorting levels, and layout options.

    Stickers

    Calls up a wizard where you can select a standard or custom size for labels, a set of fields to display, and their sort order.

    Step 3: Create a report

      To select the required tool, click the corresponding toolbar button. After the wizard appears, follow all its commands and on the last page click the button Ready.
      Access displays the report in Layout view.

      Format the report to achieve the desired appearance.

      • Resize fields and labels by selecting them and dragging the edges.

        Arrange the fields in the order you want by selecting them (and their corresponding labels, if any) and dragging them to the desired location.

        You can also right-click fields, use context menu commands to merge or split cells, delete or highlight fields, and perform other formatting tasks.

        You can also make your report more attractive and user-friendly using the features described in the sections below.

    Add grouping, sorting, and totals

    To quickly add grouping, sorting, or totaling to your report, right-click the field you want to apply the function to and select the desired command from the context menu.

    Additionally, when a report is open in Layout or Design view, you can add these features using the Group, Sort, and Total pane.

      If the Group, Sort, and Totals area is not open, the Constructor in the group Grouping and totals select team Grouping.

      Click the button Add grouping or Add sorting and select the field by which you want to group or sort the data.

      To set additional options or add totals, in the grouping or sorting line, select the command More.

    For more information about grouping, sorting, and totals, see Create a grouping or summary report.

    Highlight data using conditional formatting

    IN Access application There are tools for highlighting data in reports. Rules conditional formatting can be added for each control or group of controls, and client reports can use histograms to compare data.

    Add conditional formatting to controls

      Right-click the report in the navigation pane and select Layout mode.

      Select the controls you want, and then on the tab Format in the group Formatting a Control select team Conditional Formatting.

      Advice: To select multiple controls, CTRL-click them.

      In the dialog box Conditional Formatting Rules Manager select team Create a rule.

      In the dialog box New formatting rule select a value in the field Select rule type.

      • To create a rule that will be checked separately for each record, select the option Check the values ​​in the current entry or use an expression.

        To create a rule to compare records to each other using histograms, select the option Compare with other entries.

      In the field Changing the description of a rule specify the formatting rule to be applied and the formatting type, and then click OK.

      If you need to create another rule for this control or group of controls, repeat the procedure from step 4.

    Customizing colors and fonts

    To customize colors and fonts, try the option Application theme.

      Open the report in Layout view. To do this, right-click the report in the navigation pane and select Modelayout.

      At point Working with report layouts on the tab Constructor select option Topics and hover over different themes in the gallery to preview the effects. To select a topic, click it and save the report.

      Using Collections Colors And Fonts You can set colors and fonts independently of each other.

    Add a logo or wallpaper

    You can also add a logo or background picture. When you update a picture, it is automatically updated anywhere in the database.

    Add or remove a picture

      Layout.

      In the report, click where you want to add a picture, and on the tab Constructor in the group Headers and footers select item Logo.

      Go to the picture and click the button Open. Access adds the picture to the report.

      To delete a picture, right-click it and select Delete from the context menu.

    Adding a background image

      In the navigation pane, right-click the report and select Layout.

      On the tab Format in the group Background click the button Background image.

      Select a picture from the list Image collection or click the button Review, select a picture and click the button OK.

    Preview and print the report

    Report Preview

      Preview. Commands on the tab Preview can be used to:

      • print report;

        change page size or layout;

        change the scale or view several pages at once;

        update data in the report;

        export the report to another file format.

      Click the button Close preview mode

    Print a report

    Print a report without previewing it

      Right-click the report name in the navigation pane and select Seal. The report will be sent to the default printer.

      Note: When you select a report in the navigation pane and select the command Seal on the tab File You can set advanced printing options (number of pages and copies) and specify a printer.

      • To open a dialog box where you can select a printer, specify the number of copies, and set other options, select Seal.

    DBMS ACCESS 2000. REPORTS, THEIR PURPOSE AND USE. TYPES OF REPORTS. REPORT STRUCTURE. CREATION TECHNOLOGY

    Report is a database object that is designed to output information from databases, primarily to a printer. Reports allow you to select the information the user needs from databases, arrange it in the form of a document, and view it on the screen before printing. The data source for the report can be a table or a query. In addition to data obtained from tables, the report can display calculated fields, such as totals.

    Below are the types of reports.

    • Single column report (per column)- a long column of text containing field labels and their values ​​from all records of a table or query.
    • Multi-column report- comes from the report in one column and allows you to display report data in several columns.
    • Tabular report - a report in tabular form.
    • Report with data grouping and summary - created from a tabular report by combining data into groups and calculating the totals.
    • Cross report - is built on the basis of cross-requests and contains summary data.
    • Composite report - a report that has a complex structure, including one or more reports.
    • Report obtained by merging documents with Word (multiple document).
    • Postal labels - a special type of multi-column report designed to print names and addresses of groups.
    • Linked Tables Report - a report that allows you to display data from several tables that have a one-to-many relationship.

    Report structure. The report may consist of the following sections.

    • Report Header - Appears only on the first page and determines the height of the report header area, which can contain text, graphics, and other controls.
    • Header - appears at the top of each page; typically contains column headers.
    • Group header - printed before the first entry in the group; usually contains summary data for the records included in the group.
    • Data area - designed to display records from the report data source.
    • Group Notes Area - Displayed after the last group entry has been processed; usually contains summary data for the records included in the group.
    • Footer - appears at the bottom of each page; contains, for example, the page number of the report, the date the report was printed, etc.
    • Notes section - only visible at the bottom last page; fields with total values ​​for all records included in the report are placed here. The report can be created using the Report Wizard or in Design mode. Usually both methods are used. The Report Wizard allows you to speed up the process of creating a report; work in it is done in step by step mode in dialogue with the user. You can modify the report created by the wizard in Design mode.

    The Data Region section can contain calculated fields that are used to display the values ​​of expressions based on source data in reports.

    In Design mode, report properties such as Sorting and Grouping data are available, which are located on the report and form designer toolbar. In the Sort and Group dialog box, you can define the field or expression by which the data will be grouped, and you can sort the grouped data in ascending or descending order. Access 2000 allows you to group data in two ways - by category and. by a range of values, which can be either numeric or alphabetical.