com.crystaldecisions.sdk.occa.report.template
Class ReportTemplateEngine

java.lang.Object
  extended by com.crystaldecisions.sdk.occa.report.template.ReportTemplateEngine

public class ReportTemplateEngine
extends java.lang.Object

This object is used to create a ReportTemplate object. Use the createTemplateFromDocument method to create a template from an open report. The RAS server that is used (when the ReportClientDocument object is passed in) is the server to which the object is connected when you are opening a report file. Use the createTemplate method to create a template from a referenced report file (this method takes the file path as an argument and requires you to use the setReportAppServer method).


Constructor Summary
ReportTemplateEngine()
           
 
Method Summary
static void applyTemplate(ReportClientDocument templateDocument, ReportClientDocument targetDocument)
           Applies a template to the target document.
 ReportTemplate createTemplate(java.lang.String filePath)
           Creates the report template from the specified report file path.
 ReportTemplate createTemplateFromDocument(ReportClientDocument templateClientDoc)
           Creates the report template from a template that is specified by the ReportClientDocument object.
 java.util.Locale getLocale()
          Deprecated. Replaced by ReportTemplateEngine.getProductLocale(). See also ReportTemplateEngine.getPreferredViewingLocale().
 java.util.Locale getPreferredViewingLocale()
          Gets the locale used to render the report.
 java.util.Locale getProductLocale()
          Gets the locale of the application user interface and error messages.
 java.lang.String getReportAppServer()
           Returns the name of the RAS server that is used to open a report template and apply the template to the source report.
 void setLocale(java.util.Locale locale)
          Deprecated. Replaced by #setProductLocale(). See also #setPreferredViewingLocale().
 void setPreferredViewingLocale(java.util.Locale preferredViewingLocale)
          Sets the locale used to render the report.
 void setProductLocale(java.util.Locale productLocale)
          Sets the locale of the application user interface and error messages.
 void setReportAppServer(java.lang.String serverName)
           Sets the name of the RAS server that is used to open a report template and apply the template to the source report.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReportTemplateEngine

public ReportTemplateEngine()
Method Detail

createTemplate

public ReportTemplate createTemplate(java.lang.String filePath)
                              throws ReportTemplateException

Creates the report template from the specified report file path. Use this method to create a template from a referenced report file.

Parameters:
filePath - The file path of the report.
Returns:
The newly created report template.
Throws:
ReportTemplateException

createTemplateFromDocument

public ReportTemplate createTemplateFromDocument(ReportClientDocument templateClientDoc)
                                          throws ReportTemplateException

Creates the report template from a template that is specified by the ReportClientDocument object. Use this method to create a template from an open report.

Note: In order to apply picture and chart objects, when you are passing in the ReportClientDocument object, this object needs to be opened with the option retrievePictureImage (defined in the OpenReportOptions object).

Parameters:
templateClientDoc - The open report used to create the template.
Returns:
The newly created report template.
Throws:
ReportTemplateException

getLocale

public java.util.Locale getLocale()
Deprecated. Replaced by ReportTemplateEngine.getProductLocale(). See also ReportTemplateEngine.getPreferredViewingLocale().

Returns the locale used for region and language settings. The locale setting is used to localize different aspects of the SDK (for example, error strings).

Returns:
A Locale object used to specify the locale used for region and language settings.

getProductLocale

public java.util.Locale getProductLocale()
Gets the locale of the application user interface and error messages.

Returns:
The application interface locale.
See Also:
ReportTemplateEngine.getPreferredViewingLocale()

getPreferredViewingLocale

public java.util.Locale getPreferredViewingLocale()
Gets the locale used to render the report.

Returns:
The report viewing locale.
See Also:
ReportTemplateEngine.getProductLocale()

getReportAppServer

public java.lang.String getReportAppServer()

Returns the name of the RAS server that is used to open a report template and apply the template to the source report.

Returns:
A String that specifies the name of the RAS server that is used to open a report template and apply the template to the source report.

setLocale

public void setLocale(java.util.Locale locale)
Deprecated. Replaced by #setProductLocale(). See also #setPreferredViewingLocale().

Sets the locale used for region and language settings. The locale setting is used to localize different aspects of the SDK (for example, error strings).

Parameters:
locale - A Locale object used to specify the locale used for region and language settings.

setProductLocale

public void setProductLocale(java.util.Locale productLocale)
Sets the locale of the application user interface and error messages.

See Also:
#setPreferredViewingLocale()

setPreferredViewingLocale

public void setPreferredViewingLocale(java.util.Locale preferredViewingLocale)
Sets the locale used to render the report.

See Also:
#setProductLocale()

setReportAppServer

public void setReportAppServer(java.lang.String serverName)

Sets the name of the RAS server that is used to open a report template and apply the template to the source report.

Parameters:
serverName - A String that specifies the name of the RAS server that is used to open a report template and apply the template to the source report.

applyTemplate

public static void applyTemplate(ReportClientDocument templateDocument,
                                 ReportClientDocument targetDocument)
                          throws ReportTemplateException

Applies a template to the target document.

Parameters:
templateDocument - the ReportClientDocument object to be used as the template
targetDocument - the target ReportClientDocument object to which the template is applied
Throws:
ReportTemplateException