Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Printing Landscape
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00469869
Message ID:
00469879
Vues:
26
>I have reports that I created without the report designer. Some of them must be printed in landscape mode. If I use Getprinter(), it doesn't allow the user to select Portrait or Landscape. If I add a form prior to the Printer dialogue where I allow the user to select Landscape, and then I send the proper PCL sequence, Windows ignores it and it prints in Portait anyway.
>
>Any assistance would be greatly appreciated.
>
>Thanks.
>
>Chaim Hochman

Portrait and Landscape is interesting to deal with, but can be done. The procedure I use is this (it may not be the best way, but it is the one that has worked for us).

First you create a report and define portrait or landscape in the report while your creating it or editing it.

Then save the report as normal.

Before you create a exe or app for distribution you need to open the report file as tables and remove some data from fields. The code I use is:
ADIR(laReportArray,'*.FRX')

FOR i = 1 To ALEN(laReportArray,1)
  SELECT 0
  USE laReportArray[i,1] ALIAS FixReport
  LOCATE FOR Objtype = 1 AND Objcode = 53
  REPLACE FixReport.Tag WITH ""
  REPLACE FixReport.Tag2 WITH ""
  USE
ENDFOR
The code will remove any reference to your printer, the one that was active when you edited the report or added the report. But the code does not touch the portrait or landscape code in the table.

So what I get is a exe that when the user asks to print a report they can choose what ever they want as a printer and the report remembers the pape mode.

I hope this is what you were getting at...
Bret Hobbs

"We'd have been called juvenile delinquents only our neighborhood couldn't afford a sociologist." Bob Hope
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform