Kbase P3546: Report Builder is not printing more than 1 copy from the printer-setup dialog box
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  3/29/2006 |
|
Status: Unverified
FACT(s) (Environment):
Windows 95
Windows 98
Windows ME
SYMPTOM(s):
Report Builder
Report Builder is not printing more than 1 copy
Using the printer-setup dialog box to enter number of copies
Multiple copies are entered in the "Number of copies" field
Problem is seen with a number of printer brands
RB-NUMBER-COPIES is not used
CAUSE:
Bug# 20010502-003
CAUSE:
When using Report Builder there are several places that contain the "Number of copies" field:
1) Report -> Print (Report Builder)
2) RB-NUMBER-COPIES parameter (Report Engine)
3) Report -> Printer Setup
or
RB-PRINTER-NAME = "?"
The last option will display the MS Windows Printer Setup dialog box. Report Builder overrides the value that is entered in "Number of copies" field with the values from either 1 or 2 above.
FIX:
Option #1
If a set number of copies of a particular report need to be printed then ths can be set in the Report Designer. When printing the report, it will always print the number of copies specified so long as RB-NUMBER-COPIES is set to zero (0). This is covered in the Progress Report Builder User's Guide, 15-3.
Option #2
If a variable number of copies is required then this can be done by setting RB-NUMBER-COPIES programmatically. This can be achieved in a manner similar to the following:
/* Sample Code */
DEFINE VARIABLE RB-PRINTER-NAME AS CHARACTER NO-UNDO.
DEFINE VARIABLE RB-NUMBER-COPIES AS INTEGER INIT 0 NO-UNDO.
SYSTEM-DIALOG PRINTER-SETUP.
RB-PRINTER-NAME = SESSION:PRINTER-NAME.
PROMPT-FOR RB-NUMBER-COPIES.
ASSIGN RB-NUMBER-COPIES.
RUN aderb\_printrb(
"F:\wrk\91D\reports.prl", /* RB-REPORT-LIBRARY */
"test", /* RB-REPORT-NAME */
"", /* RB-DB-CONNECTION */
"", /* RB-INCLUDE-RECORDS */
"", /* RB-FILTER */
"", /* RB-MEMO-FILE */
"D", /* RB-PRINT-DESTINATION */
RB-PRINTER-NAME, /* RB-PRINTER-NAME */
"", /* RB-PRINTER-PORT */
"", /* RB-OUTPUT-FILE */
RB-NUMBER-COPIES, /* RB-NUMBER-COPIES - zero */
0, /* RB-BEGIN-PAGE - zero */
999, /* RB-END-PAGE - zero */
no, /* RB-TEST-PATTERN */
"", /* RB-WINDOW-TITLE */
yes, /* RB-DISPLAY-ERRORS */
yes, /* RB-DISPLAY-STATUS */
no, /* RB-NO-WAIT */
""). /* RB-OTHER-PARAMETERS */