|
Lesson 4 Reports.Reports can be created either using a Wizard or in Design View. Steps with a Wizard. Select Wizard and click New. Dialog Box appears. Click Report Wizard, give the file name. Select a table, in the next dialog, select the fields, and click next. You can group the report. In the Students table, you can group by Class and within class print all the names of the students. You can sort the names in ascending order of the last names.. Select one of the different options and choose portrait or landscape. Select Print Template. Change the Print Report Name if you want. Either choose preview or modify. This report requires refinement. Class Number should also have the Class Name, which is not in the Student Table. So we have to make a query with two cables, Class and Students and link the two tables by joining the two common fields in either table. See Class and Student Query Student Report in Design ViewClick on the left top square and get the report properties. Click Data Tab. Click on the drop down arrow, and select Student Query. Click Class Nr on the design form, and right click and get properties, get data and drop down the names of fields and select Class Name. In the detail change the position of the Student Nr to the left, by dragging. Rearrange the Last Name to the right and then preview the report. If all goes well, you save, or else start making more changes. Note the different headers: Page Header, Class Header etc. It is obtained by clicking the View and selection sorting and grouping. Class Nr has a group header, in which you change and put the Class Name. You can select Class Name here as well, by dropping down the list and selecting class name. But since you do not want the ascending list by class name but by number, it is better to leave it as it is. Report with Sub ReportsDesign ViewMain report has Date as a unique field. Prepare the report as the Calendar as the source. In the detail, click Sub report from the menu bar wizard and draw a rectangle in the detail space, and the wizard will point out the other reports you have prepared. Choose the one which has date, and define this link with the main form. Then for with the handles space the report. Creating Report with a Wizard
You can use Microsoft Access Help, and look for Contents. Go down to working with Reports, and learn more from there. Sub ReportsA sub report is a report that's inserted in another report. When you combine reports, one of them must serve as the main report. A main report is either bound or unbound; that is, it is or isn't based on a table, query, or SQL statement. Data from unrelated record sources in a main report with two sub reportsAn unbound main report can serve as a container for unrelated sub reports that you want to combine. Data from one record source in a main report and sub reportYou bind the main report to an underlying table, query, or SQL statement when you want to insert sub reports that contain information that's related to the data in the main report. For example, you can use the main report to show detail records, such as every sale in a year, and then use a sub report to show summary information, such as the total sales for each quarter. Create a sub reportHow you create a sub report depends on whether you want to create a sub report in an existing report or add an existing report to another existing report to create a report and sub report. Create a sub report in an existing reportIf the sub report will be linked to the main report, make sure you've set up the table relationships correctly before using this procedure.
When you click the Finish button, Microsoft Access adds a subreport control to your report. It also creates a separate report that is displayed as the subreport.
|