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

Portrait & Landscape combines 1

Status
Not open for further replies.

sdocker

IS-IT--Management
Aug 12, 2010
218
GB
I searched some of the past threads and did not get an answer. I did learn that combining portrait and landscape in troublesome.

I would like to print several different pages at once. One of which is in landscape mode.
I hack the FRx's

Code:
      REPLACE TAG  WITH cEmptyStr, Tag2 WITH cEmptyStr
      IF 'PPSD1' $ UPPER(oFile.NAME)      && LANDSCAPE REPORT
          REPLACE EXPR WITH 'ORIENTATION=1' + CHR(13) + 'PAPERSIZE=1' + CHR(13) + 'COLOR=2'
      ELSE
          REPLACE EXPR WITH 'ORIENTATION=0' + CHR(13) + 'PAPERSIZE=1' + CHR(13) + 'COLOR=2'
      ENDIF
      USE

This works fine when printing each report separately. However, if I run the reports as 1 print job, the printer ends up printing subsequent portrait reports in landsacape.

Would closing the print job and starting a new one when changing orientation help? I realize this would create 2 files when printing to a PDF. I can live with that, if it would help.


 
How do you do the one print job? With REPORT FORM... NOEJECT?

Indeed the REPORT FORM help topic has a note:
VFP help said:
Changing between page orientations, such as landscape to portrait, between reports is not supported.
So you really need to do multiple print jobs.

No idea what you may do with WinAPI to nest print jobs for the same printer to go to one file, but you can also attach multiple PDFs as aftermath, at least with Amyuni, but I'm also sure I've seen that with free PDF libraries in the meantime, perhaps with the pdf lib foxypreviewer also uses or with report sculptor or XFRX.

Bye, Olaf.

Olaf Doschke Software Engineering
 
I wouldn't mess around with trying to hack the FRX. It's much easier to do the job as two separate reports - and it doesn't necessarily mean you will end up with two separate PDFs.

You need to create separate FRXs for the two reports. Print each one with a separate a REPORT FORM command, but include NOPAGEEJECT in the first one. VFP will then treat them as a single print job.

As for PDFs, it depends on what method you use to create these. I've always used XFRX. In the scenario I have just described, that will give you a sngle PDF for the combined report.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Mike, I'm sure our posts overlapped and you haven't read what I posted already, with NOEJECT/NOPAGEEJCT the printer Expr for the next report is disregarded, so you can't change paper orientation that way. If you have other experiences, then it would be nice to know the setup, which PDF printer or other FRX hacks or code inside them you used to make that orientation change happen.

Bye, Olaf.

Olaf Doschke Software Engineering
 

I use a code in a prg file to send multiple forms (frx's) to print, using NOPAGEEJECT on all but the last page.

The quote form the help file gives me an idea about what i'm up against.

Xfrx sounds interesting. I'll look into it.

Thanks,

Sam
 
With XFRX it's definitely possible to do that. Among many other functions, there is the possibility to "print" to RAM and chain many jobs to one, which you then close and copy to a printer (or a PDF).
See Link
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top