|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.crystaldecisions.sdk.occa.report.application.ReportSectionController
public class ReportSectionController
This object is used to add, remove, and set the properties for sections in the report. Each section belongs to a particular report area, and can contain different types of report objects.
Section objects are defined in the definition
package, and can be accessed by using the Area
object's getSections()
method.
ReportDefinition
object to retrieve the area that contains the desired report section. Pre-defined areas include
the ReportHeaderArea
, ReportFooterArea
, PageHeaderArea
,
PageFooterArea
, and DetailArea
. Area
object's getSections()
method to retrieve the section.
Field Summary | |
---|---|
static java.lang.String |
SECTION_PROP_FORMAT
Section format. |
static java.lang.String |
SECTION_PROP_HEIGHT
Section height. |
static java.lang.String |
SECTION_PROP_LINKEDURI
Section linked URI. |
static java.lang.String |
SECTION_PROP_NAME
Section name. |
static java.lang.String |
SECTION_PROP_WIDTH
Section width. |
Method Summary | |
---|---|
void |
add(ISection section,
IArea area,
int index)
Adds a section to a specified report area. |
void |
autoFitSections(java.lang.Object sectionObject)
Sets the height of all specified sections to minimum. |
int |
getMinSectionHeight(ISection section)
|
void |
remove(ISection section)
Removes an ISection object from the report. |
void |
reorder(ISection section,
int toIndex)
|
void |
setProperty(ISection section,
ReportSectionPropertyEnum propID,
java.lang.Object value)
Sets the properties for a section in the report. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SECTION_PROP_NAME
Section name.
public static final java.lang.String SECTION_PROP_HEIGHT
Section height.
public static final java.lang.String SECTION_PROP_WIDTH
Section width.
public static final java.lang.String SECTION_PROP_FORMAT
Section format.
public static final java.lang.String SECTION_PROP_LINKEDURI
Section linked URI.
Method Detail |
---|
public void add(ISection section, IArea area, int index) throws ReportSDKException
Adds a section to a specified report area. The collection of section objects can be accessed
by using the getSections()
method in the Area
object. The index is zero-based.
section
- The section that you want to add to the report.area
- The area of the report to which the section is added.index
- The position in the Sections
collection where you want to add the
object. Specify -1 to add the object to the end of the array. The index is zero-based.
ReportSDKException
public int getMinSectionHeight(ISection section) throws ReportSDKException
ReportSDKException
public void remove(ISection section) throws ReportSDKException
Removes an ISection
object from the report.
section
- The ISection
to be removed.
ReportSDKException
public void reorder(ISection section, int toIndex) throws ReportSDKException
ReportSDKException
public void setProperty(ISection section, ReportSectionPropertyEnum propID, java.lang.Object value) throws ReportSDKException
Sets the properties for a section in the report. Most objects are modified by copying the
object, modifying the copy, and then using the appropriate controller to modify the original
based on the changes you have made in the copy. Because areas consist of sections, and
sections contain report objects, it is costly to copy the entire object. This method is used
to modify a single property in the Section
object.
section
- The section whose property is being modified. This object should be a copy
of the original. For example, if you want to modify a Section
object's
Format property using setFormat
,
pass in SectionCopy
as the argument, where
SectionCopy = Section.Format.Clone
propID
- The name of the property that is being modified.value
- The value that is being set for the property.
ReportSDKException
public void autoFitSections(java.lang.Object sectionObject) throws ReportSDKException
Sets the height of all specified sections to minimum.
If the sectionObject
parameter is empty or NULL, the height of all sections in the
report will be set to minimum. If the sectionObject
parameter is an Area
object,
an Areas
collection, or an area name, the height of all sections in the Area
or Areas
collection
will be set to minimum. If the sectionObject
parameter is a Section
object, a Sections
collection,
or a section name, the height of each section will be set to minimum. If the sections parameter is AreaSectionKind
object,
the sections contained in the areas of the type specified by the enumerated constant will have their height set to minimum.
Example:
This sample shows how to set the height of all specified sections to a minimum value. Each section belongs to a particular report area and can contain different types of report objects. For more information on areas and sections, see the Crystal Reports Online Help.
ReportDefController reportDefController = clientDoc.getReportDefController();
ReportSectionController reportSectionController = reportDefController.getReportSectionController();
reportSectionController.autoFitSections( AreaSectionKind.detail );
sectionObject
- The sections for which you want to set the height to minimum.
This parameter can be empty or NULL, an Area
object, a Areas
collection,
a Section
object, a Sections
collection, a string representation of the area
or section name, or AreaSectionKind
object.
ReportSDKException
AreaSectionKind
,
Area
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |