Crystal Reports Online Training

Learn Online, Anytime, Anywhere

Step-by-step online tutorials.

2.08 Setting the Designer’s Defaults

Setting the Designer’s Defaults

The report designer is where you will spend all your time creating reports and modifying them. There are many different default settings that you can set that control how you interact with the report designer as well as controlling how you access and display data on a report. Knowing what the different options are will not only make you more efficient, but it can also save you a lot of headaches. It is very likely that once you set these default values you will not come back to this step. However, when starting a new application, it would be beneficial to set the default values for how different report objects are displayed. For example, if you decide to always make group headers a certain font, then you can set that to be the default and you won’t have to modify it every time.

To modify the default settings, right-click anywhere on the report and select Designer/Default Settings. The Default Settings dialog box appears. There are seven different tabs that control the default settings. Each tab affects different parts of the designer and report output.



Figure 2-13. The Default Settings dialog box.

The Layout Tab

The Layout tab effects your interaction with the report designer. The Field Options frame sets how fields are shown on the designer. You have the option of showing the names of the fields that are being displayed, the names that were assigned to each object, or format symbols. Showing the format symbols is useful for seeing how the different numbers will be formatted and seeing the maximum width that a string can use.

The Grid Options frame will be discussed in the Adding, Resizing and Moving Controls section. It lets you turn the grid markers on and off and set whether objects must align with them. The View Options frame sets what is shown in design mode.

The Database Tab

The Database tab effects how items are displayed in the Field Explorer and it has settings for tweaking performance. See Figure 2-14. The settings for changing the Field Explorer are many. They consist of deciding what types of objects are to be displayed and how the items will be sorted.



Figure 2-14. The Database tab.

Performance related settings are listed in the Advanced Options frame. The setting to use indexes on the server is set by default. Using indexes on the server gives you better performance because the server is optimized for doing this. The other performance related setting is to perform grouping on the server. Just like performing indexes on the server is faster, so is having the server do the grouping. Unfortunately, you can only use this option for accessing SQL tables directly. It isn’t available when reporting off queries.

The Editors Tab

The Editors tab modifies those fonts that the Formula Editor and SQL Expression Editor use to display the programming code. You are free to customize the different programming elements to your heart’s content.

The Data Source Defaults Tab

The Data Source tab lets you specify a default folder for where the database files are located. This is used with the Data tab of the Report Expert. When selecting Database Files it will display the Open dialog box and default to the folder you specified.

The Reporting Tab

The Reporting tab affects the output of your reports. See Figure 2-15. The top frame lets you set how data is read from the data source. You can automatically convert DateTime data to a String, a Date, or keep it as a DateTime data type. See Chapter 8 for a discussion of the date data types. Within this frame you can also convert NULL fields to their default value. This is very useful for ensuring that numeric fields are printed as a zero and not an empty field.



Figure 2-15. The Reporting tab.

The bottom frame contains miscellaneous options. Reports can save their data so that they don’t have to reload and process the records every time (this really improves printing speed). If you want your reports to discard the old data and always re-query the data source for the latest data, then turn the option on. You can also tell it to re-import subreports so that they are always refreshed when printing a report.

You can set whether drill-down reports will show the column names for the drill-down data. A preview picture (thumbnail) can be saved every time you run a report. The last option lets you set the default formula language as discussed in Chapter 8.

The Fields Tab

Every data type that can be displayed on a report has a default display format. For example, the default for displaying a number is to use two decimal places. The Fields tab lets you set the default formats for all the available data types (see Chapter 8 for a list of data types). By changing the default here, every new object that is added to your report after changing the default will use this setting. Any objects that were added before you made the change will not reflect the new format.

The Font Tab

Just as the Fields tab sets the default format for the different data types, the Font tab sets the default font for the different fields on a report. For example, you can make field titles appear in italics while group names appear in bold. Once again, these changes will only affect objects that are added after you make your changes.