We are having some troubles trying to change the predefined printer. We use 1 object for all the reports.

On the event Onprint of the object we are trying to modify the predefined printer using:

send comselectprinter of horeport driver printername printerport
with this, all seesm to work but in the second it gonna start printing we get memory exception on the studio, or in case that try running the exe directly it gives an error and closes.

We also tried using:

set pbprinterprompt of horeport to true
but this way we cant choose the printer we want, it uses directly the printer defined on the rpt or the printer predefined on the machine, depending how the rpt is configured.

so my question is: there is anyway to put working the first example? or if there is a way to be able to choose the printer we want using the crystal dialog?

thank you in advance


Miguel Silva