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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

number of copies printed from crystal reports dialog

Status
Not open for further replies.

cpotter

Programmer
Sep 14, 2010
3
How do I get the number of copies a user decided to print from the print dialog box that opens up after a "crystal reports" PrintOut(.F.) is run?
 
You can't.

If you pass .F. to Printout(), there is no dialogue, so the user cannot enter the number of copies.

You need to pass .T. in order to get the number of copies. If you do, you don't need to do anything special to print the specified number. The report object will handle it correctly.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
Sorry, I made a mistake in my first post. I an sending a PrintOut(.T.) to open the print dialog box.

I need to know how many copies the user decided to print from that dialog box so i an print one smaller note directly to the printer for every copy.
 
What do you mean you want to print a note to the printer for every copy? How do you want this to work? Do you want it to print copy 1, print note, print copy 2, print note or print copy 1, print copy 2, print note 1, print note 2?

Craig Berntson
MCSD, Visual FoxPro MVP,
 
Ah, the second one. All I would like to for copy 1 to print, copy 2 to print, etc... Then after all that is done to print note 1, note 2, etc... One note for each copy.

However, I'm having trouble pulling the number copies the user decided to print from the report object. Any help would truly be welcome.
 
As far as I know, you can't do that using the native CR dialogue.

You will have to create your own printer options dialogue, which prompts the user for number of copies, as well as page range, whether to collate, and any other options that are important.

You then call Printout(), passing .F., followed by the other options. For example:

Code:
loReport.Printout(.F., nCopies, .T. nStart, nEnd)
  && .F. says to inhibit the CR dialogue;
  && nCopies contains the number of copies

You then print your note nCopies times.

It could be there's an easier way, but I don't know it. If there is, Craig will have the answer.

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top