|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.crystaldecisions.sdk.occa.report.application.ReportObjectController
public class ReportObjectController
This object is used to add, remove, and modify the report objects that are defined in the
definition package.
These objects include charts, pictures, lines, text objects, and field objects.
Report objects are contained within a section of the report, and each section belongs to a
particular report area.
ReportDefinition object to retrieve the area that contains the report section that
the desired report object has been added to. Pre-defined areas include the report header and footer,
page header and footer, and details area.getSections
method to retrieve the section that contains the reportgetReportObjects
method to retrieve the report object.
| Method Summary | |
|---|---|
void |
add(IFieldObject fieldObject,
java.lang.String headingText)
For internal use only |
void |
add(IReportObject object,
ISection section,
int index)
Adds a report object to a specified section of the report. |
void |
add(java.lang.String fieldName)
Adds a Field object to details section. |
void |
add(java.lang.String fieldName,
java.lang.String headingText)
Adds a Field object to details section and adds
a FieldHeadingObject object to the
page header section if headingText is not empty or not null. |
boolean |
canAddReportObject(IReportObject object,
ISection section)
For internal use only. |
boolean |
canEmbedFieldIntoTextObject(java.lang.String formulaForm,
ITextObject textObject)
For internal use only. |
void |
changeToBarcode(IReportObject oldObject,
IBarcodeEntry barcode)
For internal use only |
ReportObjects |
getAllReportObjects()
Gets a collection of all the report objects in the report. |
CrossTabObjectController |
getCrossTabObjectController()
For internal use only. |
FlashObjectController |
getFlashObjectController()
For internal use only. |
ReportObjects |
getReportObjectsByKind(ReportObjectKind objectKind)
Gets a collection of all the report objects of the specific kind in the report. |
PictureObject |
importPicture(java.lang.String pictureFilePath,
ISection section,
int left,
int top)
Imports an image file into the report as a Picture object. |
void |
modify(IReportObject oldObject,
IReportObject newObject)
Modifies a report object. |
void |
modifyVisualizationProperties(IChartObject chart,
VisualizationPropertyValues vizProps)
|
void |
move(IDrawingObject object,
ISection newSection,
int top,
int left,
ISection endSection,
int bottom,
int right)
For internal use only |
void |
move(IReportObject object,
ISection newSection,
int top,
int left)
For internal use only |
void |
remove(IReportObject object)
Removes a report object from the report. |
void |
reorder(IReportObject rptObj,
int toIndex)
For internal use only. |
void |
validateReportObject(IReportObject object)
For internal use only. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public boolean canAddReportObject(IReportObject object,
ISection section)
public boolean canEmbedFieldIntoTextObject(java.lang.String formulaForm,
ITextObject textObject)
public void add(IReportObject object,
ISection section,
int index)
throws ReportSDKException
Adds a report object to a specified section of the report. The collection of report objects
can be accessed by using the getReportObjects
method in the Section object.
The index is zero-based.
object - The report object that you want to add to the report.section - The section of the report in which the object will appear.index - The position in the ReportObjects 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 void modify(IReportObject oldObject,
IReportObject newObject)
throws ReportSDKException
Modifies a report object. The collection of report objects can be accessed
by using the getReportObjects
method in the Section object. The index is zero-based.
oldObject - The report object to be modified in the collection.newObject - The new report object.
ReportSDKException
public void remove(IReportObject object)
throws ReportSDKException
Removes a report object from the report.
Note:When you remove a SummaryField, the Filters
and Sorts associated with this SummaryField will also be removed.
object - The ReportObject to be removed.
ReportSDKExceptionpublic ReportObjects getAllReportObjects()
Gets a collection of all the report objects in the report.
Example:
This sample shows how to retrieve a collection of all the ReportObjects in a Crystal report. Report objects are the visible entities that define a report, such as charts, pictures and hyperlinks. Report Objects store information about the object's size, position, border, and color.
ReportDefController reportDefController = clientDoc.getReportDefController();
ReportObjectController reportObjectController = reportDefController.getReportObjectController();
ReportObjects reportObjects = reportObjectController.getAllReportObects();
ReportObjects collection.public ReportObjects getReportObjectsByKind(ReportObjectKind objectKind)
Gets a collection of all the report objects of the specific kind in the report.
Example:
This sample shows how to retrieve a collection of all the ReportObjects in a Crystal report of a specified kind. Report objects are the text objects, charts, pictures, bitmaps and so on that appear in reports. Report objects store information about the object's size, position, border, and color.
ReportDefController reportDefController = clientDoc.getReportDefController();
ReportObject reportObjectController = reportDefController.getReportObjectController();
ReportObjects reportObjects = reportObjectController.getReportObectsByKind(ReportObjectKind.field);
objectKind - the ReportObjectKind of objects to return
ReportObjects collection.ReportObjectKind
public void add(java.lang.String fieldName)
throws ReportSDKException
Adds a Field object to details section.
fieldName - the name of the field object to add to the details section
ReportSDKException
public void add(java.lang.String fieldName,
java.lang.String headingText)
throws ReportSDKException
Adds a Field object to details section and adds
a FieldHeadingObject object to the
page header section if headingText is not empty or not null.
Note: The field added to the detail section with this method must be a DB field, parameter field, formula field, runningtotal field, or SQL expression field.
Example:
This sample shows how to add a report object to a specified section of the report. Report objects can be charts, pictures, lines, text objects, and field objects. Report objects are contained within a section of the report, and each section belongs to a particular report area. An area is a group of like sections in the report that all share the same characteristics. You will add a field to the PageHeaderArea of the report.
ReportDefController reportDefController = clientDoc.getReportDefController();
ReportObjectController reportObjectController = reportDefController.getReportObjectController();
reportObjectController.add( "{Table.Field}", "FieldName" );
fieldName - the name of the field object to add to the details section. The name must be in formula form.headingText - the name of the FieldHeadingObject that you want to add to the page header section,
when headingText is not null or empty. This parameter is optional. The default value is empty.
ReportSDKException
public void add(IFieldObject fieldObject,
java.lang.String headingText)
throws ReportSDKException
ReportSDKException
public PictureObject importPicture(java.lang.String pictureFilePath,
ISection section,
int left,
int top)
throws ReportSDKException
Imports an image file into the report as a Picture object.
Use this method to import an image into the report as a PictureObject.
If you want to replace an image that you have imported using this method,
or if you want to replace an image that you have imported using the Graphic Location feature
in the Report designer, first use the ReportObjectController.remove(IReportObject) method to remove the image and then use
this method to import the replacement image. Do not use the ReportObjectController.modify(IReportObject, IReportObject) method to replace the image.
pictureFilePath - The file path to the image relative to the location of the RAS server.
The SDK must have access rights to the image file. Forward relative paths are acceptable.
For example, \images\myphoto.jpg is acceptable but ..\images\myphoto.jpg is not.
HTTP paths are acceptable. FTP requests are not available.
Only mapped file server locations are considered valid.section - The section of the report in which the object will appear.left - The position of the Picture object relative to the left of the section.top - The position of the Picture object relative to the top of the section.
ReportSDKException
public void move(IReportObject object,
ISection newSection,
int top,
int left)
throws ReportSDKException
ReportSDKException
public void move(IDrawingObject object,
ISection newSection,
int top,
int left,
ISection endSection,
int bottom,
int right)
throws ReportSDKException
ReportSDKException
public void reorder(IReportObject rptObj,
int toIndex)
throws ReportSDKException
ReportSDKExceptionpublic CrossTabObjectController getCrossTabObjectController()
public FlashObjectController getFlashObjectController()
public void validateReportObject(IReportObject object)
throws ReportSDKException
ReportSDKException
public void changeToBarcode(IReportObject oldObject,
IBarcodeEntry barcode)
throws ReportSDKException
ReportSDKException
public void modifyVisualizationProperties(IChartObject chart,
VisualizationPropertyValues vizProps)
throws ReportSDKException
ReportSDKException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||