Crystal Reports Online Training

Learn Online, Anytime, Anywhere

Step-by-step online tutorials.

2.04 Setting Report Options

Setting Report Options

After setting the options for customizing the report design experience, the next step is customizing the settings for an individual report. There are different options that affect a report’s behavior and how it is printed. These options are based upon how the report is to be used.

Page and Printer Options

The first aspect of a report that needs to be decided is the page size and orientation. These properties are set with the Page Setup dialog box. Click on the menu options File > Page Setup.



Figure 2-5. Page Setup properties.

The Page Setup dialog box is pretty self-explanatory. In fact, it’s similar to the Printer Page dialog box you see in most Windows applications. The first two options set the paper size (Letter, A4, etc.) and the printer’s paper bin. The options after that set the paper orientation (portrait, landscape) and the margins.

The last option is the most interesting of them all: No Printer. Even though you assume most reports will be sent to a printer, there are times when it’s beneficial to not specify a default printer. Let’s look at how this works.

We first need to talk about printer drivers. Although you might assume that each report will look the same no matter which printer it is printed on, this isn’t the case. Each printer has a software driver associated with it that determines how something gets printed. There are very small differences between each type of printer and that can change the output just slightly. Although this probably seems insignificant right now, when you are creating reports that require each object to be in a precise location on the paper (e.g. forms based reports), even a small variation can have a big impact. Another time this is important is when a report tries to print so much data on a single page that you try to squeeze everything down to fit. You shrink the report so that when it prints on your printer everything is sized perfectly. But then you distribute the report to the rest of the company and people start complaining that the digits of some numbers are getting chopped off. When you investigate the problem you find that they have a different type of printer than you do and the fonts are slightly different than your printer. This wastes all the time you spent sizing everything perfectly. In some circumstances you will find that the person has the same printer as you do, but they haven’t downloaded the latest printer drivers like you did and this messes things up as well. So you can see how print drivers can have a big impact on a report’s output.

There are two options for using the No Printer setting. When it is checked, the report is optimized to be displayed on the screen. When the No Printer option is not checked, the report uses your computer’s default printer driver to display the report preview. This gives a more accurate representation of how it will look when printed on your specific printer. If there is a specific network printer that everyone in the office uses, click the Printer button and select that printer from that list. This optimizes the report to be printed on the office printer. If you want to use a type of printer that your users have but you don’t have access to, you need to at least install the printer driver so that Crystal Reports can use it for the report preview. Although you won’t personally print on that type of printer, Crystal Reports will format the report just for that printer driver.

Please note that all this worrying about printer drivers is overkill if your reports are printing fine. This is only a concern when precise placement of report objects is required and people are complaining that their reports don’t look quite right. Then you can go back to these printer settings and test whether changing them improves the output or not.

If your users all have different types of printers then it is sometimes best to choose the No Printer option. By telling Crystal to not format the report according to one particular type of printer then you aren’t locking the report into a specific printer driver. Setting the No Printer option keeps the formatting generic enough so that the report prints fine on all types of printers. This can be your best bet for solving those tough printer problems.

Summary Info

Each report has summary information associated with it. This makes it easy to determine who designed the report and what its purpose is. The Document Properties dialog box is where you enter this information. Open it by selecting the menu options File > Summary Info.



Figure 2-6. The Document Properties dialog box sets the summary info.

The fields you can enter information for are: Author, Keywords, Comments, Title and Subject. Entering good descriptions into the Comments and Subject fields makes it easier for someone else to look at the report and quickly see what the report does. Entering your contact information into the Author field makes it easy for them to locate you for more information.

One interesting benefit of entering summary info is that it is displayed in the Open File dialog box. This makes it easy to find out about a report and see a preview of it before opening it. Considering that report file names sometimes use cryptic abbreviations, this makes it easier to determine which report to open. Enabling this feature of the Open File dialog box is discussed later in the chapter.

The Save Preview Picture checkbox sets whether or not to save a snapshot of the first page of the report with the report file. If a preview picture is saved, you will see a snapshot of the report when opening a file.

Miscellaneous Report Options

The last location for setting report options is the Report Options dialog box. It lets you set a variety of different options such as database optimization settings, using report alerts, the handling of grouping data, etc. I hesitate to mention this dialog box at this point in the book because all these options are advanced settings and aren’t appropriate for an introductory chapter. They are all discussed within the appropriate chapters later in the book. However, just so that you see what I’m talking about, you can get to the Report Options dialog box by selecting the menu options File >Report Options. It is shown in Figure 2-7.



Figure 2-7. The Report Options dialog box.