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.

The caller must call the close() method after calling open() or open(String reportFile) method to release the resources allocated for the object.

Thread safety
Not thread-safe.

Constructor Summary
Report(Program parent, java.lang.String report)
           
 
Method Summary
 void close()
          close the Report opened by one of the open calls.
 java.io.InputStream export(ReportExportFormat format)
          Export the report to the given format.
 java.util.Set<java.lang.String> getParameterNames()
          get a list of parameter names for the report
 java.util.Set<ReportParameter> getParameters()
          get a list of parameters for the report
 com.crystaldecisions.sdk.occa.report.reportsource.IReportSource getPreviewToken()
          get a token that can be used by the previewer.
 java.lang.String getReportFile()
          get the default report definition file for the report
 java.lang.String getReportName()
          get the report's name
static boolean isAuthorizedForReport(Program program, java.lang.String report)
          checks that the user is permitted to run the report
 void open()
          Open the default report.
 void open(java.lang.String reportFile)
          Open the specified report.
 boolean print(java.lang.String printType, java.lang.String printFolder)
          Deprecated. 
 void setParam(java.lang.String name, java.lang.String value)
          Deprecated. 
 void setParametersToDefaults()
          Set all report parameters (including those in subreports) to their default values.
 void setParameterValue(java.lang.String name, java.lang.String value)
          set the given parameter value.
 
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)
Method Detail

getReportName

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


getReportFile

public java.lang.String getReportFile()
get the default report definition file for the report


getParameters

public java.util.Set<ReportParameter> getParameters()
get a list of parameters for the report


getParameterNames

public java.util.Set<java.lang.String> getParameterNames()
get a list of parameter names for the report


open

public void open()
Open the default report. This must be balanced by a call to close().


open

public void open(java.lang.String reportFile)
Open the specified report. This must be balanced by a call to close()

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

close

public void close()
close the Report opened by one of the open calls. If you have called getPreviewToken() then although the document is closed from this end you must ensure that the viewer also disposes of its own connection to the document.


isAuthorizedForReport

public static boolean isAuthorizedForReport(Program program,
                                            java.lang.String report)
checks that the user is permitted to run the report


export

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


print

@Deprecated
public boolean print(java.lang.String printType,
                                java.lang.String printFolder)
Deprecated. 

Print the report of the given type to the given folder.

Parameters:
printType -
printFolder -
Returns:

getPreviewToken

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


setParameterValue

public void setParameterValue(java.lang.String name,
                              java.lang.String value)
set the given parameter value.


setParam

@Deprecated
public void setParam(java.lang.String name,
                                java.lang.String value)
Deprecated. 

set the parameter to the given value.

Deprecated. Use setParameterValue(java.lang.String, java.lang.String) instead


setParametersToDefaults

public void setParametersToDefaults()
Set all report parameters (including those in subreports) to their default values.



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