Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
CRW_REF.PDF
Скачиваний:
5
Добавлен:
13.02.2015
Размер:
13.99 Mб
Скачать

Activate the printer you want to use if it is not already the active printer. Your paper size options are directly related to the printer you have selected.

For example, the HP LaserJet driver (PCL) offers a choice of letter, legal, executive or A4 paper sizes, whereas the PostScript printer driver lets you choose from letter, legal, note, A4, B5, letter small, and A4 small paper sizes.

!Select either Portrait or Landscape orientation by clicking the appropriate option button in the Orientation section.

"Select the paper size desired and its source from the dropdown boxes in the Paper section.

# Click OK when finished.

HANDS-ON (Conditional Formatting)

How to create a footer that appears on all pages but the first

You can print a page footer on all pages except the first page. You do this by formatting the page footer section conditionally using an on or off property.

244

Seagate Crystal Reports User’s Guide

Place the field you want to display as a page footer in the Page Footer section of your report.

Click the SECTION EXPERT button on the standard toolbar. The Section Expert appears.

3 Highlight the Page Footer

4 Click the Conditional Formula button

section from this list.

to the right of the Suppress property to

 

 

 

open the Formula Editor.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

#Enter the following formula in the Formula text box:

PageNumber = 1

This formula suppresses the section on the first page but not on any of the other pages.

$Click the Accept button.

If there is an error in your formula, a Formula Compiler Error will be displayed detailing your error.

If there is no error in your formula, you will be returned to the Section Expert. Notice that the Formula button has changed. This indicates that a formula has been entered for that property.

Search for Formula Compiler Errors in Seagate Crystal Reports online Help.

Formatting

245

%Click the PREVIEW button on the standard toolbar to preview your report ensuring that the page footer appears on all pages but the first.

NOTE: If you have a multi-line page footer and you have put the lines into separate Page Footer sections, you will need to suppress each of those sections conditionally using the formula above.

NOTE: To create a page header that appears on all pages but the first, put your header information in the Page Header section and then suppress that section conditionally using the same formula that was used for suppressing the Page Footer section.

How to flag values that meet certain conditions

You can flag field values that meet certain conditions by formatting the field conditionally using an attribute property.

For the purpose of this example, assume you have a Last Year’s Sales field in your report and you want the value to print in Red if sales were less than $10,000 and to print in Black in all other cases. In this way you are using color to flag values that fall below a certain threshold.

Right-click the Last Year’s Sales field and choose the FORMAT FIELD command from the shortcut menu that appears. The Format Editor appears. Click the Font Tab to activate it.

246

Seagate Crystal Reports User’s Guide

2 Click the Conditional Formula button to the right of the Color drop-down box to open the Formula Editor.

!Enter the following formula in the Formula text box:

If {customer.LAST YEAR’S SALES} < 10000 Then Red

Else Black

See How to create if-then-else formulas, Page 346.

"Click the Accept button.

If there is an error in your formula, a Formula Compiler Error will be displayed detailing your error.

If there is no error in your formula, you will be returned to the Section Expert. Notice that the Formula button has changed. This indicates that a formula has been entered for that property.

Search for Formula Compiler Errors in Seagate Crystal Reports online Help.

# Click OK to return to your report.

Now, when you run your report, if the value in the Last Year’s Sales field is less than $10,000, the value will print in red.

Formatting

247

248

Seagate Crystal Reports User’s Guide

11 Record and Group Selection

What you will find in this chapter...

Record selection, Page 250

Group selection, Page 254

Record selection formula templates, Page 256 HANDS-ON (Record Selection)

Record and Group Selection

249

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]