Change Job name of a report builer print job

Discussion forum about all things Report Builder (all versions).
Nils Jänicke
Germany
Posts: 423
Joined: 20 Sep 2017, 11:56
Location: Villingen-Schwenningen, Germany

Change Job name of a report builer print job

Post by Nils Jänicke » 25 Feb 2014, 16:03

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?

Mirko
Italy
Posts: 1299
Joined: 04 Apr 2017, 08:56
Location: Geneva

Re: Change Job name of a report builer print job

Post by Mirko » 25 Feb 2014, 16:39

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

Nils Jänicke
Germany
Posts: 423
Joined: 20 Sep 2017, 11:56
Location: Villingen-Schwenningen, Germany

Re: Change Job name of a report builer print job

Post by Nils Jänicke » 25 Feb 2014, 16:48

Thank you very much. It works.

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 0 guests