Hi, Dan,
thanks for the hint.
I found a little workaround.
instead of doing;
"
Print report printer options |Copies .vnrcopies |DUPLEX HORIZONTAL
"
where the report is printed vnrcopies times....and thus printed recto-verso
when the report is only one page...
I used this:
"set var vprintcount integer = 0
While (.vprintcount) < .vnrcopies then
print report printer options |DUPLEX HORIZONTAL
set var vprintcount = (.vprintcount + 1)
Endwhile
"
This way the report is launched vnrcopies times as a new report, so no
recto-verso printing when it's only one page, and recto-verso when it's longer.
Maybe not the most elegant way, but it works...
the problem is you cannot capture the totalpagecount of a report BEFORE it is
actually generated....I guess....
Best regards,
Luc Delcoigne
From: Dan Goldberg
Sent: Tuesday, October 04, 2011 3:58 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: duplex printing
I have an invoice that I do something similar.
I know that X number of line items fit on a page. So I do a count of line items
before the report print is called. If it is over the X amount of lines I tell
it to print duplex.
Dan Goldberg
From: Luc Delcoigne
Sent: Tuesday, October 04, 2011 12:09 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: duplex printing
Hi,
I have a report that I want to print on one pageside if the report is only one
page and in duplex when the report is more than one page.
This report has to print in 3 copies.
Now, when I set the printer in duplex mode (|DUPLEX HORIZONTAL) it prints every
report in duplex....i.e. even the reports that are 1 page are printed
recto-verso when the 3 copies are printed.
So, I would have to be able to capture the totalpagecount of the report before
issueing the print command.
That way I could evaluate the totalpagecount var and issue a
Print Report
or
Print Report |DUPLEX HORIZONTAL,
when the report is more than one page.
Somehow I cannot capture the totalpagecount var...
What could be wrong ?
Luc Delcoigne