Index
Object HARMONI.HarmoniJob
H_SF_ASCENDING-
H_SF_DESCENDING-
CheckSelectionFormula()
- Checks the selection formula for validity.
ClearServerLog()
- Clears the current server logs and starts a fresh log that can be
retrieved using GetServerLog()
Close()
- Closes the print job.
DeleteNthSortField(int)
- Delete a given sort field from a report.
DeleteXmlFile(boolean)
- Set the deletion option the DOR file in SetPrivateData
True by default, if set to false the xml file passed by
SetPrivateData will not be deleted.
getEngine()
- Get the engine that opened this job
GetHandle()
- Get the handle for this job
GetJobStatus(HarmoniJobInfo)
- This method evaluates the status of a print job.
GetName()
- Get the name associated with this job
GetNthTableLogOnInfo(int)
-
getOutputAsStream(String)
- This method will return an InputStream which contains the requested output name.
getOutputFileNames()
- This method will return an array of output file names which can be used as the outputFileName
parameter of a call to getOutputAsStream.
GetPrintOptions()
- This method retieves the print options specified for the report
GetSelectedPrinter(StringBuffer, StringBuffer, StringBuffer)
- Obtain the selected printer.
GetSelectedPrinterByName(StringBuffer)
- This method returns the printer info for the job
GetSelectionFormula(StringBuffer)
- Get the selection formula used in this job's report.
GetServerLog()
- Returns the Server log associated with the current run.
GetSQLQuery(StringBuffer)
- Get the SQL query for this job's report.
GetStatus(HarmoniJobInfo)
- Get the status and progress statistics of a report job.
OutputTo(String, FormatOptions)
- Output the job to Saffron
OutputToPrinter(int)
- Sets the print destination for this job to be the printer.
OutputToSaffronHtml(String, HTMLFormatOptions)
- Output the job to Saffron HTML format.
Deprecated
OutputToSaffronJPEG(String, RasterFormatOptions)
- Output the job to Saffron JPEG format.
Deprecated
OutputToSaffronPDF(String, PDFFormatOptions)
- Output the job to Saffron PDF format.
Deprecated
OutputToSaffronPNG(String, RasterFormatOptions)
- Output the job to Saffron PNG format.
Deprecated
OutputToSaffronRTF(String, RTFFormatOptions)
- Output the job to Saffron RTF format.
Deprecated
OutputToSaffronSVG(String, SVGFormatOptions)
- Output the job to Saffron SVG format.
Deprecated
SelectPrinter(String, String, String, HarmoniDEVMODE)
- Select Printer.
SelectPrinterByName(String, HarmoniPrinterInfo)
- This method sets the given printer for the report.
SetJobTitle(String)
- Used to log any string which the user desires to the server.log file.
SetName(String)
- Set the name associated with this job
SetNthSortField(int, String, int)
- Change the given sort field's name and direction.
SetNthTableLogOnInfo(int, HarmoniLogOnInfo, boolean)
- Sets the SQL connection information for the given table in this job's report.
SetNthTablePrivateDataFromXMLFile(int, String)
- The method reads an XML file from the file system and sets the private data for
table N.
SetPrintOptions(HarmoniPrintOptions)
- Set the Print Options for this report.
SetPrivateData()
- This method is useful to set the data for a DOR report when the client wants to write
the XML representation of the data to an OutputStream.
SetPrivateData(DORDataSet)
- Pass your data objects to Harmoni using Data Object Reporting.
SetPrivateData(int)
- This method is useful to set the data for a DOR report when the client wants to write
the XML representation of the data to an OutputStream.
SetPrivateData(int, DORDataSet)
- Pass your data objects to Harmoni using Data Object Reporting
Returns the absolute file name of this data file on the server.
SetPrivateData(int, ResultSet)
- Pass your data objects to Harmoni using Data Object Reporting
Returns the absolute file name of this data file on the server.
SetPrivateData(int, String)
- Pass your data objects to Harmoni using Data Object Reporting
Returns the absolute file name of this data file on the server.
SetPrivateData(ResultSet)
- Pass your data objects to Harmoni using Data Object Reporting.
SetPrivateData(ResultSet, ResultSetMetaData)
- Pass your data objects to Harmoni using Data Object Reporting
Returns the absolute file name of this data file on the server.
SetPrivateData(String)
- The method reads an XML file from the file system and sets the private data for
table 0.Returns the absolute file name of this data file on the server.
SetPrivateDataFromMainReport(int, HarmoniJob, int)
- The method sets the private data for the sub-report specified from dor data
previously passed to the using SetPrivateData.
SetPrivateDataFromServerMachine(int, String)
- The method sets the private data for the table specified from a xml file
already accessible to the report server.
SetPrivateDataFromXMLFile(String)
- The method reads an XML file from the file system and sets the private data for
table 0.
setRetrieveOutputAsStream(boolean)
- This method informs the report server to retrieve the output as a java input stream.
setRetrieveOutputToClientDisk(boolean)
- This method informs the report server to retrieve the output files and write
them to the client disk.
SetSelectionFormula(String)
- Set the selection formula for this job's report.
SetSQLQuery(String)
- Set the SQL query for this job's report.
Start()
- Issue a PEStartPrintJob call for the job.
TestNthTableConnectivity(int)
- Test a database table's settings to see if they are valid.
VerifyDatabase()
- This method verifies that connection to databases specified in this report are valid.
H_SF_DESCENDING
int H_SF_DESCENDING
H_SF_ASCENDING
int H_SF_ASCENDING
CheckSelectionFormula
boolean CheckSelectionFormula()
Checks the selection formula for validity.
- Returns:
- boolean indicating whether the section formula is legal.
Close
void Close()
Closes the print job. If printing has not yet finished, it continues.
See Crystal Developer's Guide for more information.
DeleteNthSortField
void DeleteNthSortField(int sortFieldN)
Delete a given sort field from a report.
- Parameters:
sortFieldN - The index of the sort field to delete.
getEngine
HarmoniEngine getEngine()
Get the engine that opened this job
- Returns:
- The engine that opened this job
GetServerLog
String GetServerLog()
Returns the Server log associated with the current run.
- Returns:
ClearServerLog
boolean ClearServerLog()
Clears the current server logs and starts a fresh log that can be
retrieved using GetServerLog()
- Returns:
GetHandle
int GetHandle()
Get the handle for this job
- Returns:
- The handle for this job
GetJobStatus
short GetJobStatus(HarmoniJobInfo info)
This method evaluates the status of a print job. A call to HarmoniJob.Start() blocks
both the client and the engine process, so attempting to use this call while
Start() blocks, even from a different client thread, won't return useful information.
- Parameters:
info - HarmoniJobInfo, information about the job status
- Returns:
- short, 0 if PEOpenEngine , or PEOpenPrintJob, has not been called successfully.
PE_JOBNOTSTARTED if the job has not started yet
PE_JOBINPROGRESS if the job is in progress
PE_JOBCOMPLETED if the job has completed successfully
PE_JOBFAILED if the job has failed
PE_JOBCANCELLED if the job has been canceled by the user
PE_JOBHALTED if the report has been halted
GetName
String GetName()
Get the name associated with this job
- Returns:
- The name of this job.
GetNthTableLogOnInfo
HarmoniLogOnInfo GetNthTableLogOnInfo(int tableN)
GetPrintOptions
HarmoniPrintOptions GetPrintOptions()
This method retieves the print options specified for the report
- Returns:
- HarmoniPrintOptions, returns print options if the call is successful, null if call fails
GetSelectedPrinter
HarmoniDEVMODE GetSelectedPrinter(StringBuffer driverName,
StringBuffer printerName,
StringBuffer portName)
Obtain the selected printer. See Crystal Developer's Guide for more information.
- Parameters:
driverName - The name of the driver to use
printerName - The printer name to use.
portName - The name of the port to use
- Returns:
- A class describing a printer.
GetSelectedPrinterByName
HarmoniPrinterInfo GetSelectedPrinterByName(StringBuffer printName)
This method returns the printer info for the job
- Parameters:
printName, - holds the Printer Name of the job
- Returns:
- harmoniInfo, returns the printerInfo of the printer attached to the report
GetSelectionFormula
void GetSelectionFormula(StringBuffer formulaText)
Get the selection formula used in this job's report.
- Parameters:
formulaText - The StringBuffer to which the selection formula text
will be appended.
GetSQLQuery
void GetSQLQuery(StringBuffer queryBuffer)
Get the SQL query for this job's report.
- Parameters:
queryBuffer - The StringBuffer to which the SQL statement will be appended.
GetStatus
short GetStatus(HarmoniJobInfo info)
Get the status and progress statistics of a report job.
- Parameters:
info - A HarmoniJobInfo object which status information will be placed into.
- Returns:
- Indicates the status of the job. The various status codes have the following
meaning:
- HarmoniJob.JOB_NOTSTARTED
- Job has not started yet
- HarmoniJob.JOB_INPROGRESS
- Job is in progress
- HarmoniJob.JOB_COMPLETED
- Job has completed successfully
- HarmoniJob.JOB_FAILED
- Job has failed
- HarmoniJob.JOB_CANCELLED
- Job has been cancelled by the user
- HarmoniJob.JOB_HALTED
- Job has exceeded the record or time governors
- '-1'
- Either the print engine or the print job has not yet been opened.
OutputTo
void OutputTo(String outputFileName,
FormatOptions fmtOptions)
Output the job to Saffron
- Parameters:
outputFileName -
formatOptions - The options the specify the format to output to
OutputToSaffronHtml
void OutputToSaffronHtml(String htmlFileName,
HTMLFormatOptions options)
- Note: OutputToSaffronHtml() is deprecated.As of Harmoni 1.0, replaced by OutputTo(FormatOptions, DestinationOptions)
Output the job to Saffron HTML format.
- Parameters:
htmlFileName - The name of the file to export to.
options - The options to use when outputing.
OutputToSaffronPDF
void OutputToSaffronPDF(String pdfFileName,
PDFFormatOptions options)
- Note: OutputToSaffronPDF() is deprecated.As of Harmoni 1.0, replaced by OutputTo(DestinationOptions, FormatOptions)
Output the job to Saffron PDF format.
- Parameters:
pdfFileName - The name of the file to export to.
options - The options to use when outputing.
OutputToSaffronRTF
void OutputToSaffronRTF(String rtfFileName,
RTFFormatOptions options)
- Note: OutputToSaffronRTF() is deprecated.As of Harmoni 1.0, replaced by OutputTo(DestinationOptions, FormatOptions)
Output the job to Saffron RTF format.
- Parameters:
rtfFileName - The name of the file to export to.
options - The options to use when outputing.
OutputToSaffronJPEG
void OutputToSaffronJPEG(String jpegFileName,
RasterFormatOptions options)
- Note: OutputToSaffronJPEG() is deprecated.As of Harmoni 1.0, replaced by OutputTo(DestinationOptions, FormatOptions)
Output the job to Saffron JPEG format.
- Parameters:
jpegFileName - The name of the file to export to.
options - The options to use when outputing.
OutputToSaffronPNG
void OutputToSaffronPNG(String pngFileName,
RasterFormatOptions options)
- Note: OutputToSaffronPNG() is deprecated.As of Harmoni 1.0, replaced by OutputTo(DestinationOptions, FormatOptions)
Output the job to Saffron PNG format.
- Parameters:
pngFileName - The name of the file to export to.
options - The options to use when outputing.
OutputToSaffronSVG
void OutputToSaffronSVG(String svgFileName,
SVGFormatOptions options)
- Note: OutputToSaffronSVG() is deprecated.As of Harmoni 1.0, replaced by OutputTo(DestinationOptions, FormatOptions)
Output the job to Saffron SVG format.
- Parameters:
svgFileName - The name of the file to export to.
options - The options to use when outputing.
OutputToPrinter
void OutputToPrinter(int copies)
Sets the print destination for this job to be the printer. See the Crystal
Developer's Guide for more information about which printer is used.
- Parameters:
copies - The number of copies of the report to print
SetJobTitle
void SetJobTitle(String jobTitle)
Used to log any string which the user desires to the server.log file.
The purpose of this method is to allow the user to log any string
to the server.log file so that the job can be associated with the
user running the job in case errors need to reported back to that
user. For example: SetJobTitle("John Smith, Marketing Dept. ext. 5533");
SelectPrinter
void SelectPrinter(String driverName,
String printerName,
String portName,
HarmoniDEVMODE mode)
Select Printer.
- Parameters:
driverName - The name of the driver
printerName - The name of the printer
portName - The name of the port
mode - The mode in which the printer should be selected
The parameters must be supplied or a windows dialog will be thrown
up on the server machine.
SelectPrinterByName
boolean SelectPrinterByName(String printerName,
HarmoniPrinterInfo harmoniInfo)
This method sets the given printer for the report.
- Parameters:
printerName, - the printer to be attched to the report.
harmoniInfo, - is the HarmoniPrinterInfo of the printer.
- Returns:
- boolean, true if the call is succesful and false if call fails.
SetName
void SetName(String jobName)
Set the name associated with this job
- Parameters:
jobName - The name to use for this job
DeleteXmlFile
void DeleteXmlFile(boolean xmlFileStatus)
Set the deletion option the DOR file in SetPrivateData
True by default, if set to false the xml file passed by
SetPrivateData will not be deleted.
- Parameters:
xmlFileStatus - true or false value
SetNthSortField
void SetNthSortField(int sortFieldN,
String name,
int direction)
Change the given sort field's name and direction. See Crystal Developer's Help
for information on adding new sort fields to a report.
- Parameters:
sortFieldN - The number of the sort field to be changed.
name - The name of the sort data field.
direction - The new direction of the sort field (Either
HarmoniJob.SF_ASCENDING or HarmoniJob.SF_DESCENDING).
SetNthTableLogOnInfo
void SetNthTableLogOnInfo(int tableN,
HarmoniLogOnInfo logOnInfo,
boolean propagate)
Sets the SQL connection information for the given table in this job's report.
- Parameters:
tableN - The number of the table.
logOnInfo - The HarmoniLogOnInfo object which gives the new SQL connection information
for the table.
propagate - Indicates whether or not new logon information should apply to any
other tables in the report that had the same original server and database names as
the specified table.
SetPrintOptions
void SetPrintOptions(HarmoniPrintOptions options)
Set the Print Options for this report.
- Parameters:
options - Class providing Print Options. Null is not accepted.
SetSelectionFormula
void SetSelectionFormula(String formulaText)
Set the selection formula for this job's report.
- Parameters:
formulaText - The new selection formula.
SetPrivateData
String SetPrivateData(int table,
DORDataSet dod)
Pass your data objects to Harmoni using Data Object Reporting
Returns the absolute file name of this data file on the server.
- Parameters:
table - int : The table number in the report or subreport.
dod - com.dynalivery.dor.DORResultSet
SetPrivateData
OutputStream SetPrivateData()
This method is useful to set the data for a DOR report when the client wants to write
the XML representation of the data to an OutputStream. The XML must be structured
in accordance with the Microsoft schema for ADO recordsets. The Harmoni Developer's
Manual has examples of how to translate XML data representations to the Microsoft schema
for ADO recordsets using an XSLT processor. The OutputStream which is returned by this method
should be closed immediately after the XML data is written to the stream. It must certainly
be closed before the Start method is called in order for the dor data to exist on the server
before the report processing begins. The data will be set for table 0 of the dor report when
this method is called.
SetPrivateData
OutputStream SetPrivateData(int table)
This method is useful to set the data for a DOR report when the client wants to write
the XML representation of the data to an OutputStream. The XML must be structured
in accordance with the Microsoft schema for ADO recordsets. The Harmoni Developer's
Manual has examples of how to translate XML data representations to the Microsoft schema
for ADO recordsets using an XSLT processor. The OutputStream which is returned by this method
should be closed immediately after the XML data is written to the stream. It must certainly
be closed before the Start method is called in order for the dor data to exist on the server
before the report processing begins.
- Parameters:
table - int : The zero index table number in the report or subreport for multi-table dor.
SetPrivateData
String SetPrivateData(int table,
String xmlFileName)
Pass your data objects to Harmoni using Data Object Reporting
Returns the absolute file name of this data file on the server.
- Parameters:
table - int : The table number in the report or subreport.
xmlFileName - String : The full path to the xml file.
SetPrivateData
String SetPrivateData(int table,
ResultSet rs)
Pass your data objects to Harmoni using Data Object Reporting
Returns the absolute file name of this data file on the server.
- Parameters:
table - int : The table number in the report or subreport.
rs - java.sql.ResultSet : the implementation of the ResultSet interface
which describes your Data Object
SetPrivateData
String SetPrivateData(DORDataSet dod)
Pass your data objects to Harmoni using Data Object Reporting.
Returns the absolute file name of this data file on the server.
- Parameters:
dod - DORDataSet : The data object for table zero of the report or subreport.
SetPrivateData
String SetPrivateData(String xmlFileName)
The method reads an XML file from the file system and sets the private data for
table 0.Returns the absolute file name of this data file on the server.
- Parameters:
xmlFileName - java.lang.String Fully qualified path to the XML file.
SetPrivateDataFromXMLFile
String SetPrivateDataFromXMLFile(String xmlFileName)
The method reads an XML file from the file system and sets the private data for
table 0. Returns the absolute file name of this data file on the server.
- Parameters:
xmlFileName - java.lang.String Fully qualified path to the XML file.
SetNthTablePrivateDataFromXMLFile
String SetNthTablePrivateDataFromXMLFile(int table,
String xmlFileName)
The method reads an XML file from the file system and sets the private data for
table N. Returns the absolute file name of this data file on the server.
- Parameters:
table - int The table number in the report
xmlFileName - java.lang.String Fully qualified path to the XML file.
SetPrivateData
String SetPrivateData(ResultSet rs)
Pass your data objects to Harmoni using Data Object Reporting.
Returns the absolute file name of this data file on the server.
- Parameters:
rs - java.sql.ResultSet : The data object for table zero of the report or subreport.
SetPrivateData
String SetPrivateData(ResultSet rs,
ResultSetMetaData md)
Pass your data objects to Harmoni using Data Object Reporting
Returns the absolute file name of this data file on the server.
- Parameters:
rs - java.sql.ResultSet : the implementation of the ResultSet interface
which describes your Data Object
md - java.sql.ResultSetMetaData : the implementation of the ResultSetMetaData
interface which describes your Data Object
SetPrivateDataFromServerMachine
void SetPrivateDataFromServerMachine(int table,
String xmlFileName)
The method sets the private data for the table specified from a xml file
already accessible to the report server.
- Parameters:
table - The table asociated with the report in the report template.
xmlFileName - java.lang.String Fully qualified path to the XML file.
SetPrivateDataFromMainReport
void SetPrivateDataFromMainReport(int subReportTable,
HarmoniJob parent,
int mainReportTable)
The method sets the private data for the sub-report specified from dor data
previously passed to the using SetPrivateData.
- Parameters:
subReportTable - The table asociated with a sub-report in the report template.
parent - The parent job of this template.
SetSQLQuery
void SetSQLQuery(String queryString)
Set the SQL query for this job's report.
- Parameters:
queryString - The new SQL query for this job's report.
Start
void Start()
Issue a PEStartPrintJob call for the job.
getOutputAsStream
InputStream getOutputAsStream(String outputFileName)
This method will return an InputStream which contains the requested output name. This
method is useful when writting the output directly to a servlet instead of to the client disk.
- Parameters:
outputFileName - the name of the output to retrieve as a stream from the server. The
client can obtain the list of the output file names by calling getOutputFileNames.
getOutputFileNames
String[] getOutputFileNames()
This method will return an array of output file names which can be used as the outputFileName
parameter of a call to getOutputAsStream.
TestNthTableConnectivity
boolean TestNthTableConnectivity(int tableN)
Test a database table's settings to see if they are valid.
- Parameters:
tableN - The number of the table.
- Returns:
- A boolean indicating whether the settings are valid.
VerifyDatabase
boolean VerifyDatabase()
This method verifies that connection to databases specified in this report are valid.
- Returns:
- true if call is successful, falseif call fails.
setRetrieveOutputToClientDisk
void setRetrieveOutputToClientDisk(boolean value)
This method informs the report server to retrieve the output files and write
them to the client disk. This method must be called before any of the Output or Export methods.
The files are actually retrieved during the Start method call.
setRetrieveOutputAsStream
void setRetrieveOutputAsStream(boolean value)
This method informs the report server to retrieve the output as a java input stream. This
method must be called before any of the Output or Export methods.
The input stream can be obtained after the Start method completes by calling the
getOutputAsStream method.
Index