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

How to Collate in Printing Reports?

Status
Not open for further replies.

meny21

IS-IT--Management
Oct 4, 2002
101
MX
Hi!

Does anyone knows how can I print in Visual FoxPro 6.0 in a Collate Way?

For Example:

I got 3 records :

Record1
Record2
Record3

If I use this Visual FoxPro 6 Command:

REPORT FORM File.FRX TO PRINTER NOCONSOLE

It is going to print 1 by page.

How can I print 2 copies and have this way:

Record1 (first Page)
Record1 (second Page)
Record2 (Third Page)
Record2 (Forth Page)
Record3 (fifth Page)
Record3 (Sixth Page)

Any suggest?

Thanks!
 

If you use PROMPT clause in your command, like this:

REPORT FORM File.FRX TO PRINTER PROMPT NOCONSOLE

you then can select the number of copies you want and to check (or uncheck) the Collate option.

 
I do it this way for unattended runs
Code:
lcAlias = alias()
copy stru to TEMP
USE TEMP EXCLU
Index on "whatever I want to page on" tag temp && same as in the report
append from OrgDbf
append From OrgDbf
set order to temp
REPORT FORM File.FRX TO PRINTER NOCONSOLE
use
erase temp.*
select (lcAlias)


David W. Grewe Dave
 
Also, if you do not want your users to be able to change printer settings, you can set them up programmatically.

For details, check out this article "Controlling report settings at run time" ( by Michael Lewis on his own site. (The Collate property is not mentioned there, but you should be able to set it in exactly the same way.)

Also, take a look at faq184-581. You might also be able to find a few more suitable FAQs and threads at this forum and forum184.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top