If the report area has been split into more than one section, sectionNumber indicates which section within the area you are using. This value is a zero (0) based index. In other words, the first section in an area is 0, the next section is 1, etc.
Note: The macro PE_SECTION_CODE calculates and returns the section code number; it does not return an error code.
The following example demonstrates how to obtain a section code using the PE_SECTION_CODE macro. The section code obtained here is for the second section in the Group Header 1 area:
code = PE_SECTION_CODE(PE_SECT_GROUP_HEADER, 0, 1);
PESetSectionFormat(job, code, &mySectionOptions);
In this case you pass the section type (PE_SECT_GROUP_HEADER), the group number (since this is the first group, use the zero indexed group number 0) and section number (since this is the second section in the Group Header, use the zero indexed section number 1). The program uses the encoding macro and returns a section code which is then passed in the PESetSectionFormat call.
When using PE_ALLSECTIONS in your macro, code can be written in one of
two ways:
code = PE_SECTION_CODE(PE_ALLSECTIONS, 0, 0);
// the code value returned is 0 - NOT an error code
PESetSectionFormat(job, code, &mySectionOptions);
or, you can eliminate using the macro all together:
PESetSectionFormat(job, PE_ALLSECTIONS, & mySectionOptions)
Note: The maximum number of groups is 25 (possible values of 0 to 24). The maximum number of sections is 40 (possible values of 0 to 39).
| Seagate Software IMG Holdings, Inc. http://www.seagatesoftware.com Support services: http://support.seagatesoftware.com |