|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.crystaldecisions.report.web.ServerControl
com.crystaldecisions.report.web.viewer.ReportServerControl
This class allows you to manage how reports interact with the server. There are methods for manipulating the logon, parameters, and selection formulas for a report.
Constructor Summary | |
ReportServerControl()
|
Method Summary | |
void |
addReportPartBookmarkNavigationEventListener(IReportPartBookmarkNavigationEventListener listener)
Adds a listener for ReportPartBookmarkNavigationEventArgs .
|
void |
addReportSourceChangeEventListener(ReportSourceChangeEventListener listener)
Adds a listener for report source changes. |
void |
dispose()
Disposes of the ReportServerControl . |
ConnectionInfos |
getDatabaseLogonInfos()
Returns the information required to log on to the database. |
java.lang.Object |
getEnterpriseLogon()
Deprecated. As of Version 10. |
Fields |
getParameterFields()
Returns the parameter fields for the report. |
int |
getRenderingDPI()
Gets the screen DPI for rendering the viewer and the report. |
IReportSource |
getReportSource()
Returns the report source object. |
java.lang.String |
getReportSourceClassFactoryName()
Deprecated. As of Version 10. |
java.lang.String |
getSelectionFormula()
Returns the selection formula value for the report (Note: not supported by the Java Reporting Component). |
java.lang.String |
getStyleSheetFileName()
Returns the file name of the cascading style sheet applied to the report. |
java.lang.String |
getViewTimeSelectionFormula()
Note: This method is not supported by the Java Reporting Component. |
boolean |
isEnableLogonPrompt()
Returns whether or not logon prompting for the report is enabled. |
boolean |
isEnableParameterPrompt()
Returns whether or not parameter prompting for the report is enabled. |
boolean |
isReuseParameterValuesOnRefresh()
Gets whether the current parameter values will be used when the viewer is refreshed. |
void |
navigateTo(java.lang.String sDataContext,
java.lang.String sObjectName)
Navigates to a particular report object in the current report (note: not supported by the Java Reporting Component). |
void |
refresh()
Refreshes the report. |
void |
removeReportPartBookmarkNavigationEventListener()
Removes a DrillDownSubreportEventListener (note: not supported by the Java Reporting Component). |
void |
removeReportPartBookmarkNavigationEventListenerr()
Deprecated. |
void |
removeReportSourceChangeEventListener()
Removes a report source change event listener. |
void |
setDatabaseLogonInfos(ConnectionInfos newDatabaseLogonInfos)
Sets the information required to log on to the database. |
void |
setEnableLogonPrompt(boolean newEnableLogonPrompt)
Sets whether or not the logon prompt is enabled for the report. |
void |
setEnableParameterPrompt(boolean newEnableParameterPrompt)
Sets whether or not the parameter prompt is enabled for the report. |
void |
setEnterpriseLogon(java.lang.Object newEnterpriseLogon)
Deprecated. As of Version 10. |
void |
setParameterFields(Fields newParameterFields)
Sets the parameter fields for the report. |
void |
setRenderingDPI(int i)
Sets the screen resolution (in dots per inch) for rendering the viewer and the report. |
void |
setReportSource(java.lang.Object reportSource)
Sets the report instance that the viewer will render in HTML. |
void |
setReportSourceClassFactoryName(java.lang.String newReportClassFactoryName)
Deprecated. As of Version 10. |
void |
setReuseParameterValuesOnRefresh(boolean newReuseParameterValuesOnRefresh)
Sets whether or not to re-prompt parameters on refresh. |
void |
setSelectionFormula(java.lang.String newSelectionFormula)
Sets the selection formula that will be used when the report is displayed (note: not supported by the Java Reporting Component). |
void |
setStyleSheetFileName(java.lang.String newStyleSheetFileName)
Sets the style sheet that will be used to display the report content. |
void |
setViewTimeSelectionFormula(java.lang.String newSelectionFormula)
Note: This method is not supported by the Java Reporting Component. |
Methods inherited from class com.crystaldecisions.report.web.ServerControl |
getHeight, getHtmlContent, getLeft, getName, getProductLocale, getTop, getURI, getViewState, getWidth, isIgnoreViewStateOnLoad, isOwnForm, isOwnPage, processHttpRequest, setHeight, setIgnoreViewStateOnLoad, setLeft, setName, setOwnForm, setOwnPage, setProductLocale, setTop, setURI, setViewState, setWidth |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ReportServerControl()
Method Detail |
public void addReportPartBookmarkNavigationEventListener(IReportPartBookmarkNavigationEventListener listener) throws java.util.TooManyListenersException
Adds a listener for ReportPartBookmarkNavigationEventArgs
.
Please note that report parts are not available without the advanced
viewers provided with the Report Application Server.
listener
- The DrillDownSubreportEventListener
.
TooManyListenersException
- This is thrown if you attempt to add more than
one listener on a particular listener source concurrently.public void addReportSourceChangeEventListener(ReportSourceChangeEventListener listener)
Adds a listener for report source changes.
listener
- The listener for report source changes.public void dispose()
Disposes of the ReportServerControl
.
public ConnectionInfos getDatabaseLogonInfos() throws ReportSDKExceptionBase
Returns the information required to log on to the database.
com.crystaldecisions.sdk.occa.report.data.ConnectionInfo
object.
ReportSDKExceptionBase
- This exception is thrown if the process is unsuccessful.setDatabaseLogonInfos
,
setEnableLogonPrompt
public java.lang.Object getEnterpriseLogon()
public Fields getParameterFields() throws ReportSDKExceptionBase
Returns the parameter fields for the report.
com.crystaldecisions.sdk.occa.report.data.Fields
object.
ReportSDKExceptionBase
- This exception is thrown if the process is unsuccessful.isEnableParameterPrompt
,
setEnableParameterPrompt
,
setParameterFields
public IReportSource getReportSource() throws ReportSDKExceptionBase
Returns the report source object.
ReportSDKExceptionBase
- This exception is thrown if the process is unsuccessful.setReportSource
public java.lang.String getReportSourceClassFactoryName()
public java.lang.String getSelectionFormula() throws ReportSDKExceptionBase
Returns the selection formula value for the report (Note: not supported by the Java Reporting Component).
Note: This method is only available after the
processHttpRequest
method or
getHtmlContent
method has been called.
String
.
ReportSDKExceptionBase
- This exception is thrown if the process is unsuccessful.setSelectionFormula
public java.lang.String getViewTimeSelectionFormula()
Note: This method is not supported by the Java Reporting Component.
public java.lang.String getStyleSheetFileName()
Returns the file name of the cascading style sheet applied to the report.
String
.setStyleSheetFileName
public boolean isEnableLogonPrompt()
Returns whether or not logon prompting for the report is enabled.
true
if logon prompting is enabled, otherwise false
.getDatabaseLogonInfos
,
setDatabaseLogonInfos
,
setEnableLogonPrompt
public boolean isEnableParameterPrompt()
Returns whether or not parameter prompting for the report is enabled.
true
if parameter prompting is enabled,
otherwise false
.getParameterFields
,
setEnableParameterPrompt
,
setParameterFields
public boolean isReuseParameterValuesOnRefresh()
Gets whether the current parameter values will be used when the viewer is refreshed.
true
if the current parameter values will be
used when the viewer is refreshed and false
otherwise.getParameterFields
,
isEnableParameterPrompt
,
setEnableParameterPrompt
,
setParameterFields
,
setReuseParameterValuesOnRefresh
public void navigateTo(java.lang.String sDataContext, java.lang.String sObjectName)
Navigates to a particular report object in the current report (note: not supported by the Java Reporting Component).
Note: The sDataContext parameter specifies the group within the report where the report object specified by sObjectName is located. The sObjectName is the name specified for the report object in the Crystal Reports designer.
Note: The wild card (*) can only be set for the last level.
sDataContext
- A String
that specifies the data
subtree of the report.sObjectName
- A String
that specifies the name
of the report object.public void refresh()
Refreshes the report.
public void removeReportPartBookmarkNavigationEventListener()
Removes a DrillDownSubreportEventListener
(note: not supported by the Java Reporting Component).
public void removeReportPartBookmarkNavigationEventListenerr()
Removes a DrillDownSubreportEventListener
.
public void removeReportSourceChangeEventListener()
Removes a report source change event listener.
public void setDatabaseLogonInfos(ConnectionInfos newDatabaseLogonInfos)
Sets the information required to log on to the database. Once this information has been set, it cannot be changed. Refreshing the report will resubmit the originally set logon values.
Note: If the value of the DatabaseLogonInfos property is
not set at design time, you can prompt the user for logon information
before the report is run by setting the
setEnableLogonPrompt
method to true
.
newDatabaseLogonInfos
- A
com.crystaldecisions.sdk.occa.report.data.ConnectionInfo
object that specifies the information required to log on to the database.getDatabaseLogonInfos
public void setEnableLogonPrompt(boolean newEnableLogonPrompt)
Sets whether or not the logon prompt is enabled for the report.
Note: If this property is set to false and a database logon is needed, and is not supplied programmatically through the setDatabaseLogonInfos method, viewing the report fails.
newEnableLogonPrompt
- true
to
enable logon prompt for the report, if a database logon is needed.isEnableLogonPrompt
,
getDatabaseLogonInfos
,
setDatabaseLogonInfos
public void setEnableParameterPrompt(boolean newEnableParameterPrompt)
Sets whether or not the parameter prompt is enabled for the report.
Note: If this property is set to false and parameter field information is needed, and is not supplied programmatically through the setParameterFields method, viewing the report fails.
newEnableParameterPrompt
- true
to enable parameter prompt
for this report, if parameter field information is required.public void setEnterpriseLogon(java.lang.Object newEnterpriseLogon)
public void setParameterFields(Fields newParameterFields)
Sets the parameter fields for the report.
Note: If the value of the ParameterFields property is
not set at design time, you can prompt the user for parameter fields
before the report is run by setting the
setEnableParameterPrompt
method to true
.
You can also programmatically set the parameter fields and then set ParameterEnableParameterPrompt
to False. To update the parameter fields once they've been set
(either by prompting the user or programmatically), you must set the setReuseParametersOnRefresh
property to False and call the Refresh method after setting the new parameters in.
The viewer sets the value of this property after you set the report source for the report.
newParameterFields
- A com.crystaldecisions.sdk.occa.report.data.Fields
object that specifies the new parameter fields for the report.getParameterFields
,
isEnableParameterPrompt
,
setEnableParameterPrompt
public void setReportSource(java.lang.Object reportSource) throws ReportSDKExceptionBase
Sets the report instance that the viewer will render in HTML.
Note: The setReportSource property must be set in order for the viewer to work correctly.
reportSource
- An Object
representing the
report instance that the viewer will render in HTML.
ReportSDKExceptionBase
- This exception is thrown if the process is unsuccessful.getReportSource
public void setReportSourceClassFactoryName(java.lang.String newReportClassFactoryName)
public void setReuseParameterValuesOnRefresh(boolean newReuseParameterValuesOnRefresh)
Sets whether or not to re-prompt parameters on refresh.
Note: This property only applies to parameters fields that have been set through the viewers (either programmatically through the setParameterFields method, or by prompting the user for parameter field information).
newReuseParameterValuesOnRefresh
- true
to not prompt for parameters when refreshing a report that already
has parameter values set.isReuseParameterValuesOnRefresh
public void setSelectionFormula(java.lang.String newSelectionFormula)
Sets the selection formula that will be used when the report is displayed (note: not supported by the Java Reporting Component).
Note: In a managed environment, you must have the appropriate permissions to set the setSelectionFormula property. Alternatively, you can use the setViewTimeSelectionFormula method. The setViewTimeSelectionFormula method can be set regardless of which permissions you have. This is because setting the setSelectionFormula method replaces the existing selection formula, while setting the setViewTimeSelectionFormula method leaves the existing selection formula intact and then applies the view time selection formula overtop.
The default value is an empty string.
newSelectionFormula
- A String
that specifies the
selection formula to use when the report is displayed.getSelectionFormula
public void setStyleSheetFileName(java.lang.String newStyleSheetFileName)
Sets the style sheet that will be used to display the report content.
The file should be located in the directory
crystalreportviewers11\css
on the machine where the Java web application server is running.
The cascading style sheet that
you use needs to contain the same classes as the default style sheet.
newStyleSheetFileName
- A String
that specifies the
file name for the style sheet (for example stylesheet.css).public void setViewTimeSelectionFormula(java.lang.String newSelectionFormula)
Note: This method is not supported by the Java Reporting Component.
public int getRenderingDPI()
Gets the screen DPI for rendering the viewer and the report.
public void setRenderingDPI(int i)
Sets the screen resolution (in dots per inch) for rendering the viewer and the report. The recommended values for this property are 96 and 120.
i
- the rendering DPI as an integer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |