PBforBaan
8th August 2002, 09:57
Hi there,

got a problem using reports with different orientation and printers in a self-made-session.

Problem:
The first report (i send to the win-portrait-printer) is portrait
- everything is fine
the second report (i send it to the win-landscape-Printer) is in Landscape
- this one also appears in portrait

The first used papertype will be active until i close the session.

Actions taken:
This behavior came up after SP9, so i took in the latest solutions for ttstpsplopen and ttstpsplclose
- no change appeared

After i modified the script from
ret = brp.open("reportname", printer, 0)
to
ret = brp.open("reportname", printer, 2)
the splopen-dialog appeared after each report and the printout worked fine.
.....but there are thousands......

Question:
Any Ideas how to change orientation without dialog at this point ?

mark_h
8th August 2002, 18:51
Not sure if this helps, but I found solution #113222 out on Baans support site. Basically it says set the paper type to ""(spool.paper.type = "") before the second brp.open. So check it out it may apply.

Good Luck!

Mark

PBforBaan
9th August 2002, 12:47
Hi mark_h,

Thank you for Solution 113222 !
By calling the following function before brp.open() the functionality works well !



function set.paper.type(domain tcmcs.str20 search.printer)
{
select ttaad300.devc
from ttaad300
where ttaad300._index1 = {:search.printer}
and ttaad300._compnr = 000
selectdo
spool.paper.type = ttaad300.tpap
endselect
}


pb :)