com.crystaldecisions.sdk.occa.report.application
Class ReportDefController

java.lang.Object
  extended by com.crystaldecisions.sdk.occa.report.application.ReportDefController

public class ReportDefController
extends java.lang.Object

This object is used to modify areas and sections in a report, as well as format report objects such as fields, pictures, and charts. While field objects are defined in the data package, other report objects are defined in the definition package.

NOTE: At this time, the RAS SDK does not support manipulating charts based on crosstabs or charts based on OLAP fields. You can only delete these objects.


Method Summary
 void addChartObject(IChartObject chart)
           Adds a chart to the report.
 void applyReportStyle(ReportStyle reportStyle)
           Applies a predefined style template to the report.
 IReportObject findObjectByName(java.lang.String objectName)
           Finds an object within the Report Definition with the specified name.
 ISection findSectionByName(java.lang.String sectionName)
           Finds a section within the Report Definition with the specified name.
 IGroup getGroupForSection(ISection section)
          For internal use only
 java.util.Date getPrintDateAndTime()
          For internal use only
 java.util.Locale getProductLocale()
           
static java.lang.String getQualifiedName(java.lang.String name)
          For internal use only.
 ReportAreaController getReportAreaController()
           Returns the ReportAreaController object which allows you to set the properties for an area in the report.
 IReportDefinition getReportDefinition()
           Returns areas, sections, and report objects in the report.
 ReportObjectController getReportObjectController()
           Adds, removes, and modifies report objects such as charts, pictures, and hyperlinks.
 ReportSectionController getReportSectionController()
           Adds, removes, and sets properties for sections in the report.
 ReportStyle getReportStyle()
           
 boolean isObjectExist(java.lang.String name)
          For internal use only.
 boolean isPrintDateAndTimeLocked()
          For internal use only
 void modifyChartObject(IChartObject oldChart, IChartObject newChart)
           Modifies a particular chart in a report.
 void modifyPrintDateAndTime(java.util.Date printDate, boolean locked)
          For internal use only
 ReportObjects queryChartObjects()
           Returns a list of all the chart objects in the report.
 void removeChartObject(IChartObject chart)
           Removes a particular chart from the report.
 boolean validateNameID(java.lang.String name)
          For internal use only.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addChartObject

public void addChartObject(IChartObject chart)
                    throws ReportSDKException

Adds a chart to the report. The position and content of the chart is specified by the ChartObject object itself. To add a chart, you can either create a new ChartObject object, or use an existing one by using the ChartObject object's clone method.

Use the ReportDefController.queryChartObjects() method to determine the index of the added item in the collection.

Parameters:
chart - The chart that is to be added to the report.
Throws:
ReportSDKException

applyReportStyle

public void applyReportStyle(ReportStyle reportStyle)
                      throws ReportSDKException

Applies a predefined style template to the report. Use this method to apply one of the styles listed in ReportStyle.

The ReportStyle is not saved with the report. If you apply a style, save the report, and then re-open it, this property is 255 (no report style).

Parameters:
reportStyle - The style that is to be applied to the report.
Throws:
ReportSDKException

findObjectByName

public IReportObject findObjectByName(java.lang.String objectName)

Finds an object within the Report Definition with the specified name.

Parameters:
objectName - The name of the object to be retrieved.
Returns:
An IReportObject with the specified name.

findSectionByName

public ISection findSectionByName(java.lang.String sectionName)

Finds a section within the Report Definition with the specified name.

Parameters:
sectionName - The name of the section to be retrieved.
Returns:
An ISection with the specified name.

getQualifiedName

public static java.lang.String getQualifiedName(java.lang.String name)
For internal use only.


getReportAreaController

public ReportAreaController getReportAreaController()

Returns the ReportAreaController object which allows you to set the properties for an area in the report.

Returns:
The ReportAreaController object which allows you to set the properties for an area in the report.

getReportDefinition

public IReportDefinition getReportDefinition()

Returns areas, sections, and report objects in the report. This property provides access to areas in the report; each area may contain multiple sections, and each section may contain multiple report objects.

Returns:
The IReportDefinition object which contains areas, sections, and report objects in the report.

getReportObjectController

public ReportObjectController getReportObjectController()

Adds, removes, and modifies report objects such as charts, pictures, and hyperlinks.

Returns:
The ReportObjectController which allows you to add, remove, and modify report objects such as charts, pictures, and hyperlinks.

getReportSectionController

public ReportSectionController getReportSectionController()

Adds, removes, and sets properties for sections in the report.

Returns:
The ReportSectionController which allows you to add, remove, and set properties for sections in the report.

getGroupForSection

public IGroup getGroupForSection(ISection section)
For internal use only


getReportStyle

public ReportStyle getReportStyle()

isObjectExist

public boolean isObjectExist(java.lang.String name)
For internal use only.


modifyChartObject

public void modifyChartObject(IChartObject oldChart,
                              IChartObject newChart)
                       throws ReportSDKException

Modifies a particular chart in a report.

Parameters:
oldChart - The chart in the report that is being modified. You can retrieve a chart object from the report by using the ReportDefController.queryChartObjects() method.
newChart - The newly modified chart that is to replace the existing chart.
Throws:
ReportSDKException

queryChartObjects

public ReportObjects queryChartObjects()

Returns a list of all the chart objects in the report.

Returns:
A ReportObjects object containing a list of all the chart objects in the report.

isPrintDateAndTimeLocked

public boolean isPrintDateAndTimeLocked()
                                 throws ReportSDKException
For internal use only

Throws:
ReportSDKException

getPrintDateAndTime

public java.util.Date getPrintDateAndTime()
                                   throws ReportSDKException
For internal use only

Throws:
ReportSDKException

modifyPrintDateAndTime

public void modifyPrintDateAndTime(java.util.Date printDate,
                                   boolean locked)
                            throws ReportSDKException
For internal use only

Throws:
ReportSDKException

removeChartObject

public void removeChartObject(IChartObject chart)
                       throws ReportSDKException

Removes a particular chart from the report. Use the ReportDefController.queryChartObjects() method to browse through the charts in a report.

Parameters:
chart - The chart that is to be removed from the report. chart must be a chart object from the current report and not an index value.
Throws:
ReportSDKException

validateNameID

public boolean validateNameID(java.lang.String name)
For internal use only.


getProductLocale

public java.util.Locale getProductLocale()