Change Job name of a report builer print job
Change Job name of a report builer print job
If TD prints a report by SalPrintReport() the jobname is the same as the called qrp file (with path). Is there any chance to change the print job displayed at the print spooler queue by program?
Re: Change Job name of a report builer print job
Hello,
I think SalReportDlgOptions is what you are looking for and strDocName is the value you want to change
bOk = SalReportDlgOptions ( hWndReport, strCaption, strLine1, strLine2, strDocName )
Sets the options for the report printing dialog box. Call this function after creating the report but before printing begins. For example, you can call SalReportDlgOptions while processing the SAM_ReportFetchInit message.
Parameters
hWndReport Window Handle. The wParam of a SAM_Report* message that contains the window handle.
strCaption String. The replacement text for the Print dialog box caption text.
strLine1 String. The replacement text for the first centered-text field.
strLine2 String. The replacement text for the second centered-text field.
strDocName String. The name of the document that Print Manager displays when the output is spooled and waiting to print.
Return Value
bOk is TRUE if the function succeeds and FALSE if it fails.
Example
On SAM_ReportFetchInit
! Warn the user about a long report
If NOT SalReportDlgOptions ( SalNumberToWindowHandle (wParam ), 'Sales Report', 'This is a long report', 'Hit CANCEL to quit', 'sales.rpt' )
HTH
Mirko
I think SalReportDlgOptions is what you are looking for and strDocName is the value you want to change
bOk = SalReportDlgOptions ( hWndReport, strCaption, strLine1, strLine2, strDocName )
Sets the options for the report printing dialog box. Call this function after creating the report but before printing begins. For example, you can call SalReportDlgOptions while processing the SAM_ReportFetchInit message.
Parameters
hWndReport Window Handle. The wParam of a SAM_Report* message that contains the window handle.
strCaption String. The replacement text for the Print dialog box caption text.
strLine1 String. The replacement text for the first centered-text field.
strLine2 String. The replacement text for the second centered-text field.
strDocName String. The name of the document that Print Manager displays when the output is spooled and waiting to print.
Return Value
bOk is TRUE if the function succeeds and FALSE if it fails.
Example
On SAM_ReportFetchInit
! Warn the user about a long report
If NOT SalReportDlgOptions ( SalNumberToWindowHandle (wParam ), 'Sales Report', 'This is a long report', 'Hit CANCEL to quit', 'sales.rpt' )
HTH
Mirko
Re: Change Job name of a report builer print job
Thank you very much. It works.
Who is online
Users browsing this forum: [Ccbot] and 0 guests