Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problems using a custom preview window
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01091326
Message ID:
01091331
Vues:
14
Hi Pascal,

Try this code
LOCAL lcWindow,lcWindowName

yy=CREATEOBJECT("_form")
yy.Show()
yy.Name="yy"

lcWindow="wndReport"+SYS(2015)
lcWindowName="wndReportName"+SYS(2015)

DEFINE WINDOW (lcWindow) FROM 0,0 TO 10,20 NOMDI NOMINIMIZE;
       NOZOOM NOGROW SYSTEM ;
       TITLE "Report " NAME (lcWindowName) IN ("yy")

REPORT FORM (lcReport) PREVIEW WINDOW (lcWindow)
RELE WINDOW (lcWindow)

****************************************
DEFINE CLASS _form AS form
   ShowWindow=2
ENDDEFINE
MartinJ

>Hi there,
>
>I had problems previewing reports in a deployed application; anytime a report is produced with a landscape orientation, it can't be viewed completely without zooming out, since the standard VFP preview window doesn't display a horizontal scrollbar. I worked around that by creating a custom window (a form based on a class inherited from the VFP base form, where the only modif from the default values are:
>-ShowWindow = 2 (in Top-Level Form)
>-ScrollBars = 3 (both scrollbars)
>-WindowState = 2 (Maximized))
>
>Problem is, when I build my application, then deploy it through a InstallShield Express setup, the VFP screen appears when that preview window is called, and I can't interact with the print preview toolbar (exit, print, next page, and so on...) even though I have Screen=OFF in my included config.fpw, and I configured that window to appear in the Top-Level form (which should be my app's main form...)
>
>Here's is the relevant part of my code:
>
>oRepForm = CREATEOBJECT("basecontrols.wb_prev")
>DO CASE
>&&That part checks the name of the report that's run (lcReport) in order to provide a
>&&relevant title for the window
>	CASE lcReport = "lstAvantSoc"
>		oRepForm.caption = "Détail des avantages sociaux"
>	CASE lcReport = "lstCompRatio"
>		oRepForm.caption = "Comparaison de la rationalisation"
>&& and so on...
>ENDCASE		
>		
>WITH oRepForm as wb_prev
>*!*	 .WindowState = 2   &&those are set in the derived form I made to that effect
>*!*	 .ScrollBars = 3    &&so I comment them...
> .Name = "fenRapp"
> .Show()
>ENDWITH
>
>REPORT FORM (lcReport) NOCONSOLE PREVIEW WINDOW fenRapp TO FILE &lcPSFile
>oRepForm.Release()
>
>&& That is the case when the user want to print the report to a PDF (using the Oh, so
>&& efficient print2PDF, by Paul James, but the same thing
>&& happens with "REPORT FORM (pcRapport) TO PRINTER PREVIEW WINDOW fenRapp", when the
>&& user just try to print the report normally...
>
>
>
>If I install the same setup on my development pc (the one with VFP installed), it works fine, but the preview window appears in the VFP IDE...
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform