I have the following code in one of my reports, it runs a report 50006 which is just an invoice form but I need to make sure I get only 1 copy of the invoice. The report itself has an integert variable in it named NoOfCopies. How do I properly pass the fact that I want only 1 copy to that variable which is in report 50006 via REPORT.RUN ? So my question is how do I pass NoOfCopies := 1 to report 50006 ?
IF PrintRecord THEN BEGIN
// RecordsToPrint := RecordsToPrint + ',' + "Sales Invoice Header"."No.";
// MESSAGE(RecordsToPrint);
RecordsToPrint := "Sales Invoice Header"."No.";
"Sales Invoice Header".SETRANGE("No.",RecordsToPrint); // set the filter
REPORT.RUN(50006, FALSE, FALSE, "Sales Invoice Header");
"Sales Invoice Header".SETRANGE("No."); // clear the filter
END;
If I can't pass the value to the report 50006 then I guess I can just duplicate the report and use the modified one instead but I don't want to do that when I could possibly just send a variable and use 1 less object up.
Half-empy or half-full how do you view your database?
Thanks.
0
Comments
what you could do is assign your report to a variable, then create a trigger in your report that sets the number of copies.
Hope this helps.
Willy