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

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

public class DataDefController
extends java.lang.Object

This object is used to add, remove, and modify the data definition of the report. The data definition defines which data is being retrieved and how the data is grouped, summarized, and filtered. Using the DataDefController, you may modify any part of the report that acts on the data from the database. This includes:

Once the fields in the report have been defined, you can display them on the report. Any field that you want to appear on the report must be added to the ResultFields collection using the ResultFieldController add method.


Method Summary
 IField findFieldByFormulaForm(java.lang.String formulaForm)
           Gets the field in the report that matches the specified formula form.
 AlertController getAlertController()
           
 IDataDefinition getDataDefinition()
           Returns formulas, filters, groups, parameters, sort objects, and summaries.
 FormulaFieldController getFormulaFieldController()
           Adds, removes, and modifies formula fields on the report.
 GroupController getGroupController()
           Adds, moves, removes, and modifies the way data is grouped in the report.
 FilterController getGroupFilterController()
           Adds, moves, removes, and modifies the way in which groups are filtered in the report.
 GroupSortController getGroupSortController()
           Adds, moves, removes, and modifies the way in which group in the report is sorted.
 ParameterFieldController getParameterFieldController()
           Adds, removes, and modifies any parameter fields in the report.
 FilterController getRecordFilterController()
           Adds, moves, removes, and modifies the way in which records are filtered in the report.
 RecordSortController getRecordSortController()
           Adds, moves, removes, and modifies the way in which record in the report is sorted.
 ResultFieldController getResultFieldController()
           Determines which fields will be displayed in the report.
 RunningTotalFieldController getRunningTotalFieldController()
          Adds, removes, and modifies running total fields on the report.
 FilterController getSavedDataFilterController()
           Adds, moves, removes, and modifies the way in which saved data is filtered in the report.
 SummaryFieldController getSummaryFieldController()
           Adds, removes, and modifies summary fields on the report.
 FilterController getViewTimeFilterController()
           Internal only
 FieldValueType guessFieldValueTypeFromFormulaForm(java.lang.String formulaForm)
           
 void modifyFieldName(IField field, java.lang.String newName)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDataDefinition

public IDataDefinition getDataDefinition()

Returns formulas, filters, groups, parameters, sort objects, and summaries. The IDataDefinition object contains all the data structures necessary to define and manipulate the data that the report contains. Note that the report's data definition is not concerned with how the report is laid out. That is, it does not store information regarding graphics, charts, borders, or text objects.

Although the DataDefinition represents the data in a report, it does not synchronize the data that your Report Application Server client is manipulating with that on the server. In order to properly modify the report, you must use the appropriate controller.

Returns:
The IDataDefinition object containing all formulas, filters, groups, parameters, sort objects, and summaries in this report.

getFormulaFieldController

public FormulaFieldController getFormulaFieldController()

Adds, removes, and modifies formula fields on the report.

Returns:
The FormulaFieldController object used to add, remove, and modify formula fields on the report.

getGroupController

public GroupController getGroupController()

Adds, moves, removes, and modifies the way data is grouped in the report.

Returns:
The GroupController object used to add, move, remove, and modify the way data is grouped in the report.

getGroupFilterController

public FilterController getGroupFilterController()

Adds, moves, removes, and modifies the way in which groups are filtered in the report.

Returns:
The FilterController object used to add, move, remove, and modify the way in which groups are filtered in the report.

getParameterFieldController

public ParameterFieldController getParameterFieldController()

Adds, removes, and modifies any parameter fields in the report.

Returns:
The ParameterFieldController used to add, remove, and modify any parameter fields in the report.

getRecordFilterController

public FilterController getRecordFilterController()

Adds, moves, removes, and modifies the way in which records are filtered in the report.

Returns:
The FilterController object used to add, move, remove, and modify the way in which records are filtered in the report.

getViewTimeFilterController

public FilterController getViewTimeFilterController()

Internal only


getResultFieldController

public ResultFieldController getResultFieldController()

Determines which fields will be displayed in the report.

Returns:
The ResultFieldController object used to determine which fields will be displayed in the report.

getRecordSortController

public RecordSortController getRecordSortController()

Adds, moves, removes, and modifies the way in which record in the report is sorted.

Returns:
The RecordSortController used to add, move, remove, and modify the way in which data in the report is sorted.

getGroupSortController

public GroupSortController getGroupSortController()

Adds, moves, removes, and modifies the way in which group in the report is sorted.

Returns:
The GroupSortController used to add, move, remove, and modify the way in which data in the report is sorted.

getSavedDataFilterController

public FilterController getSavedDataFilterController()

Adds, moves, removes, and modifies the way in which saved data is filtered in the report.

Example:

This sample shows how to modify the savedDataFilter in a report.

 DataDefController dataDefController = clientDoc.getDataDefController();
 FilterController filterController = dataDefController.getSavedDataFilterController();
 filterController.setFormulaText("{Customer.Last Year's Sales} > 20000");
 

Returns:
The FilterController object used to add, move, remove, and modify the way in which saved data are filtered in the report.

getSummaryFieldController

public SummaryFieldController getSummaryFieldController()

Adds, removes, and modifies summary fields on the report.

Returns:
The SummaryFieldController object used to add, remove, and modify summary fields on the report.

getRunningTotalFieldController

public RunningTotalFieldController getRunningTotalFieldController()
Adds, removes, and modifies running total fields on the report.

Returns:
The RunningTotalFieldController object used to add, remove, and modify running total fields on the report.

getAlertController

public AlertController getAlertController()

findFieldByFormulaForm

public IField findFieldByFormulaForm(java.lang.String formulaForm)

Gets the field in the report that matches the specified formula form. The string comparison search is case sensitive.

Example:

This sample shows how to find a field in a report that matches a specified formula form.

 DataDefController dataDefController = clientDoc.getDataDefController();
 IField field = dataDefController.findFieldByFormulaForm( "{table.field}" );
 

Parameters:
formulaForm - the formula form string that is used in the search
Returns:
a reference to the IField object

modifyFieldName

public void modifyFieldName(IField field,
                            java.lang.String newName)
                     throws ReportSDKException
Throws:
ReportSDKException

guessFieldValueTypeFromFormulaForm

public FieldValueType guessFieldValueTypeFromFormulaForm(java.lang.String formulaForm)
                                                  throws ReportSDKException
Throws:
ReportSDKException