[ROOT] --> C++Client

class PCREJob
    inherited from virtual public PCRESynchronized

PCREJob class contains all of the API calls which relate to a report-engine job. The functionality of the class mirrors that of the Java Client.

Author:
Copyright (c) 2000 Dynalivery Corp., All Rights Reserved.

Version:
2.4.0

Source:
MobileApps\PCRE\CppClient\Include\pcrejob.h

Friends:
 friend class PCREEngine ;
 friend class PCREJobTable ;

Enums Index

{


Methods Index

Cancel
Cancels the printing of this job. Typically, this will be tied to a 'cancel' button in the GUI.
CheckFormula
Checks the named formula for validity.
CheckGroupSelectionFormula
Test the group selection formula for validity.
CheckSelectionFormula
Test the selection formula for validity.
Close
Closes the print job. If printing has not yet finished, it continues. See Crystal Developer's Guide for more information.
CloseSubreport
Closes this subreport job.
DeleteNthGroupSortField
Delete a given group sort field from a report.
DeleteNthSortField
Delete a given sort field from a report.
DiscardSavedData
Discard the saved data associated with this job's report.
EnableProgressDialog
Controls the displaying of the print progress dialog box.
ExportTo
Export the report to a variety of formats.
ExportTo
Export the report to a variety of formats.
GetAreaFormat
Get the area format settings for the specified area.
GetAreaFormatFormula
getEngine
Get the engine that opened this job
GetErrorCode
Issue a PEGetErrorCode call for the job.
GetErrorText
Issue a PEGetErrorText call for the job.
GetFormula
Get the text for the given (named) formula.
GetGraphData
Get information about the data of a given graph.
GetGraphOptions
Get information about the options of a given graph.
GetGraphText
Get information about the text of a given graph.
GetGraphType
Get information about the type of a given graph.
GetGroupCondition
Examine the group condition for a group section.
GetGroupOptions
GetGroupSelectionFormula
Examine the group selection string.
getHandle
Get the handle used by this job
GetMargins
retrieve the margin settings for this report.
GetMinimumSectionHeight
Get the minimum height for a given section. See Crystal Developer's help.
GetName
Get the name associated with this job
GetNDetailCopies
Returns the number of copies of each Details section in the report that are to be printed.
GetNFormulas
Get the number of formulae which are used in this job's report
GetNGroups
Get the number of groups in this report.
GetNGroupSortFields
Get the number of group sort fields in the current report.
GetNPages
Get the number of pages in the report. This should only be called after the report has been run.
GetNParameterFields
Get the number of parameter fields in this job's report.
GetNParams
GetNSections
Get the number of sections in this report.
GetNSortFields
Get the number of sort fields in this job's report.
GetNSubreportsInSection
Get the number of subreports in a given section
GetNTables
Get the number of tables in this report.
GetNthFormula
Get the nth formula from this job's report. Both the formula name and text are returned
GetNthFormulaStr
Get the Nth formula from this job's report.
GetNthGroupSortField
Get the name and sort direction of a given group sort field.
GetNthParam
Retrieve the specified param.
GetNthParameterField
Get details about the nth parameter field in this job's report.
GetNthSortField
Get the name and sort direction of a given sort field.
GetNthSubreportInSection
Get the Nth subreport in a given section.
GetNthTableLocation
Get the location information for a given table in the report.
GetNthTableLogOnInfo
Get the SQL connection information for the nth table in this job's report.
GetNthTableSessionInfo
Get the session information for an MS Access table being used by the report.
GetNthTableType
Get information about the type of a given database table.
GetParameterField
Retieve the paramter information for a parameter with the specified name.
getParent
Get the parent of this job, this is meaningless unless the job is a supreport.
GetPrintDate
Get the print date for the job's report.
GetReportSummaryInfo
Retrieve the summary information for the report.
GetReportTitle
Get the title of this job's report.
GetSectionCode
Get the section code for the specified section. See Crystal Developer's help.
GetSectionFormat
Get the section format settings for specified section.
GetSectionFormatFormula
GetSelectedPrinter
Determine the printer that this report will be printed to.
GetSelectionFormula
Get the selection formula used in this job's report.
GetSQLQuery
GetSQLQuery () returns the same query as appears in the Show SQL Query dialog in CRW, in syntax specific to the database driver you are using.
GetStatus
Get the status and progress statistics of a report job.
getStatus
Get the status of this report job.
HasSavedData
Checks to see if this job's report contains saved data.
IsFinished
Check to see if this print job has finished.
OutputToPDF
Output the report in PDF format.
OutputToPrinter
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.
SelectPrinter
Select the printer that this report will be printed to. [The parameters must be supplied or a windows dialog will be thrown up on the server machine.]
SetAreaFormat
Set the area format settings for the specified area.
SetAreaFormatFormula
Sets the formatting options for a report area.
SetFont
Set Font Details. See Crystal Developer's Guide for more information.
SetFormula
Set the text for a given (named) formula.
SetGraphData
Set information about the data of a given graph.
SetGraphOptions
Set information about the text of a given graph.
SetGraphText
Set information about the text of a given graph.
SetGraphType
Set information about the type of a given graph.
SetGroupCondition
Change the group condition for a group section.
SetGroupOptions
SetGroupSelectionFormula
Change the group selection string.
SetMargins
Set the margins for this report.
SetMinimumSectionHeight
Set the minimum height for a given section. See Crystal Developer's help.
SetName
Set the name associated with this job
SetNDetailCopies
Change the number of detail copies
SetNthGroupSortField
Set the name and sort direction of a given group sort field.
SetNthParam
Change the specified param.
SetNthParameterField
Set details about the nth parameter field in this job's report.
SetNthSortField
Set the name and sort direction of a given sort field.
SetNthTableLocation
Set the location information for a given table in the report.
SetNthTableLogOnInfo
Set the SQL connection information for the nth table in this job's report.
SetNthTableSessionInfo
Set the session information for an MS Access table being used by the report.
SetParameterField
Change the paramter information for a parameter with the specified name.
SetPrintDate
Set the print date for the job's report.
SetPrintOptions
Set the options for printing.
SetReportSummaryInfo
Change the summary information for the report.
SetReportTitle
Set the title of this job's report.
SetSectionFormat
Sets the section format settings for specified section.
SetSelectionFormula
Set the selection formula for this job's report.
SetSQLQuery
Set the SQL query for this report.
SetSQLQuery () is mostly useful for reports with SQL queries that were explicitly edited in the Show SQL Query dialog in CRW, i.e. those reports that needed database-specific selection criteria or joins. (Otherwise it is usually best to continue using function calls such as SetSelectionFormula () and let CRW build the SQL query automatically.)
Start
Issue a PEStartPrintJob call for the job.
StrAlloc
Allocate a string for use by CORBA.
StrDup
Copy a string for use by CORBA.
StrFree
Free memory allocated for a string by CORBA. It is important that all the Str* methods have their memory freed by this call, rather than the standard free().
StrReAlloc
Re-allocate a string for use by CORBA, changing the size of the string
TestNthTableConnectivity
This function tests whether a database table's settings are valid and ready to be reported on. It returns true if the database session, log on, and location info is all correct.


Enums

{

public enum { jobClosed = 0 ,
              jobOpened = 1 } ;


Methods

StrAlloc

 static char * StrAlloc ( unsigned int len ) ;

Allocate a string for use by CORBA.

Parameters:
len The size of the string to allocate

Return:
A pointer to the memory allocated, NULL on failure. This memory should be free'd by StrFree

StrReAlloc

 static char * StrReAlloc ( const char * str ,
                                  unsigned int len ) ;

Re-allocate a string for use by CORBA, changing the size of the string

Parameters:
str A pointer to the current string.
len The size of the string to allocate

Return:
A pointer to the memory allocated, NULL on failure. This memory should be free'd by StrFree

StrDup

 static char * StrDup ( const char * str ) ;

Copy a string for use by CORBA.

Parameters:
str A pointer to the current string.

Return:
A pointer to a new copy of the string. This memory should be free'd by StrFree

StrFree

 static void StrFree ( char * str ) ;

Free memory allocated for a string by CORBA. It is important that all the Str* methods have their memory freed by this call, rather than the standard free().

Parameters:
str A pointer to the string to be freed. Once this call has been made this memory is not useable by the caller.

SetName

 void SetName ( const char * jobName ) ;

Set the name associated with this job

Parameters:
jobName The name to use for this job

GetName

 char * GetName ( ) ;

Get the name associated with this job

Return:
The name of this job.

getStatus

 int getStatus ( ) ;

Get the status of this report job.

Return:
Indicates the status of the job. The various status codes have the following meaning:

PCREJob.JOB_NOTSTARTED
Job has not started yet
PCREJob.JOB_INPROGRESS
Job is in progress
PCREJob.JOB_COMPLETED
Job has completed successfully
PCREJob.JOB_FAILED
Job has failed
PCREJob.JOB_CANCELLED
Job has been cancelled by the user
PCREJob.JOB_HALTED
Job has exceeded the record or time governors
'-1'
Either the print engine or the print job has not yet been opened.

getHandle

 int getHandle ( ) ;

Get the handle used by this job

Return:
The handle representing this job.

getEngine

 PCREEngine * getEngine ( ) ;

Get the engine that opened this job

Return:
The engine that opened this job

getParent

 PCREJob * getParent ( ) ;

Get the parent of this job, this is meaningless unless the job is a supreport.

Return:
The parent job of this job

GetErrorCode

 int GetErrorCode ( ) ;

Issue a PEGetErrorCode call for the job.

Return:
The code for the last error which occured.

GetErrorText

 const char * GetErrorText ( ) ;

Issue a PEGetErrorText call for the job.

Return:
The text description for the last error which occured.

Start

 void Start ( ) ;

Issue a PEStartPrintJob call for the job.

Return:
Indicates success or failure of call

GetStatus

 int GetStatus ( PEJobInfo * jobInfo ) ;

Get the status and progress statistics of a report job.

Parameters:
info A PCREJobInfo object which status information will be placed into.

Return:
Indicates the status of the job. The various status codes have the following meaning:

PCREJob.JOB_NOTSTARTED
Job has not started yet
PCREJob.JOB_INPROGRESS
Job is in progress
PCREJob.JOB_COMPLETED
Job has completed successfully
PCREJob.JOB_FAILED
Job has failed
PCREJob.JOB_CANCELLED
Job has been cancelled by the user
PCREJob.JOB_HALTED
Job has exceeded the record or time governors
'-1'
Either the print engine or the print job has not yet been opened.

IsFinished

 BOOL IsFinished ( ) ;

Check to see if this print job has finished.

Return:
True if the print job has finished, false otherwise

Close

 void Close ( ) ;

Closes the print job. If printing has not yet finished, it continues. See Crystal Developer's Guide for more information.

CloseSubreport

 void CloseSubreport ( ) ;

Closes this subreport job.

Cancel

 void Cancel ( ) ;

Cancels the printing of this job. Typically, this will be tied to a 'cancel' button in the GUI.

EnableProgressDialog

 void EnableProgressDialog ( BOOL enable ) ;

Controls the displaying of the print progress dialog box.

Parameters:
enable Indicates whether the print progress dialog should appear or not

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

SelectPrinter

 void SelectPrinter ( const char * driverName ,
                            const char * printerName ,
                            const char * portName ,
                            DEVMODE * mode ) ;

Select the printer that this report will be printed to. [The parameters must be supplied or a windows dialog will be thrown up on the server machine.]

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

GetSelectedPrinter

 void GetSelectedPrinter ( char * & driverName ,
                                 char * & printerName ,
                                 char * & portName ,
                                 DEVMODE * * mode ) ;

Determine the printer that this report will be printed to.

Parameters:
driverName The name of the driver to use
portName The name of the port to use
mode Upon completion mode will contain information about the printer.

OutputToPDF

 void OutputToPDF ( const char * pdfFileName ,
                          PCREPDFOutputOptions * pdfOptions = NULL ) ;

Output the report in PDF format.

Parameters:
pdfFileName The name of the PDF output file.
options Additional options controlling PDF generation.

ExportTo

 void ExportTo ( PCREExportOptions * exports ) ;

Export the report to a variety of formats.

Parameters:
exports A PCRExportOptions object describing the format of the export.

ExportTo

 void ExportTo ( PEExportOptions * exports ) ;

Export the report to a variety of formats.

Parameters:
exports A PExportOptions object describing the format of the export.

GetReportTitle

 const char * GetReportTitle ( ) ;

Get the title of this job's report.

SetReportTitle

 void SetReportTitle ( const char * title ) ;

Set the title of this job's report.

Parameters:
titleString The new title for the report.

SetPrintOptions

 void SetPrintOptions ( PEPrintOptions * options ) ;

Set the options for printing.

Parameters:
options The options to use for printing

HasSavedData

 BOOL HasSavedData ( ) ;

Checks to see if this job's report contains saved data.

Return:
Indicates whether the report has saved data.

DiscardSavedData

 void DiscardSavedData ( ) ;

Discard the saved data associated with this job's report.

GetNFormulas

 int GetNFormulas ( ) ;

Get the number of formulae which are used in this job's report

Return:
The number of formulae used.

GetNthFormula

 void GetNthFormula ( int nFormula ,
                            char * & formulaName ,
                            char * & formulaText ) ;

Get the nth formula from this job's report. Both the formula name and text are returned

Parameters:
nFormula The index of the formula to be retrieved.
formulaName Where the formula name will be returned.
formulaText Where the formula text will be returned.

GetNthFormulaStr

 void GetNthFormulaStr ( short nFormula ,
                               char * & formulaName ,
                               char * & formulaText ) ;

Get the Nth formula from this job's report.

See Also:
GetNthFormula

GetFormula

 void GetFormula ( char * formulaName ,
                         char * & formulaText ) ;

Get the text for the given (named) formula.

Parameters:
formulaName The name of the formula.
formulaText Where the formula text will be returned.

GetSelectionFormula

 void GetSelectionFormula ( char * & formulaText ) ;

Get the selection formula used in this job's report.

Parameters:
formulaText Where the selection formula text will be returned.

SetSelectionFormula

 void SetSelectionFormula ( const char * formulaText ) ;

Set the selection formula for this job's report.

Parameters:
formulaText The new selection formula.

CheckSelectionFormula

 BOOL CheckSelectionFormula ( ) ;

Test the selection formula for validity.

Return:
True if the formula is valid, false otherwise.

CheckGroupSelectionFormula

 BOOL CheckGroupSelectionFormula ( ) ;

Test the group selection formula for validity.

Return:
True if the formula is valid, false otherwise.

SetFormula

 void SetFormula ( const char * formulaName ,
                         const char * formulaText ) ;

Set the text for a given (named) formula.

Parameters:
formulaName The name of the formula whose text is being changed.
formulaText The new text for the formula.

CheckFormula

 BOOL CheckFormula ( const char * formulaText ) ;

Checks the named formula for validity.

Parameters:
formulaName The name of the formula to check.

Return:
boolean indicating whether the formula is legal.

GetNParams

 int GetNParams ( ) ;

GetNParameterFields

 int GetNParameterFields ( ) ;

Get the number of parameter fields in this job's report.

Return:
The number of parameter fields in the report.

GetNthParameterField

 void GetNthParameterField ( int paramN ,
                                   PCREParameterField * info ) ;

Get details about the nth parameter field in this job's report.

Parameters:
paramN The number of the parameter field.
info The PCREParameterFieldInfo for the given parameter field.

SetNthParameterField

 void SetNthParameterField ( int paramN ,
                                   PCREParameterField * info ) ;

Set details about the nth parameter field in this job's report.

Parameters:
paramN The number of the parameter field.
info The PCREParameterFieldInfo for the given parameter field.

GetNthParam

 void GetNthParam ( int paramN ,
                          char * & parameter ) ;

Retrieve the specified param.

Parameters:
paramN The number of the param that should be retrieved.
parameter Where the parameter should be copied to.

SetNthParam

 void SetNthParam ( int paramN ,
                          const char * parameter ) ;

Change the specified param.

Parameters:
paramN The number of the param that should be changed.
parameter The new value of the parameter.

GetNSortFields

 int GetNSortFields ( ) ;

Get the number of sort fields in this job's report.

Return:
The number of sort fields.

GetNthSortField

 void GetNthSortField ( short sortFieldN ,
                              char * & name ,
                              short * direction ) ;

Get the name and sort direction of a given sort field.

Parameters:
sortFieldN The sort field which we are interested in.
nameHandle Handle to use for the name.
nameLength The maximum length of the name
Direction Either PCREJob.SF_ASCENDING or PCREJob.SF_DESCENDING to indicate the sort field direction.

SetNthSortField

 void SetNthSortField ( short sortFieldN ,
                              char * name ,
                              short direction ) ;

Set the name and sort direction of a given sort field.

Parameters:
sortFieldN The sort field which we are interested in.
name The name of the sort field to set.
Direction Either PCREJob.SF_ASCENDING or PCREJob.SF_DESCENDING to indicate the sort field direction.

DeleteNthSortField

 void DeleteNthSortField ( short sortFieldN ) ;

Delete a given sort field from a report.

Parameters:
sortFieldN The number of the sort field to delete.

GetNGroupSortFields

 int GetNGroupSortFields ( ) ;

Get the number of group sort fields in the current report.

Return:
The number of group sort fields.

GetNthGroupSortField

 void GetNthGroupSortField ( short sortFieldN ,
                                   char * & name ,
                                   short * direction ) ;

Get the name and sort direction of a given group sort field.

Parameters:
sortFieldN The number of the sort field.
name Where the group sort field name will be stored.
direction The direction of the group sort field (PCREJob.SF_ASCENDING or PCREJob.SF_DESCENDING).

SetNthGroupSortField

 void SetNthGroupSortField ( short sortFieldN ,
                                   char * name ,
                                   short direction ) ;

Set the name and sort direction of a given group sort field.

Parameters:
sortFieldN The number of the sort field.
name The group sort field name to be set.
direction The direction of the group sort field (PCREJob.SF_ASCENDING or PCREJob.SF_DESCENDING).

DeleteNthGroupSortField

 void DeleteNthGroupSortField ( short sortFieldN ) ;

Delete a given group sort field from a report.

Parameters:
sortFieldN The number of the sort field to delete.

GetPrintDate

 void GetPrintDate ( short * year ,
                           short * month ,
                           short * day ) ;

Get the print date for the job's report.

Parameters:
year Where to return the year.
month Where to return the month.
day Where to return the day.

SetPrintDate

 void SetPrintDate ( short year ,
                           short month ,
                           short day ) ;

Set the print date for the job's report.

Parameters:
year The year to set.
month The month to set.
day The day to set.

GetNGroups

 int GetNGroups ( ) ;

Get the number of groups in this report.

Return:
The number of groups.

GetNSections

 int GetNSections ( ) ;

Get the number of sections in this report.

Return:
The number of sections.

GetNSubreportsInSection

 int GetNSubreportsInSection ( short sectionCode ) ;

Get the number of subreports in a given section

Parameters:
sectionCode The code for the relevant section.

Return:
The number of subreports in the named section

GetNthSubreportInSection

 void GetNthSubreportInSection ( short sectionCode ,
                                       short subreportN ,
                                       PESubreportInfo * info ) ;

Get the Nth subreport in a given section.

Parameters:
sectionCode The code for the relevant section.
subreportN The ordinal number of the subreport required.
info A pointer to a structure to contain the subreport info returned.

GetSectionCode

 int GetSectionCode ( short sectionN ) ;

Get the section code for the specified section. See Crystal Developer's help.

Parameters:
sectionN The number of the section which you want the code for.

Return:
The section code for the given section

GetMinimumSectionHeight

 int GetMinimumSectionHeight ( short sectionN ) ;

Get the minimum height for a given section. See Crystal Developer's help.

Parameters:
sectionN The code for the section which you want the height for.

Return:
The minimum height for the specified section in twips.

SetMinimumSectionHeight

 void SetMinimumSectionHeight ( short sectionN ,
                                      short height ) ;

Set the minimum height for a given section. See Crystal Developer's help.

Parameters:
sectionN The code for the section which you want to set the height for.
height The minimum height for the specified section in twips.

GetAreaFormat

 void GetAreaFormat ( short areaCode ,
                            PESectionOptions * options ) ;

Get the area format settings for the specified area.

Parameters:
areaCode The code for the report area you are interested in.
options The section options for the specified area to be copied into.

SetAreaFormat

 void SetAreaFormat ( short areaCode ,
                            PESectionOptions * options ) ;

Set the area format settings for the specified area.

Parameters:
areaCode The code for the report area you are interested in.
options The section options you wish to set for the specified area.

SetAreaFormatFormula

 void SetAreaFormatFormula ( short areaCode ,
                                   short formulaName ,
                                   const char * formulaString ) ;

Sets the formatting options for a report area.

Parameters:
areaCode The code for the report area whose formatting options are being changed.
formulaName See Crystal Developers help for a list for legal names.
formulaString The new formula text.

SetGroupCondition

 void SetGroupCondition ( short sectionCode ,
                                const char * conditionField ,
                                short condition ,
                                short sortDirection ) ;

Change the group condition for a group section.

Parameters:
sectionCode The code for the report section for which you wish to change the group condition.
conditionField Specifies the field is a condition that triggers a summary whenever its value changes
condition See Crystal Developer's Help.
sortDirection Specifies the sort direction (PCREJob.SF_ASCENDING or PCREJob.SF_DESCENDING)

GetGroupCondition

 void GetGroupCondition ( short sectionCode ,
                                char * & conditionField ,
                                short & condition ,
                                short & sortDirection ) ;

Examine the group condition for a group section.

Parameters:
sectionCode The code for the report section for which you wish to view the group condition.
conditionField Specifies the field is a condition that triggers a summary whenever its value changes
condition See Crystal Developer's Help.
sortDirection Specifies the sort direction (PCREJob.SF_ASCENDING or PCREJob.SF_DESCENDING)

GetGroupSelectionFormula

 void GetGroupSelectionFormula ( char * & selectionString ) ;

Examine the group selection string.

Parameters:
selectionString Where the selection string should be placed.

SetGroupSelectionFormula

 void SetGroupSelectionFormula ( char * selectionString ) ;

Change the group selection string.

Parameters:
selectionString The new selection formula to use.

GetSectionFormat

 void GetSectionFormat ( short sectionCode ,
                               PESectionOptions * options ) ;

Get the section format settings for specified section.

Parameters:
sectionCode The code for the section which you wish to modify.
options The format options for the specified section will be copied here.

SetSectionFormat

 void SetSectionFormat ( short sectionCode ,
                               PESectionOptions * options ) ;

Sets the section format settings for specified section.

Parameters:
sectionCode The code for the section which you wish to modify.
options The new format options which you wish to apply to the section.

SetFont

 void SetFont ( short sectionCode ,
                      short scopeCode ,
                      const char * faceName ,
                      short fontFamily ,
                      short fontPitch ,
                      short charSet ,
                      short pointSize ,
                      short isItalic ,
                      short isUnderlined ,
                      short isStruckOut ,
                      short weight ) ;

Set Font Details. See Crystal Developer's Guide for more information.

Parameters:
sectionCode The section to change font for
scopeCode The scopt code - See Crystal Developers help
faceName The name of the font
fontFamily The family of the font
fontPitch The font pitch
charSet The character set code
pointSize The point size of the font
isItalic Is the font intalic?
isUnderlined Is the font underlined?
isStruckOut Is the font struck out?
weight The density, or boldness, of the font

GetGraphType

 void GetGraphType ( short sectionCode ,
                           short graphN ,
                           short * graphType ) ;

Get information about the type of a given graph.

Parameters:
sectionCode The code for the section which the graph is in.
The number of the graph within its section.
graphType The code describing the graph type, will be copied here. See Crystal Developer's Help.

SetGraphType

 void SetGraphType ( short sectionCode ,
                           short graphN ,
                           short * newType ) ;

Set information about the type of a given graph.

Parameters:
sectionCode The code for the section which the graph is in.
The number of the graph within its section.
graphType The new graph code to use.

GetGraphData

 void GetGraphData ( short sectionCode ,
                           short graphN ,
                           PEGraphDataInfo * graphDataInfo ) ;

Get information about the data of a given graph.

Parameters:
sectionCode The code for the section which the graph is in.
The number of the graph within its section.
graphData The structure describing the graph data, will be copied here. See Crystal Developer's Help.

SetGraphData

 void SetGraphData ( short sectionCode ,
                           short graphN ,
                           PEGraphDataInfo * graphDataInfo ) ;

Set information about the data of a given graph.

Parameters:
sectionCode The code for the section which the graph is in.
The number of the graph within its section.
graphData The new graph data to use for this graph.

GetGraphText

 void GetGraphText ( short sectionCode ,
                           short graphN ,
                           PEGraphTextInfo * graphTextInfo ) ;

Get information about the text of a given graph.

Parameters:
sectionCode The code for the section which the graph is in.
The number of the graph within its section.
graphText The structure describing the graph text, will be copied here. See Crystal Developer's Help.

SetGraphText

 void SetGraphText ( short sectionCode ,
                           short graphN ,
                           PEGraphTextInfo * graphTextInfo ) ;

Set information about the text of a given graph.

Parameters:
sectionCode The code for the section which the graph is in.
The number of the graph within its section.
graphText The new graph text to use for this graph.

GetGraphOptions

 void GetGraphOptions ( short sectionCode ,
                              short graphN ,
                              PEGraphOptions * graphOptions ) ;

Get information about the options of a given graph.

Parameters:
sectionCode The code for the section which the graph is in.
The number of the graph within its section.
graphOptions The structure describing the graph options, will be copied here. See Crystal Developer's Help.

SetGraphOptions

 void SetGraphOptions ( short sectionCode ,
                              short graphN ,
                              PEGraphOptions * graphOptions ) ;

Set information about the text of a given graph.

Parameters:
sectionCode The code for the section which the graph is in.
The number of the graph within its section.
graphOptions The new graph options to use for this graph.

GetSQLQuery

 char * GetSQLQuery ( ) ;

GetSQLQuery () returns the same query as appears in the Show SQL Query dialog in CRW, in syntax specific to the database driver you are using.

Return:
The SQL query set for this report.

SetSQLQuery

 void SetSQLQuery ( char * queryString ) ;

Set the SQL query for this report.
SetSQLQuery () is mostly useful for reports with SQL queries that were explicitly edited in the Show SQL Query dialog in CRW, i.e. those reports that needed database-specific selection criteria or joins. (Otherwise it is usually best to continue using function calls such as SetSelectionFormula () and let CRW build the SQL query automatically.)

SetSQLQuery () has the same restrictions as editing in the Show SQL Query dialog; in particular that changes are accepted in the FROM and WHERE clauses but ignored in the SELECT list of fields.

Parameters:
queryString The new SQL Query string.

GetNTables

 int GetNTables ( ) ;

Get the number of tables in this report.

Return:
The number of tables in this report.

GetNthTableType

 void GetNthTableType ( short tableN ,
                              PETableType * tableType ) ;

Get information about the type of a given database table.

Parameters:
tableN The number of the table.
tableTyple A PETableType object giving information about the table type.

GetNthTableSessionInfo

 void GetNthTableSessionInfo ( short tableN ,
                                     PESessionInfo * sessionInfo ) ;

Get the session information for an MS Access table being used by the report.

Parameters:
tableN The number of the table.
sessioninfo A PCRESessionInfo object giving information about the access session.

SetNthTableSessionInfo

 void SetNthTableSessionInfo ( short tableN ,
                                     PESessionInfo * sessionInfo ,
                                     BOOL propagateAcrossTables ) ;

Set the session information for an MS Access table being used by the report.

Parameters:
tableN The number of the table.
sessioninfo A PCRESessionInfo object giving information about the access session.
propagateAcrossTable Indicates whether the new session infomation should be used for opening all tables used in the report.

TestNthTableConnectivity

 BOOL TestNthTableConnectivity ( short tableN ) ;

This function tests whether a database table's settings are valid and ready to be reported on. It returns true if the database session, log on, and location info is all correct.

This is useful, for example, in prompting the user and testing a server password before printing begins.

This function may require a significant amount of time to complete, since it will first open a user session (if required), then log onto the database server (if required), and then open the appropriate database table (to test that it exists). It does not read any data, and closes the table immediately once successful. Logging off is performed when the print job is closed.

If it fails in any of these steps, the error code set indicates which database info needs to be updated using functions above:

Parameters:
tableN The number of the table to test.

Return:
true If the database session, log on, and location info is all correct.

GetNthTableLogOnInfo

 void GetNthTableLogOnInfo ( short tableN ,
                                   PELogOnInfo * logOnInfo ) ;

Get the SQL connection information for the nth table in this job's report.

Parameters:
tableN The number of the table.
logOnInfo The SQL connection information will be copied here.

SetNthTableLogOnInfo

 void SetNthTableLogOnInfo ( short tableN ,
                                   PELogOnInfo * logOnInfo ,
                                   BOOL propagateAcrossTables ) ;

Set the SQL connection information for the nth table in this job's report.

Parameters:
tableN The number of the table.
logOnInfo The new SQL connection information to use.
propagateAcrossTable Indicates whether the new session infomation should be used for opening all tables used in the report.

GetNthTableLocation

 void GetNthTableLocation ( short tableN ,
                                  PETableLocation * location ) ;

Get the location information for a given table in the report.

Parameters:
tableN The number of the table.
location A PETableLocation object giving information about the tables location.

SetNthTableLocation

 void SetNthTableLocation ( short tableN ,
                                  PETableLocation * location ) ;

Set the location information for a given table in the report.

Parameters:
tableN The number of the table.
location The new PETableLocation object to use for this table.

GetNDetailCopies

 int GetNDetailCopies ( ) ;

Returns the number of copies of each Details section in the report that are to be printed.

Return:
The number of copies to be printed.

SetNDetailCopies

 void SetNDetailCopies ( short nCopies ) ;

Change the number of detail copies

Parameters:
nCopies The number of multiple copies of the Details section of the report to print.

GetMargins

 void GetMargins ( short * left ,
                         short * right ,
                         short * top ,
                         short * bottom ) ;

retrieve the margin settings for this report.

Parameters:
left Where to return the left margin setting to.
right Where to return the right margin setting to.
top Where to return the top margin setting to.
bottom Where to return the bottommargin setting to.

SetMargins

 void SetMargins ( short left ,
                         short right ,
                         short top ,
                         short bottom ) ;

Set the margins for this report.

Parameters:
left The value to use for the left margin
right The value to use for the right margin
top The value to use for the top margin
bottom The value to use for the bottom margin

GetNPages

 int GetNPages ( ) ;

Get the number of pages in the report. This should only be called after the report has been run.

Return:
The number of pages in the report

GetReportSummaryInfo

 void GetReportSummaryInfo ( PEReportSummaryInfo * info ) ;

Retrieve the summary information for the report.

Parameters:
info A structure that will hold the report summary information.

SetReportSummaryInfo

 void SetReportSummaryInfo ( PEReportSummaryInfo * info ) ;

Change the summary information for the report.

Parameters:
info The new report summary information to use.

GetParameterField

 void GetParameterField ( char * fieldName ,
                                PEParameterFieldInfo * output ) ;

Retieve the paramter information for a parameter with the specified name.

Parameters:
fieldName The name of the parameter that we are interested in looking at.
output Where to retrieve the information. This pointer will be NULL if the field cannot be found.

SetParameterField

 BOOL SetParameterField ( char * fieldName ,
                                PEParameterFieldInfo * newInfo ) ;

Change the paramter information for a parameter with the specified name.

Parameters:
fieldName The name of the parameter that we are interested in changing.
output The new information to set for this parameter.

Return:
True if the update was made, false if the field couldn't be found, or any error.

GetAreaFormatFormula

 void GetAreaFormatFormula ( short areaCode ,
                                   short formulaName ,
                                   char * & text ) ;

GetGroupOptions

 void GetGroupOptions ( short groupN ,
                              PEGroupOptions * groupOptions ) ;

SetGroupOptions

 void SetGroupOptions ( short groupN ,
                              PEGroupOptions * groupOptions ) ;

GetSectionFormatFormula

 void GetSectionFormatFormula ( short sectionCode ,
                                      short formulaName ,
                                      char * & text ) ;


Copyright (c) 2000 Dynalivery Corp.