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

Two A5 copies of a report on an A4 page 1

Status
Not open for further replies.

florindaniel

Programmer
Dec 4, 2009
120
RO
Hi all,

Is there a way to print two copies of a document, an invoice for ex., in A5 landscape format
on an A4 portrait page. We are using now A5 paper and print two copies of the document
but there's a request for printing both copies on a single pass on an A4 page and then cut
the paper.

Thank you,
Daniel
 
I guess there's two ways you could do this.

First, you can create a report, with a page size of A4 landscape. Then arrange the layout so that you get the different pages side by side.

Or, you can configure the printer driver to do it for you, assuming it has that capability. You'd have to check the printer specs. On my HP Laserjet, for example, you can set it to print 2-up A5 on an A4 sheet (you do that from the Printer Preferences dialogue). If you save that configuration, you would simply SET PRINTER TO the relevant driver name, and the driver wold take care of the whole thing for you.

Do either of those suggestions sound like they might be what you are looking for?

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Thank you Mike,
I don't understand the first suggestion :( but there's no such thing as different pages
it's the same A5 page printed twice on one A4 page.
The second idea might work, but it's about printing in different locations, on different printers;
it's too particular to some workstation.

Thank you,
Daniel
 
I could, perhaps do something like:
- create an A5 landscape report
- preview the report
- if print command is selected do not print yet but set some flag (how?)
- print one copy directly to the printer with nopageeject, no preview
- run the report again to the printer, no preview

... not very elegant but it might work
 
but there's no such thing as different pages

Each "Invoice" layout would represent one logical 'page' - regardless of the physical paper pages used.

Mike's first suggestion would be that you could possibly, within the VFP Report Form layout, create two side-by-side logical 'pages' which would be sent to the printer - on which the over-all Report Form would be printed as a single physical piece of paper.

Good Luck,
JRB-Bldr






 
Mike's first suggestion would be that you could possibly, within the VFP Report Form layout, create two side-by-side logical 'pages' which would be sent to the printer - on which the over-all Report Form would be printed as a single physical piece of paper.

Yes, that's it exactly.

Daniel, what you would do is to lay out the invoice (or whatever) on one half of an A4 landscape page, then copy and paste the whole thing to the other half of the same page. You would then print it as usual.

The main disadvantage of that approach is that if you later need to change the design, you would have to make that change twice, once for each of the two halves.

I don't think your NOPAGEEJECT idea would work, but it might be worth experimenting.

By the way, do you also need to preview the invoice? Previewing a 2-up page might seem a bit odd from the user's point of view. If that's an issue, you might need to create a separate report, on A5, just for the purpose of previewing. But that would mean still another thing to amend when you need to change the layout.

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Hi Mike,

I've finally understood what do you mean by 2 reports side by side ( silly me [rednose] )
It works very good, thank you .... BUT (there's always a but)
on an A4 landscape fit 2 A5 portrait reports and it seems there's no way
to fit 2 A5 landscapes on an A4 portrait so there's some place to negociate
the invoice format [glasses]

Thank you very much,
Daniel
 
Glad you've got it working, Daniel. My apologies if my original explanation wasn't clear.

It should be possible to use exactly the same technique to fit two A5 landscapes on an A4 portrait. The only difference is that one A5 would be above the other, rather than the two being side by side.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Ufff, now when I thought it's over you come with this new idea [upsidedown]
:):):):)
To put 2 layouts side-by-side it's ok but... one under another...
it's about header/detail/summary bands, etc...
Or I am missing sometging (again) :)

Thank you
 
No, you're not missing anything. I am. I hadn't taken into account header / summary bands.

I guess what you need to do is to dispense with header and summary bands, and to use grouping instead. So, you start a new group for each invoice. You put the invoice header (name and address, invoice number, etc) in the group header, and the invoice totals in the group footer.

But wait. It's more complicated than that. You'd have to force each group to be exactly a given number of rows, so that the invoice fills up exactly half the A4 page. Otherwise, the first summary and the second header will float up and down the page, which is not what you want. Also, can a single invoice exceed one A5 page? If so, that would be another complication.

Doing A5 landscape on A4 portrait would be do-able, but doing it the other way round would be much simpler.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Wow Mike
That grouping idea is great :)
I'll test it right after I figure out what grouping criteria should I use
and still have the lines printed twice.....

Thank you very much,
Daniel
 
If Mike's Grouping idea works great.

But if not, the approach I'd use is one that sounds complicated (and it sort of is), but it works - that's to over-lay 2 separate Report Forms over each other into a different single Report Form.

In this case I'd make the objects of both forms exactly the same so that one will be a copy of the other. Then I'd expand the Header band on one and the Summary band on the other so that the two would not over-lap the other.

Then with each individual Report Form created.
* One to print the top half of your physical page
* And the other to print the bottom half of your physical page
I'd do a Select ALL from one and paste it into a blank Report Form
Then I'd do a Select All from the other and paste it over the first one into the previously 'blank' Report Form.

Now I would have one single over-all Report Form where the top half was printed AND the bottom half was printed in one single 'pass' through the Report Form using the ReportData records.

Note - I have not actually tried this, but I have done numerous other 'multi-page' Report Forms in this manner using via a single VFP Report Form - so I'd guess that this would work.
It may take some trial and error along with some tweaking, but I think it would be a workable solution.

Good Luck,
JRB-Bldr

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top