public class Report
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
OUTPUT_TO_HTML |
static int |
OUTPUT_TO_PRINTER |
static int |
OUTPUT_TO_WINDOW |
Constructor and Description |
---|
Report(java.lang.String reportName,
ConnectionSpecification connectionSpecification)
Constructs a new report.
|
Report(java.lang.String reportName,
java.lang.String odbcName)
Constructs a new report.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
exec(java.lang.String reportName,
ConnectionSpecification connectionSpecification,
boolean outputToWindow)
Executes a specified report.
|
static boolean |
exec(java.lang.String reportName,
ConnectionSpecification connectionSpecification,
boolean outputToWindow,
java.lang.String whereCondition)
Executes a specified report.
|
static boolean |
exec(java.lang.String reportName,
ConnectionSpecification connectionSpecification,
boolean outputToWindow,
java.lang.String whereCondition,
java.lang.String[] parameters)
Executes a specified report.
|
static boolean |
exec(java.lang.String reportName,
ConnectionSpecification connectionSpecification,
int outputType,
java.lang.String whereCondition,
java.lang.String[] parameters)
Executes a specified report.
|
static boolean |
exec(java.lang.String reportName,
ConnectionSpecification connectionSpecification,
int outputType,
java.lang.String whereCondition,
java.lang.String[] parameters,
java.lang.String outputFileName)
Executes a specified report.
|
static boolean |
exec(java.lang.String reportName,
java.lang.String odbcName,
boolean outputToWindow,
java.lang.String whereCondition)
Executes a specified report.
|
boolean |
execute()
Executes the report assynchroniously
|
boolean |
executeAndWaitUntilDone()
Executes the report and waits until the report is done.
|
void |
setOutputType(int outputType)
Sets the outputType.
|
void |
setParameters(java.lang.String[] parameters)
Sets the parameters.
|
void |
setWhereCondition(java.lang.String whereCondition)
Sets the whereCondition.
|
public static final int OUTPUT_TO_PRINTER
public static final int OUTPUT_TO_WINDOW
public static final int OUTPUT_TO_HTML
public Report(java.lang.String reportName, java.lang.String odbcName)
reportName
- the name of the report to be executedodbcName
- the name of the ODBC data source name to connect topublic Report(java.lang.String reportName, ConnectionSpecification connectionSpecification)
reportName
- the name of the report to be executedconnectionSpecification
- the specification to connect to the databasepublic static boolean exec(java.lang.String reportName, ConnectionSpecification connectionSpecification, boolean outputToWindow)
reportName
- the name of the report to be executedconnectionSpecification
- the specification to connect to the databaseoutputToWindow
- indicates whether the output is to be presented on screen instead of printingpublic static boolean exec(java.lang.String reportName, java.lang.String odbcName, boolean outputToWindow, java.lang.String whereCondition)
reportName
- the name of the report to be executedodbcName
- the name of the ODBC data source name to connect tooutputToWindow
- indicates whether the output is to be presented on screen instead of printingwhereCondition
- a filter definition in Crystal Reports syntax - sample: {tableName.columnName} like '*searchedFragment*'public static boolean exec(java.lang.String reportName, ConnectionSpecification connectionSpecification, boolean outputToWindow, java.lang.String whereCondition)
reportName
- the name of the report to be executedconnectionSpecification
- the specification to connect to the databaseoutputToWindow
- indicates whether the output is to be presented on screen instead of printingwhereCondition
- a filter definition in Crystal Reports syntax - sample: {tableName.columnName} like '*searchedFragment*'public static boolean exec(java.lang.String reportName, ConnectionSpecification connectionSpecification, boolean outputToWindow, java.lang.String whereCondition, java.lang.String[] parameters)
reportName
- the name of the report to be executedconnectionSpecification
- the specification to connect to the databaseoutputToWindow
- indicates whether the output is to be presented on screen instead of printingwhereCondition
- a filter definition in Crystal Reports syntax - sample: {tableName.columnName} like '*searchedFragment*'parameters
- an array of paramters to be set in Crystal Reportspublic static boolean exec(java.lang.String reportName, ConnectionSpecification connectionSpecification, int outputType, java.lang.String whereCondition, java.lang.String[] parameters)
reportName
- the name of the report to be executedconnectionSpecification
- the specification to connect to the databaseoutputType
- OUTPUT_TO_PRINTER or OUTPUT_TO_WINDOW OR OUTPUT_TO_HTML;whereCondition
- a filter definition in Crystal Reports syntax - sample: {tableName.columnName} like '*searchedFragment*'parameters
- an array of paramters to be set in Crystal Reportspublic static boolean exec(java.lang.String reportName, ConnectionSpecification connectionSpecification, int outputType, java.lang.String whereCondition, java.lang.String[] parameters, java.lang.String outputFileName)
reportName
- the name of the report to be executedconnectionSpecification
- the specification to connect to the databaseoutputType
- OUTPUT_TO_PRINTER or OUTPUT_TO_WINDOW OR OUTPUT_TO_HTML;whereCondition
- a filter definition in Crystal Reports syntax - sample: {tableName.columnName} like '*searchedFragment*'parameters
- an array of paramters to be set in Crystal ReportsoutputFileName
- the complete path of the output file (for HTML output)public void setOutputType(int outputType)
outputType
- The outputType to setpublic void setParameters(java.lang.String[] parameters)
parameters
- The parameters to setpublic void setWhereCondition(java.lang.String whereCondition)
whereCondition
- The whereCondition to setpublic boolean execute()
public boolean executeAndWaitUntilDone()
Copyright 1998-2023 Christoph Mueller, Kaerntner Str. 56, D-70469 Stuttgart, Germany, https://www.perpus.de