Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

print through popup

Status
Not open for further replies.

schothorst

Programmer
Aug 26, 2008
30
0
0
NL
hello
i'm struggeling with the follwing problem

I have a window with a print button.
after I press the print button, I want a popup where i can fill in the number of prints. after closing i want to close the popup and print dw_data the number of times i choose in the popup

what i have so far
I can open a popup
I can store the number of print in a global variable called gi_printnumber
after closing the popup it should print. Now it will run the script of printing after opening the popup.

So the print script should be waiting till it received the number of prints I want from the popup and then print.

help is very apricited
 
Hello Schothorst,

You might want to use the PrintSetup() instead of using a self-made popup, though I don't really understand what is your problem, even if you do.
I think the problem is that you are using a popup type window and code execution does not stop and does not wait until you have filled the copies you want. Change the windowtype of your popup to RESPONSE and things will wait utill you close the window.

1. you open your "dialog/popup" (response!)
2. after you'll have the number of copies
3. you change datawindow properties of printing
dw_1.modify("datawindow.print.copies = " + "2")

/* other usefull modifys :
dw_1.modify("datawindow.print.Paper.Size = " + "0")
dw_1.modify("datawindow.print.Page.Range= "+"1-5") ^
*/
Another thing is: instead of doing the modify( ), simply
print the dw_1 several times.
4. dw_1.print()

I think it should work!

(als je wilt kan ik het ook in het nederlands uitleggen ;) )


regards,
Miguel L.
 
Hello
Perfect that's exactly that a mean.
I will try it right away.
Thanks for your quick reply.

(gaat lukken in engels, dan hebben de andere er ook nog iets aan :) )
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top