Previewing and Saving a Report

Objectives

After completing this lesson, you will be able to:

  • Preview a report
  • Save a report

Report Preview

Once you have placed data fields on your report, you are ready to preview your design. There are several methods to display the Preview tab if it is not already visible:

  • Choose Print Preview.

  • Choose Preview Sample.

  • Refresh the report.

The program gathers the data, makes the necessary calculations, and displays the report in the Preview tab. With the data in place, you can review the spacing and formatting of your report and see the actual results of all your summaries, formula calculations, and record and group selections.

The program works with data in this manner:

  • The first time the Preview tab is used, it retrieves data from your underlying data source(s) and saves it with the report (unless you choose the option not to save data with the report).

  • From that point on, the program uses the saved data whenever you preview the report unless you specifically refresh it or add additional data that requires the program to retrieve new data.

When you save data with a report, the data is saved in a cache file with the report.

Note
You retain full design capabilities in the Preview tab.

Comparing Design and Preview Tabs

Working in Design and Preview tabs is very similar for many of the tasks. As you gain more experience, you will develop preferences for working in one or the other.

Often, you will find it easier to work in the Design tab when working with multiple sections and areas. You may sometimes want to work in the Preview tab where you can see the effects of your changes instantly and how the report will be printed.

You have the same formatting capabilities in the Preview tab as you do in the Design tab. Menus (both menu bar and shortcut menus) and toolbar remain active, providing essentially the same functionality that you have when working with a report in the Design tab. However, when you are making numerous changes, it may be quicker to make the changes in the Design tab.

Differences Between the Design and Preview Tabs

DesignPreview
Individual section rulersSingle vertical ruler
Section names appear only onceSection names are repeated as necessary
No record counter, Data Age indicator nor Page controlsThe record counter, the Data Age indicator, and the Page controls are all active
Only a field placeholder representing the data is availableActual data is shown
The field frame is highlighted when selectedAll related data values are highlighted when selected
Changes are immediately reflected on screen when a change occurs to field placeholderMight experience slight delay before changes are fully rendered on the screen
Adding or inserting new objects is easier to perform as you can see all the objects and the entire report layout on one screenAdding or inserting new objects is more difficult to perform depending on the data contained within the report. Some sections may not be visible on the same screen or page (such as Page Footers and Report Footers) or reports that contain many records.
Sizing objects may truncate or allow too much space as the sizing will occur without visualizing actual data

Sizing objects is easier to visualize when seeing actual data on the screen

Formatting data may be more difficult to perform without visualizing dataFormatting data is easier to visualize using actual data
Manipulating Sections (split, merge, resize, insert, delete) is easier because section boundaries are clearly visibleManipulating Sections (split, merge, resize, insert, delete) is more difficult because section boundaries are not as clearly visible

Report Saving Options

The saving function is the same in Crystal Reports as in many other applications. The Open, Save, and Save As dialog boxes enable you to open or save a report conveniently to personalized folders that are created by your operating system. If one of these folders does not exist on your machine, the corresponding button will not be displayed.

The personalized folders are:

  • Desktop

    This folder contains the contents of your Windows Desktop.

  • My Documents

    This folder typically contains the History, Downloads, and various other folders.

  • Favorites

    This folder contains items that you previously saved as a favorite.

  • Enterprise

    If your company has deployed the Business Intelligence platform, you can log on to the system so that you can view the reports stored on the system.

  • My Connections

    This folder shows a list of data sources to which you are connected.

Report Saving Considerations

Note the following conditions:

  • By clicking the Save button, the original report is overwritten.

  • By clicking the Save As option, a COPY of the original report is now saved.

  • Even if the report name is identical to the original report and is placed in the same folder as the original report in the Business Intelligence platform, a new CUID (Cluster Unique Identifier) is generated and is therefore treated as a brand new object with no relationship to the original report.

  • It is recommended reports are developed, modified, and saved to a development or test/QA (Quality Assurance) system that contains sample data.

  • In the Business Intelligence platform, the administrator can use Promotion Management to copy the report from Dev → test/QA → Production.

  • In the Business Intelligence platform, the administrator can also use Version Management to preserve current and previous versions of the report.

Comparison of Refresh Versus Save Data in Record Selection

Reports with saved data are useful for dealing with data that isn't continually updated. When users navigate through reports with saved data, and drill down for details on columns or charts, they don't access the database server directly; instead, they access the saved data. Consequently, reports with saved data not only minimize data transfer over the network, but also lighten the database server's workload.

You can schedule these reports within the BusinessObjects Business Intelligence platform, so that they automatically refresh from the database on a predetermined basis. For example, if your sales database is only updated once a day, or once a week, then you can run the report on a similar schedule and save it with data. Sales representatives then always have access to current sales data, but they aren't hitting the database every time they open a report. Alternatively, you can refresh reports with saved data on an as-needed basis.

Discarding and Refreshing Data

Saved data is discarded and refreshed when you perform any of these tasks in a report:

  • Select the Refresh command

  • Change your database logon

  • Change the report's parameters

  • Add a new field that doesn't exist in the saved data

  • Drill down in a report where Perform Grouping On Server is selected and the details section is suppressed

  • Verify the database if the database structure has changed substantially

  • Change the linking parameter on a subreport (the subreport is refreshed).

  • Change the order of groups (only for reports in the Report Application Server)

To save data with a report, choose FileSave Data with Report, and then save the report.

Note
If the Save Data with Report option is checked, then it’s already active.

Refreshing Data in a Report

When you refresh a report that doesn't have saved data, Crystal Reports retrieves data from the database; otherwise, the program discards the report's saved data and retrieves new data.

By design, Crystal Reports only retrieves data when necessary. When you preview your report in the Preview tab, print the report, or export it to a file, the program runs your report and retrieves the required data. Once you are working with the data in the Preview tab, the program runs the report again and retrieves fresh data if you:

  • Add fields to the report after the report was run.

  • Add a formula that references a field that was not in the report when you ran it the first time.

  • Expand your record selection criteria to include more records than were needed when you first ran the report.

Aside from these circumstances, the program will not automatically refresh a report.

However, there may be times when you want to retrieve new data for the report. For example, you may have created a report several days earlier and you want to see it run with the most current data. Refreshing report data is intended for times such as this.

To refresh data, click Refresh on the Navigation Tools toolbar. Alternately, click ReportRefresh Report Data, or press F5 on the keyboard. The program runs your report and retrieves the required data.

Create and Save a New Report

Log in to track your progress & complete quizzes