006.report

28
Printing Reports

Transcript of 006.report

Printing Reports

Creating Reports

Reports are the best way to put informationfrom database onto paper, PDF files, and otherformats.

In a report, you can choose how to display data,including:

− Information to include to print each field onthe page.

− Text fonts, font sizes, spacing.

− Printing lines, boxes, and pictures.

Creating Reports

Creating Reports Automatically:

− Select a table in the navigation pane

− Choose Create ➝ Reports ➝ Report. Thiscommand creates a tabular report with aseparate column for each of table’s fields.

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 youhave 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.

The Many Views of a ReportLayout View: Shows the report looklike when printed, with the real datafrom the table.

Report View: same as Layout view, butdoesn’t let make changes.

Print Preview: like Layout view andReport view, you can figure out howmany pages printout needs and wherethe page breaks.

Design View: Shows a template viewwhere can define the different sectionsof report.

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 exportsettings Close.

Export Formats

Exporting a Report to a Different Format:

− Switch to Print Preview mode.

− Click one of the buttons in the Print PreviewData section, depending on the format youwant to use for your export.

− Choose a name for the destination file.

− Click OK to perform the export.

Formatting a Report

Applying a Theme:

−The quickest way to applyformatting is to use themesfrom the Report Layout Tools |Design ➝ Themes ➝ Themeslist.

−Can use the same combinationof fonts and colors in differentreports by Select Report LayoutTools DesignThemesFontsCreate New Theme Fonts.

Formatting Columns and Column Headers

Select the portion of the report you want toformat.

In the Report Layout Tools Format ➝ Fontsection.

Formatting numeric fields

Use the Report Layout Tools | Format➝Numbersection adjust numeric fields.

− General Number

− Currency

− Euro

− Fixed

− Standard

− Percent

− Scientific

Gridlines

To add gridlines everywhere to keep datacarefully in separate cells or just add gridlinesto highlight important columns.

− Select the part of the report need applygridlines.

− In Report Layout Tools Arrange Table Gridlines list

− Use the other buttons in the Report LayoutTools Arrange Gridlines menu to changethe thickness, color, and style of gridlines.

Borders, Margin and padding

Borders can be attached to any ingredient inreport.− Selecting the portion of report− In Report Layout Tools Format Control Formatting Shape Outline.

The margin is the space between the content andthe border around it.

The padding is the space between the border andthe edge of the cell.− To change the margin and the padding space,select Report Layout Tools format Arrange Position

Conditional Formatting

With conditional formatting, you canemphasize pieces of information with differentformatting:

− Select a value in the column where you wantto apply the conditional formatting.

− Choose Report Layout Tools Format Control Format Conditional Formatting.

− Choose Report Layout Tools Format Control Format Conditional Formatting.

Conditional Formatting

− Click New Rule to create a new conditionalformatting rule.

− Set the condition that Access should evaluate.

− Set the formatting that Access should apply ifthe condition is true OK.

− (Tham khảo thêm Data Bars)

Advanced Reports

The Design View Sections:

− Report Header: appears once at thebeginning of report, on the first page. Thissection contains titles, logos.

− Page Header: appears at the top of eachsubsequent page. It’s the place to add pagenumbers, column headers of tabular reports.

− Detail: appears once after the page header, it’sthe heart of all reports. Detail section isrepeated once for each record in your report.

Advanced Reports

− Page Footer: appears at the bottom of eachpage.

− Report Footer: appears once at the end of thereport. It is used to print summaryinformation, copyright statements, the date ofprinting, and other miscellanea.

Creating a Report in Design View

Choose Create ReportsReport Design.

Choose Report Design Tools Design ToolsAdd Existing Fields.

Drag the fields from the Field List into theDetail section.

Move the field to the right place, and thenresize it to the right size.

Format the controls

Insert the appropriate content into reportheader or footer save report.

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 youwant to use.

− Add the fields you want to includeNext.

− Choose the field use to sort report resultsNext.

− Choose a layout option for report.

− Choose a orientation for report Enterreport name Finish.

Format Reports with Properties

To format report use Property Sheet:

− Select Report Design Tools Design Tools Property Sheet.

− Format: contains the options for theformatting report.

− Data: identifies where the control gets itsinformation.

− Event: attach Visual Basic code that springsinto action when something specific happens.

Format Reports with Properties

− Other: includes the Name property, whichdefines the control name, and a fewMiscellaneous properties

− All: shows the whole properties.

Grouping

Grouping is an indispensable tool for makingsense of large volumes of data by arrangingthem into smaller groups.

There are three ways to use grouping to analyzeinformation in a report:

− Use grouping with a query

− Use report grouping.

− Use subreports.

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 touse for sorting, and then choose a sortcommand.

Right-click the field you want to use forgrouping, and then select Group On Accesssorts results by that field, and then groupsthem.

Group, Sort, and Total Pane

With Group, Sort, Total Pane, you have manymore options:

− Add an extra layer of sorting that sorts eachsubgroup.

− Can perform summary calculations for eachgroup.

− You can force page breaks to occur at the startof each new group.

Group, Sort, and Total Pane

To use “Group, Sort, and Total” Pane:

− Show report in Design view, choose ReportDesign Tools Design ➝ Grouping & Totals Group & Sort.

− In Layout view, choose Report Layout ToolsDesign Grouping & TotalsGroup & Sort.

− The “Group, Sort, and Total” pane appears atthe bottom of the window.

Group, Sort, and Total Pane

− Sort by …: Chooses the field that’s used forsorting.

− Group on …: Chooses the field that’s used forgrouping.

− With A on top/from smallest to largest:Changes the sort order, depends on the datatype.

− By entire value: Tells Access to create aseparate group for every different value in thegrouped field.

Group, Sort, and Total Pane

− With … totaled: Subtotals is the most populargrouping feature.

− With a header section/with a footersection: apply a header at the beginning ofeach group, and a footer at the end.

− Keep group together on one page: Thissetting helps you prevent orphaned categoryheaders.

Multiple Groups

To add another level of grouping, just right-click the field you want to use, and then clickGroup On. This adds it to the list in the “Group,Sort, and Total” pane.

Each group you add can have a header andfooter section and its own set of totals.

Multiple Groups