2. Creating Reports
Reports are the best way to put information
from database onto paper, PDF files, and other
formats.
In a report, you can choose how to display data,
including:
− Information to include to print each field on
the page.
− Text fonts, font sizes, spacing.
− Printing lines, boxes, and pictures.
3. Creating Reports
Creating Reports Automatically:
− Select a table in the navigation pane
− Choose Create ➝ Reports ➝ Report. This
command creates a tabular report with a
separate column for each of table’s fields.
4. Creating Reports
Building a Report in Layout View:
− Choose Create ➝ Reports ➝ Blank Report.
− Pick table in the Field List.
− Add columns to the report.
− Resize the columns smaller or larger until you
have the balance.
− Add any other elements like a title, a logo,
page numbers, and the date.
− Format report like changing fonts, colors,
borders Preview report.
5. The Many Views of a Report
Layout View: Shows the report look
like when printed, with the real data
from the table.
Report View: same as Layout view, but
doesn’t let make changes.
Print Preview: like Layout view and
Report view, you can figure out how
many pages printout needs and where
the page breaks.
Design View: Shows a template view
where can define the different sections
of report.
6. Export Formats
Exporting a Report to a PDF:
− Switch to Print Preview mode.
− Click Print Preview ➝ Data ➝ PDF or XPS.
− Choose your file name, file type, and quality.
− Click Publish to perform the export.
− Choose whether you want to save your export
settings Close.
7. Export Formats
Exporting a Report to a Different Format:
− Switch to Print Preview mode.
− Click one of the buttons in the Print Preview
Data section, depending on the format you
want to use for your export.
− Choose a name for the destination file.
− Click OK to perform the export.
8. Formatting a Report
Applying a Theme:
−The quickest way to apply
formatting is to use themes
from the Report Layout Tools |
Design ➝ Themes ➝ Themes
list.
−Can use the same combination
of fonts and colors in different
reports by Select Report Layout
Tools DesignThemesFonts
Create New Theme Fonts.
9. Formatting Columns and Column
Headers
Select the portion of the report you want to
format.
In the Report Layout Tools Format ➝ Font
section.
10. Formatting numeric fields
Use the Report Layout Tools | Format➝Number
section adjust numeric fields.
− General Number
− Currency
− Euro
− Fixed
− Standard
− Percent
− Scientific
11. Gridlines
To add gridlines everywhere to keep data
carefully in separate cells or just add gridlines
to highlight important columns.
− Select the part of the report need apply
gridlines.
− In Report Layout Tools Arrange Table
Gridlines list
− Use the other buttons in the Report Layout
Tools Arrange Gridlines menu to change
the thickness, color, and style of gridlines.
12. Borders, Margin and padding
Borders can be attached to any ingredient in
report.
− Selecting the portion of report
− In Report Layout Tools Format Control
Formatting Shape Outline.
The margin is the space between the content and
the border around it.
The padding is the space between the border and
the edge of the cell.
− To change the margin and the padding space,
select Report Layout Tools format Arrange
Position
13. Conditional Formatting
With conditional formatting, you can
emphasize pieces of information with different
formatting:
− Select a value in the column where you want
to apply the conditional formatting.
− Choose Report Layout Tools Format
Control Format Conditional Formatting.
− Choose Report Layout Tools Format
Control Format Conditional Formatting.
14. Conditional Formatting
− Click New Rule to create a new conditional
formatting rule.
− Set the condition that Access should evaluate.
− Set the formatting that Access should apply if
the condition is true OK.
− (Tham khảo thêm Data Bars)
15. Advanced Reports
The Design View Sections:
− Report Header: appears once at the
beginning of report, on the first page. This
section contains titles, logos.
− Page Header: appears at the top of each
subsequent page. It’s the place to add page
numbers, column headers of tabular reports.
− Detail: appears once after the page header, it’s
the heart of all reports. Detail section is
repeated once for each record in your report.
16. Advanced Reports
− Page Footer: appears at the bottom of each
page.
− Report Footer: appears once at the end of the
report. It is used to print summary
information, copyright statements, the date of
printing, and other miscellanea.
17. Creating a Report in Design View
Choose Create Reports Report Design.
Choose Report Design Tools Design Tools
Add Existing Fields.
Drag the fields from the Field List into the
Detail section.
Move the field to the right place, and then
resize it to the right size.
Format the controls
Insert the appropriate content into report
header or footer save report.
18. The Report Wizard
The Report wizard asks a few basic questions,
and then creates the corresponding report.
− Choose Create Reports Report Wizard.
− From the drop-down list, choose the table you
want to use.
− Add the fields you want to include Next.
− Choose the field use to sort report results
Next.
− Choose a layout option for report.
− Choose a orientation for report Enter
report name Finish.
19. Format Reports with Properties
To format report use Property Sheet:
− Select Report Design Tools Design Tools
Property Sheet.
− Format: contains the options for the
formatting report.
− Data: identifies where the control gets its
information.
− Event: attach Visual Basic code that springs
into action when something specific happens.
20. Format Reports with Properties
− Other: includes the Name property, which
defines the control name, and a few
Miscellaneous properties
− All: shows the whole properties.
21. Grouping
Grouping is an indispensable tool for making
sense of large volumes of data by arranging
them into smaller groups.
There are three ways to use grouping to analyze
information in a report:
− Use grouping with a query
− Use report grouping.
− Use subreports.
22. Report Grouping
Switch to Layout view or Design view. Then,
choose the field you want to use for sorting.
To apply a sort, right-click the field you want to
use for sorting, and then choose a sort
command.
Right-click the field you want to use for
grouping, and then select Group On Access
sorts results by that field, and then groups
them.
23. Group, Sort, and Total Pane
With Group, Sort, Total Pane, you have many
more options:
− Add an extra layer of sorting that sorts each
subgroup.
− Can perform summary calculations for each
group.
− You can force page breaks to occur at the start
of each new group.
24. Group, Sort, and Total Pane
To use “Group, Sort, and Total” Pane:
− Show report in Design view, choose Report
Design Tools Design ➝ Grouping & Totals
Group & Sort.
− In Layout view, choose Report Layout Tools
Design Grouping & TotalsGroup & Sort.
− The “Group, Sort, and Total” pane appears at
the bottom of the window.
25. Group, Sort, and Total Pane
− Sort by …: Chooses the field that’s used for
sorting.
− Group on …: Chooses the field that’s used for
grouping.
− With A on top/from smallest to largest:
Changes the sort order, depends on the data
type.
− By entire value: Tells Access to create a
separate group for every different value in the
grouped field.
26. Group, Sort, and Total Pane
− With … totaled: Subtotals is the most popular
grouping feature.
− With a header section/with a footer
section: apply a header at the beginning of
each group, and a footer at the end.
− Keep group together on one page: This
setting helps you prevent orphaned category
headers.
27. Multiple Groups
To add another level of grouping, just right-
click the field you want to use, and then click
Group On. This adds it to the list in the “Group,
Sort, and Total” pane.
Each group you add can have a header and
footer section and its own set of totals.