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

About Section Names

The following topics are discussed in this section.

Introduction, Page 221

Methodology, Page 222

StrToSectionCode, Page 223

Introduction

Section names in the Crystal Reports VCL are now the same as the shortened section names used in the Crystal Report Designer. The following prefixes are used for the different possible sections:

RH

= Report Header

 

 

PH

= Page Header

 

 

GH

= Group Header

 

 

D

= Details

GF

= Group Footer

 

 

PF

= Page Footer

 

 

RF

= Report Footer

 

 

Group Headers and Footers also have a number associated with the prefix, which specifies to which Group they belong, starting with the number 1 for the first Group:

GH1

=

Group Header for Group 1

 

 

 

GF2

=

Group Footer for Group 2

If a Section has been divided into multiple Sub-Sections, these are specified by alphabetic letters going from a to z and then aa to zz, and so on.

GH1a

=

Group Header 1, sub-section a

GF2b

=

Group Footer 2, sub-section b

 

 

 

If the Retrieve method is used for the properties such as SectionFormat and AreaFormat, the Section property will automatically be calculated and filled by the VCL Component. If the manual Add/Delete methods are used, the Section will have to be assigned manually.

Seagate Crystal Visual Component Library

221

Methodology

The Crystal Reports Print Engine uses the following numbering division:

1000 for each main section

25 for each sub-section

0 to 24 for each Group For example:

1000 is used for the report Header

2000 for the Page Header

3000 for the Group Header, etc. Groups can be from 0 to 24, so:

Group Header 1 is 3000 Group Header 3 is 3002, etc.

Sub-sections are divided by 25, so: Group Header 1a is 3000 Group Header 2b is 3026, etc.

This means a possible 40 divisions of 25 for each Section, since 40 * 25 = 1000. Therefore the print engine cannot access more than 40 sub-sections at runtime. Since the VCL Component uses the runtime print engine, it also has this limitation. While this is not usually a problem with most reports, the limit is reached if a report contains more than 40 Detail sections, for example. In such cases, the VCL Component will only retrieve the first 40 sections.

Using the information spelled out above, a simple example of the sections of a report, with their corresponding section code numbers is illustrated below:

Area / Sections

Area / Section Numbers

Report Header

1000

Report Header a

1000

Report Header b

1025

Page Header

2000

Page Header a

2000

Page Header b

2025

Seagate Crystal Visual Component Library

222

Group Header 1

3000

Group Header 1a

3000

Group Header 1b

3025

Group Header 1c

3050

Group Header 2

3001

Group Header 2a

3001

Group Header 2b

3026

Group Header 2c

3051

Details

4000

Details a

4000

Details b

4025

Group Footer 2

5001

Group Footer 2a

5001

Group Footer 2b

5026

Group Footer 2c

5051

Group Footer 1

5000

Group Footer 1a

5000

Group Footer 1b

5025

Group Footer 1c

5050

Page Footer

7000

Page Footer a

7000

Page Footer b

7025

Report Footer

8000

Report Footer a

8000

Report Footer b

8025

StrToSectionCode

The StrToSectionCode function is used internally by the Seagate Crystal Reports Component, but it is also a public method and can be used by programmers. It's purpose is to take a Section name from one of the component's Section properties and turn it back into a Print Engine Section code. This function is also used by those objects that have a SectionAsCode property.

Seagate Crystal Visual Component Library

223

Соседние файлы в папке crystal