PrintVisualReport()


" "

short PrintVisualReport(long QueryID, short SourceType, BSTR Source,
 BSTR PrinterName, short NumCopies, BSTR JobTitle)

Description

This function prints a copy of a visual report.

Parameters

Name Description
QueryID The ID of the query, as returned from InitializeQuery().
SourceType The source for the visual report.

  • 1 (RSF_DATABASE) -- Use a visual report that is stored on the database. Specify the visual report owner and name (Owner.Name) in the BSTR Source parameter. To use a visual report located on a different database server, first use ExportVisualReport() to export the visual report to a file and then specify a SourceType of RSF_FILE.
  • 2 (RSF_FILE) -- Use a visual report contained in a file. Specify the filename in the BSTR Source parameter.

Source A string containing the database owner name (owner.name) or the filename of the visual report.
PrinterName Specifies the name of the printer on which to print the report.
NumCopies Specifies the number of copies to print when printing the report.
JobTitle Specifies the name of the print job as it will be displayed in Print Manager.

Return Value

Return value will be zero if successful or non=zero if unsuccessful. If the return value is non=zero, you can call GetLastErrorString(), GetLastErrorType(), GetLastSQLCode(), GetLastSQLError(), or GetLastSQLState() to get additional error information.

Related Tasks

ExportVisualReport()