Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Vfp9 report preview max zoom trick broken
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01272340
Message ID:
01272692
Vues:
141
This message has been marked as the solution to the initial question of the thread.
>The old trick to maximize a report preview window no longer works in VFP9 using reportbehavior90?
>
>Use to be you could put this in the init method of the data environment:
>IF WEXIST('Report Designer')
> ZOOM WINDOW "Report Designer" MAX
>ENDIF
>
>
>Anyone know what the new simple trick is?

That is because VFP doesn't use Report Designer window to preview the report when you use SET REPORTBEHAVIOR 90. It uses frxPreviewForm form defined in frxPreview.vcx of REPORTPREVIEW.APP

Here what we use:
LOCAL oForm, wnd_name
LOCAL loRef as ReportListener
IF SET("ReportBehavior") == 80
   oForm             = CREATEOBJECT("Form")
   oForm.Caption     = [some caption]
   oForm.Name        = "PrintPreview"
   oForm.WindowState = 2   && Maximised
   oForm.Visible     = .t.
   wnd_name          = oForm.Name
   REPORT FORM (report name here) NOCONSOLE TO PRINTER PROMPT PREVIEW WINDOW (wnd_name)
ELSE
   EXTERNAL CLASS frxPreview.vcx
   oForm = NEWOBJECT([frxpreviewForm],[frxPreview],_REPORTPREVIEW)
   loRef = NULL
   DO (_REPORTOUTPUT) WITH 1, loRef
   oForm.WindowState      = 2
   loRef.PreviewContainer = oForm
   REPORT FORM (report name here) NOCONSOLE TO PRINTER PROMPT PREVIEW OBJECT loRef
ENDIF
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform