Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Expr2 papersize
Message
De
02/12/2015 11:28:11
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
02/12/2015 09:54:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8.1
Network:
SAMBA Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01628266
Message ID:
01628288
Vues:
53
So you have a report that left a right border on A4 Landscape or Letter Portrait? At least a report that is A4 Landscape with 5mm right margin will not work as a Letter.
I simply remove the papersize from expr2 and it will be cut where the printer tells the reportengine. I have some ugly label printer that work this way.

It's a problem with an external company that tries to cheat a bit.


>I can confirm this. When working on Aruba a few years ago, they used to have two set of reports, one for letter and one for A4. I created a simple program which used only one set of reports and simply changed the paper size value in expr2. It worked fine in all the cases I tried. This is my little program, which you call just before you run the report. I haven't used it for a long time, but from memory, the call is "replace expr2 with Changepapersize(expr2, 'legal')" and "replace expr2 with Changepapersize(expr2, 'A4')" respectively. The program also preserves the other values in expr2.
>
>
>*Changepapersize.prg
>Lparameters pcData, pcPapersize
>Local laArray[1], ;
>   lcNewValue As String, ;
>   lcReturn As String, ;
>   lcVariable As String, ;
>   llChanged As Boolean, ;
>   lnArraylen As Number, ;
>   lnCounter As Number
>lcReturn = []
>If Vartype(pcData) # [C] Or Vartype(pcNewValue) = [C] Or Empty(pcPapersize)
>   Return pcData
>Endif
>Do Case
>   Case Upper(pcPapersize) = [LEGAL]
>      lcNewValue = [5]
>   Case Upper(pcPapersize) = [A4]
>      lcNewValue = [9]
>   Otherwise && 'Letter'
>      lcNewValue = [1]
>Endcase
>#Define crlf Chr(13)+Chr(10)
>lcVariable = [PAPERSIZE]
>lcNewValue = lcVariable + [=] + lcNewValue
>lnArraylen = Alines(laArray, pcData)
>For lnCounter = 1 To lnArraylen
>   If Upper(Getwordnum(laArray(lnCounter), 1, [ =])) == lcVariable
>      laArray(lnCounter) = lcNewValue
>      llChanged = .T.
>      Exit
>   Endif
>Endfor
>For lnCounter = 1 To lnArraylen
>   lcReturn = lcReturn + laArray(lnCounter)
>   If lnCounter < lnArraylen
>      lcReturn = lcReturn + crlf
>   Endif
>Endfor
>If !llChanged
>   lcReturn = lcReturn + crlf + lcNewValue
>Endif
>Return lcReturn
>
>>Hi Folks
>>
>>do we have a list what papersize values are valid?
>>
>>I have a strange co-developer that claims that a setting of 9 will scale a report according to the papersize of the printer? So that a DIN A4 will scale to Letter?
>>
>>Do you confirm that I need to have two reports to nicely fitt both formats?
>>
>>Lutz
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform