com.sage.accpac.sm
Class Report

java.lang.Object
  extended by com.sage.accpac.sm.Report

@NotThreadSafe
public class Report
extends java.lang.Object

Provides facilities for generating reports.


Constructor Summary
Report(Program parent, java.lang.String report)
          Constructor
 
Method Summary
 java.io.InputStream export(ReportExportFormat format)
          Export the report to the given format.
 java.util.Map<java.lang.String,ReportParameter> getParameters()
          Get a map of parameters for the report.
 com.crystaldecisions.sdk.occa.report.reportsource.IReportSource getPreviewToken()
          Get a token that can be used by the crystal viewer.
 java.lang.String getReportFile()
          Get the report definition file for the report, which may include path
 java.util.Locale getReportLocale()
          Get the locale to be set for the crystal report
 java.lang.String getReportName()
          Get the report's name
 void setParameterValue(java.lang.String name, java.lang.String value)
          Set individual parameter's value.
 void setReportFile(java.lang.String reportFile)
          Set the report definition file for the report
 void setReportLocale(java.util.Locale reportLocale)
          Set the locale for the report.
 void setReportName(java.lang.String reportName)
          Setter for report name.
 void setSelectionFormula(java.lang.String value)
          Set the record selection formula for the main report, which could be null
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Report

public Report(Program parent,
              java.lang.String report)
Constructor

Parameters:
parent - the parent Program under which the report will be created
report - the name of the report (i.e., the SECTION in the xxRpt.ini file)
Method Detail

getReportName

public java.lang.String getReportName()
Get the report's name

Returns:
the name of report

setReportName

public void setReportName(java.lang.String reportName)
Setter for report name.

Parameters:
reportName - report name

getParameters

public java.util.Map<java.lang.String,ReportParameter> getParameters()
Get a map of parameters for the report. The keys are the name of the ReportParameter in upper case, and the values are no-null.

Returns:
a non-null map of parameters for the report. The key is the name of the ReportParameter in upper case.

setParameterValue

public void setParameterValue(java.lang.String name,
                              java.lang.String value)
Set individual parameter's value.

No value will be set if the parameter does not exist in the report or is one of the private parameter names used by the system itself

Parameters:
name - the name of the parameter. Name is case-insensitive
value - the value of the parameter

getReportFile

public java.lang.String getReportFile()
Get the report definition file for the report, which may include path

Returns:
the name of crystal report template file

setReportFile

public void setReportFile(java.lang.String reportFile)
Set the report definition file for the report

No reportFile will be set if the specified reportFile is invalid

Parameters:
reportFile - the specified report file in the formats of reportFileName, or reportFilePathName, SECTION[reportFileName], SECTION[reportFilePathName], but not SECTION[].

setSelectionFormula

public void setSelectionFormula(java.lang.String value)
Set the record selection formula for the main report, which could be null

Parameters:
value - the given value of the record selection formula

getReportLocale

public java.util.Locale getReportLocale()
Get the locale to be set for the crystal report

Returns:
the locale to be set for the crystal report

setReportLocale

public void setReportLocale(java.util.Locale reportLocale)
Set the locale for the report. If the locale is not null and without country, set it with a country if possible.

Parameters:
reportLocale - the specified locale to be set on report object.

export

public java.io.InputStream export(ReportExportFormat format)
Export the report to the given format.

Parameters:
format - the given ReportExportFormat
Returns:
the InputStream

getPreviewToken

public com.crystaldecisions.sdk.occa.report.reportsource.IReportSource getPreviewToken()
Get a token that can be used by the crystal viewer.

Note: make sure to dispose the IReportSource returned by this method after crystal viewer has done with it

Returns:
the IReportSource


Copyright © 2011 Sage Software, Inc. All rights reserved.