Crystal Reports Online Training

Learn Online, Anytime, Anywhere

Step-by-step online tutorials.

1.12 The Design Tab and Preview Tab

The Design Tab

If creating reports were an art, the Design tab would be your canvas. It’s where you place the report objects, change colors or fonts, and set the layout of the report. The details of using the Design tab to create reports are the covered throughout this whole book. For now we will just look at the basics.

Along the left side of the designer is a gray area that lists each section name. A basic report always has the sections Report Header, Page Header, Details, Page Footer, and Report Footer. Later in the book, you’ll see how to work with sections to create advanced reports.

Along the left and top border of the designer are rulers that are used for positioning objects on the report. The default units that the ruler displays are controlled by the regional settings of your operating system. For example, if the regional setting is ‘English (United Kingdom)’ then the ruler is in centimeters. Most people won’t need to worry about changing this setting unless you are a working on reports to be used in different countries.

Notice the little triangles along the top ruler? These are markers for guidelines. By attaching report objects to a guideline, you can reposition the guideline and all the attached objects move with it. This lets you place multiple objects along the same column and if you need to move the column then all the objects will stay lined up. Guidelines are discussed in more detail in the next chapter.

The center of the designer shows the report sections and the objects within each section As you move the cursor around the design area you’ll notice that the outline of each object is highlighted as the mouse passes over it. For a complex report with many overlapping objects, this lets you clearly identify the boundary of each object.

The Preview Tab

The Preview tab shows you what the report looks like when sent to the printer. This makes it easy to see if what you built in the designer meets your expectations. The Preview tab uses actual data so that you have an accurate presentation.



Figure 1-9. Previewing a report with the Preview tab.

The leftmost portion of the preview tab is the Group Tree window. This shows you all the groups in the report. Click the + sign next to the group name to expand the sub-groups or see the detailed records.

The top-right portion shows the navigation toolbar. By clicking on the arrows, you can navigate to the next page, the previous page or even jump to the first or last page in the report. There is also a button to refresh the report data, as well as stop querying the database for new data (this is useful when a report is taking too long to load and you want to cancel it).

An interesting aspect of the Preview tab is that it lets you make changes to the report as if you were still in the designer. It only allows for simple changes, but you can make changes nonetheless. For example, you can move an object around the report and immediately see the effects on all the pages. You can also change the formatting of each object. Making changes while previewing the report is much faster than switching back and forth between design and preview modes.

Since the Preview tab allows changes to be made, it has a few aspects in common with the Report Designer. Along the left side of the preview window are the section names. This lets you see which section each report objects is in. This is helpful for complex reports that have nested groups, as well as sections that are conditionally hidden. Being able to determine which section a report object is displayed in lets you see whether groups are displaying the proper data or to see if sections are being hidden at the appropriate time.

Along the top and left edges of the Report Preview is the ruler. Since you can move objects around the report in preview mode, it makes sense to see their exact location on the ruler. This is especially useful for reports used with pre-printed forms where proper placement is critical.

One problem I’ve always had with the Preview tab is that it shows the report within the designer. Unlike other programs (e.g. MS Word), it doesn’t use the full screen and the report is still surrounded by the various toolbars, windows, etc. This makes it difficult to review densely formatted reports because you have to shrink it down to get it to fit within the preview area. Luckily, as I was finishing this book, Business Objects announced the beta release of a new .RPT viewer program as a free download. “Crystal Reports Viewer” lets you preview a report using the full area on your computer screen and makes it much easier to read large reports. See their website for more information on when it will be ready.