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

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

public class ReportTemplate
extends java.lang.Object

This class is used to apply a template to a report. The applyToDocument method applies a template to an open report. The applyTo method applies a template to a file on disk.


Constructor Summary
ReportTemplate()
           
ReportTemplate(ReportClientDocument templateClientDoc)
           
ReportTemplate(java.lang.String templateReportPath, java.lang.String ras)
           
 
Method Summary
 void applyTo(java.lang.String targetFile, java.lang.String saveAsFileName, java.lang.String saveAsFilePath)
           Applies the template to the report specified by the file path.
 void applyToDocument(ReportClientDocument targetClientDoc)
           Applies the template to the specified ReportClientDocument.
 java.util.Locale getLocale()
          Deprecated. Replaced by ReportTemplate.getProductLocale(). See also ReportTemplate.getPreferredViewingLocale().
 java.util.Locale getPreferredViewingLocale()
          Returns the locale used to render the report.
 java.util.Locale getProductLocale()
          Returns the locale of the application user interface and error messages.
 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(ReportAppSession reportAppSession)
           Sets the RAS server that is used to open the report.
 void setReportAppServer(java.lang.String rasserver)
           Sets the RAS server that is used to open the report.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReportTemplate

public ReportTemplate()

ReportTemplate

public ReportTemplate(java.lang.String templateReportPath,
                      java.lang.String ras)
               throws ReportTemplateException
Throws:
ReportTemplateException

ReportTemplate

public ReportTemplate(ReportClientDocument templateClientDoc)
               throws ReportTemplateException
Throws:
ReportTemplateException
Method Detail

applyTo

public void applyTo(java.lang.String targetFile,
                    java.lang.String saveAsFileName,
                    java.lang.String saveAsFilePath)
             throws ReportTemplateException,
                    java.io.IOException

Applies the template to the report specified by the file path.

Parameters:
targetFile - The target file (that the template is applied to).
saveAsFileName - The file name of the report.
saveAsFilePath - The file path of the report.
Throws:
ReportTemplateException
java.io.IOException

applyToDocument

public void applyToDocument(ReportClientDocument targetClientDoc)
                     throws ReportTemplateException

Applies the template to the specified ReportClientDocument. Use this method to apply the template to an open report.

Parameters:
targetClientDoc - The report to apply the template to.
Throws:
ReportTemplateException

getLocale

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

Returns the locale used by this object for region and language settings.

Returns:
The Locale object used by this object for region and language settings.

getProductLocale

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

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

getPreferredViewingLocale

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

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

setLocale

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

Sets the locale used by this object for region and language settings.

Parameters:
locale - The Locale object used by this object 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(ReportAppSession reportAppSession)

Sets the RAS server that is used to open the report.

Parameters:
reportAppSession - A ReportAppSession object that specifies the RAS server to be used.

setReportAppServer

public void setReportAppServer(java.lang.String rasserver)
                        throws ReportSDKException

Sets the RAS server that is used to open the report.

Parameters:
rasserver - A String that specifies name of the RAS server to be used.
Throws:
ReportSDKException