Crystal Reports Online Training

Learn Online, Anytime, Anywhere

Step-by-step online tutorials.

1.11 The Field Explorer

The Field Explorer

The Field Explorer gives you a list of all the available database fields, formulas, parameters, summary fields and special fields. The Field Explorer serves two purposes. First is that you can see and edit the different fields on the report. For example, the Database Fields category shows you which fields are part of the data source that the report uses. The Parameter Fields shows you which parameters the user will be asked to enter when the report runs. When given a report that was designed by someone else, you can scroll through this list and get a good idea of what the purpose of the report is and determine its complexity. The second purpose of the Field Explorer is for adding objects to the report. By dragging and dropping a field from the Field Explorer to the report designer, the object is added to the report. You will become very familiar with the Field Explorer because it is the primary means of building reports.



Figure 1-8. The Field Explorer tab shows the fields that are available for printing.

The Field Explorer also makes it easy to add Special Fields that you otherwise might forget are available (e.g. Page N of M, Current Date, Report Title, etc.). These are the last items listed in this window. Make sure you familiarize yourself with this list before building a report.

Another benefit of the Field Explorer is that it puts a check next to the fields used on the report. You can quickly see which fields have been added to the report and which ones are unused. You might find it interesting to know that it puts a check next to a field that isn’t directly used on the report, but is being used in a report formula. For example, say you create a formula that uses the Customer ID field. Once you place the formula onto the report, a check appears next to the Customer ID field.

Personally, I would like to be able to click on a field and have it show me where the field is located on the report. This would be similar to how Report Explorer navigates to selected objects, but with the Field Explorer I don’t have to know which section an object is located in prior to selecting it. Maybe we’ll see that in a future version?

Have you ever worked on a report that someone else designed and you aren’t familiar with the fields in the database or the data they contain? The Field Explorer lets you query the database and see the values stored in each field. Right-click on the database field you want to examine and select Browse Data. A window pops up that tells you the field’s data type and lets you scroll through the data stored in that field. If you just want to see the data type of a field, right-click on the field and select Show Field Type.

My favorite part of the Field Explorer is that you can have it automatically list the data type of every field next to its name. I find it difficult to remember the data type of fields and this feature eliminates that problem. Just right-click on the Database Fields category and select Show Field Type.

Along the top of the Field Explorer window are shortcut buttons for common tasks. These buttons are enabled or disabled depending upon whether they are compatible with the object currently selected. The first button, Insert To Report, lets you drop the report object onto the report. This is an alternative to dragging and dropping the object onto the report. The second button, Browse, is enabled when a database field is selected. It lets you browse the field data as mentioned previously. The remaining buttons are used for creating and editing formulas and parameters. The buttons let you add a new object, edit an existing object, or delete it altogether.