Hello, what should be the parameters to use in the ADERB/_PRORE.P, in order to make only one command to the printer, in case i have many records in the rbreport table. i.e. i am trying to queue reports from report builder and print them all together at once. i have managed with the queuing but it is still printing one report at a time! i figured it;s because of the RBREPORT.RB-PRINT-DESTINATION ...because it can be different from one record to another..which is logical!
is there a way to do that?
this is a portion of my code:
CREATE RBREPORT.
ASSIGN
RBREPORT.RB-DB-CONNECTION = "RIMS => xIMS"
RBREPORT.RB-REPORT-LIBRARY = PC_Library
RBREPORT.RB-REPORT-NAME = PC_Report
RBREPORT.RB-PRINT-DESTINATION = PC_PRINTDEST
RBREPORT.RB-INCLUDE-RECORDS = PC_Records /* Refer to the header comments */
RBREPORT.RB-FILTER = PC_FILTER /* Filter to use for this report */
RBREPORT.RB-MEMO-FILE = ""
RBREPORT.RB-PRINTER-NAME = PC_Printer /* Selects the printer */
RBREPORT.RB-PRINTER-PORT = ""
RBREPORT.RB-OUTPUT-FILE = ""
RBREPORT.RB-NUMBER-COPIES = PI_Copies /* Number of copies */
RBREPORT.RB-BEGIN-PAGE = PI_FROMPAGE
RBREPORT.RB-END-PAGE = PI_TOPAGE
RBREPORT.RB-TEST-PATTERN = NO
RBREPORT.RB-WINDOW-TITLE = PC_Title /* Window title */
RBREPORT.RB-OTHER-PARAMETERS = LC_Parameters + PC_Parameters /* Optional parameters */
RBREPORT.RB-DISPLAY-ERRORS = YES
RBREPORT.RB-DISPLAY-STATUS = yes
RBREPORT.RB-TAG = GC_STATION. /* LC_Tag gets the current station number */
/*RELEASE RBREPORT.*/
ASSIGN LR_RECID = RECID(RBREPORT).
END.
IF LL_Error THEN RETURN "ERROR".
FIND RBREPORT WHERE RECID(RBREPORT) = LR_RECID NO-LOCK NO-ERROR.
RUN ADERB/_RBPWENC ("nopassword", OUTPUT LC_Encrypted). /* Encrypts the password */
RUN ADERB/_PRORE.P (false, "-db " + LC_DBName + " " + LC_Connect
+ " -ld xIMS -rbtag " + GC_STATION
+ " -U appuser -rbP " + LC_Encrypted) NO-ERROR.
IF ERROR-STATUS:ERROR THEN DO:
MESSAGE "An Error Occured while Printing!" SKIP(1)
VIEW-AS ALERT-BOX ERROR.
RETURN "ERROR".
END.
thank you.
is there a way to do that?
this is a portion of my code:
CREATE RBREPORT.
ASSIGN
RBREPORT.RB-DB-CONNECTION = "RIMS => xIMS"
RBREPORT.RB-REPORT-LIBRARY = PC_Library
RBREPORT.RB-REPORT-NAME = PC_Report
RBREPORT.RB-PRINT-DESTINATION = PC_PRINTDEST
RBREPORT.RB-INCLUDE-RECORDS = PC_Records /* Refer to the header comments */
RBREPORT.RB-FILTER = PC_FILTER /* Filter to use for this report */
RBREPORT.RB-MEMO-FILE = ""
RBREPORT.RB-PRINTER-NAME = PC_Printer /* Selects the printer */
RBREPORT.RB-PRINTER-PORT = ""
RBREPORT.RB-OUTPUT-FILE = ""
RBREPORT.RB-NUMBER-COPIES = PI_Copies /* Number of copies */
RBREPORT.RB-BEGIN-PAGE = PI_FROMPAGE
RBREPORT.RB-END-PAGE = PI_TOPAGE
RBREPORT.RB-TEST-PATTERN = NO
RBREPORT.RB-WINDOW-TITLE = PC_Title /* Window title */
RBREPORT.RB-OTHER-PARAMETERS = LC_Parameters + PC_Parameters /* Optional parameters */
RBREPORT.RB-DISPLAY-ERRORS = YES
RBREPORT.RB-DISPLAY-STATUS = yes
RBREPORT.RB-TAG = GC_STATION. /* LC_Tag gets the current station number */
/*RELEASE RBREPORT.*/
ASSIGN LR_RECID = RECID(RBREPORT).
END.
IF LL_Error THEN RETURN "ERROR".
FIND RBREPORT WHERE RECID(RBREPORT) = LR_RECID NO-LOCK NO-ERROR.
RUN ADERB/_RBPWENC ("nopassword", OUTPUT LC_Encrypted). /* Encrypts the password */
RUN ADERB/_PRORE.P (false, "-db " + LC_DBName + " " + LC_Connect
+ " -ld xIMS -rbtag " + GC_STATION
+ " -U appuser -rbP " + LC_Encrypted) NO-ERROR.
IF ERROR-STATUS:ERROR THEN DO:
MESSAGE "An Error Occured while Printing!" SKIP(1)
VIEW-AS ALERT-BOX ERROR.
RETURN "ERROR".
END.
thank you.