How to use the EnablePre event in PB

If you are a Power Builder developer and have any questions about using our products from Power Builder here is the place to post them.
Post Reply
torygraves
Posts: 3
Joined: Wed Jul 18 2007

How to use the EnablePre event in PB

Post by torygraves »

I am using PowerBuilder 10.5.1 and am having the timeout issue(error -30). Amyuni tells me to put the enableprinter in the enablepre event. But they can not help me do this in PB.

Can anyone out there help me? I do not really even know where to start. So samples would be much appreciated. I am new to PB.

Thanks,
Tory
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello,

Did you try calling EnablePrinter() right before the printing command?
torygraves
Posts: 3
Joined: Wed Jul 18 2007

Post by torygraves »

Yes, I am calling enableprinter right before the datawindow.print. But it takes the datawindow up to almost 10 minutes sometimes, depending on the size of the report, before it starts spooling to the printer. Thus is times out with error -30.
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

If the report will take 10 minutes to print than it is normal that the printer will be diactivated.

Did you find how to catch events in Powerbuilder?
torygraves
Posts: 3
Joined: Wed Jul 18 2007

Post by torygraves »

THat is correct, the printer will deactivate if it is a really big report. But that is why you all say to use the enablepre event, although I can not find out how to use it from PB 10.5.

No, I did not find a way to catch the enablepre event from within powerbuilder.
Post Reply