1. Pierre DETE
  2. PowerBuilder
  3. Thursday, 10 February 2022 11:00 AM UTC

Hello,

When validating a powerbuilder process, by clicking on a save button, we trigger a window event. In this event we do a datawindow.print() and the buffering window appears, the event stops, but curiously we can interact with the window by clicking and triggering new events.
I'm surprised at this behavior and wonder if it has always worked like this.
Is there any way to stop the interaction while printing?


Thanks in advance.
Pierre

Pierre DETE Accepted Answer Pending Moderation
  1. Thursday, 10 February 2022 17:10 PM UTC
  2. PowerBuilder
  3. # 1

Hi Chris,

 

Yes the "Save" window event is triggered by a click on a "Save" button.

TriggerEvent (Parent, "Save")

And the "Save" event call a user object function to do a dw.print()

 

Pierre

 

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 10 February 2022 19:14 PM UTC
Hi Pierre ... try a POST Event instead. Especially, if there are other activities taking place during the Save operation.

In fact, i would create an OE_Print event and Post that from your save user event. That way, complete the save operations first & then print when everything has been saved 100% and a DB commit completed first. Just a thought.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 10 February 2022 16:39 PM UTC
  2. PowerBuilder
  3. # 2

Hi Pierre;

   Are you using a TRIGGER or a POST to fire off the User Event?

Regards ... Chris

Comment
There are no comments made yet.
Pierre DETE Accepted Answer Pending Moderation
  1. Thursday, 10 February 2022 11:16 AM UTC
  2. PowerBuilder
  3. # 3

Hi Miguel,

The standard Windows buffering.

 

 

This behavior is only for long printing jobs with a lot pages. 

 

Regards

Comment
  1. Miguel Leeuwe
  2. Thursday, 10 February 2022 13:40 PM UTC
aha! You can interact with your pb app while this dialog shows, because it's a dialog from your HP printer, not from powerbuilder. PB sends the job and then depending on which configuration you have for printing in you printer driver setup, execution continues or not. The job will go to a cue or will go directly to the printer. I think you could try to configure the printing to be "direct", without using the print cue and see if that makes a difference.

regards
  1. Helpful
  1. Pierre DETE
  2. Thursday, 10 February 2022 14:00 PM UTC
The problem is that the execution stops in the event code, but I can still interact with the window during the stop. And I can't get the clients to change their print settings. I'm thinking of disabling the parent window just before the dw.print() and re-enabling it just after. But I am very surprised to encounter this issue in our 20 years old application. Very strange. Or maybe I'm just not awake this morning! :)

  1. Helpful
  1. Miguel Leeuwe
  2. Thursday, 10 February 2022 14:52 PM UTC
Now I see what you mean. That than sounds like a bug to me!
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Thursday, 10 February 2022 11:10 AM UTC
  2. PowerBuilder
  3. # 4

Hi Pierre,

I don't understand. Please explain a bit more, like for example what is "the buffering window"?

regards.

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.