Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simulating FoxUser behavior
Message
 
 
À
17/05/2011 13:19:12
Guy Pardoe
Pardoe Development Corporation
Peterborough, New Hampshire, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01510886
Message ID:
01510892
Vues:
64
Guy,

I was thinking along these lines also, but here is the deal.

For all reports we're using a special form class. This class has PrintReport method. The class also has buttons such as Preview, etc. The preview button calls this method with the 'Preview' parameter

Now, each report has the following code in its PrintPreview method

report form ThisParticularReport &tcDestination

I'm wondering how can I incorporate your idea so I don't have to change all the individual report forms (actual forms) and only fix the base class?



>>Hi everybody,
>>
>>We recently changed our application to not use Foxuser.dbf files (as it presented a problem with the Windows 7 when run with UAC on).
>>
>>Now, our tester complained that the Report Preview window is not saving the size anymore.
>>
>>I'm wondering what will be the easiest way to simulate saving last preview window size?
>>
>>Thanks a lot in advance.
>
>
>You could create your own Preview Window and run the report inside that.
>
>
>oPreviewForm = NEWOBJECT('PreviewForm')
>REPORT FORM Rpt_ClientReviewWorksheetInternal IN WINDOW PreviewForm TO PRINTER PROMPT PREVIEW
>oPreviewForm.Release
>
>
>In my case, users want the report window to appear full screen so I just ZOOM MAX. But you could modify the FORM class to LOAD and SAVE the user's settings. Here's the class definition I use (which probably came from a sample posted on the UT long ago).
>
>
>
>***********************************************************************
>DEFINE CLASS PreviewForm AS FORM
>***********************************************************************
>Height = 250
>Width = 375
>Desktop = .F.
>ShowWindow = 2
>DoCreate = .T.
>AutoCenter = .T.
>BorderStyle = 3
>Caption = "Print Preview Window"
>ControlBox = .F.
>Closable = .F.
>MinButton = .F.
>Movable = .F.
>WindowType = 0
>WindowState = 2
>AlwaysOnTop = .F.
>Name = "previewform"
>
>
>***********************************************************************
>PROCEDURE Deactivate
>***********************************************************************
>DODEFAULT()
>IF WEXIST('Report Designer')
>ZOOM WINDOW "Report Designer" MAX
>* MOUSE DBLCLICK AT -0.1,0.1 WINDOW "Report Designer"
>ENDIF
>IF WEXIST('Print Preview')
>lnRow=MROW()
>lnCol=MCOL()
>MOUSE DBLCLICK AT -0.1,0.1 WINDOW "Print Preview"
>*MOUSE AT lnRow,lnCol
>ENDIF
>***********************************************************************
>
>
>***********************************************************************
>PROCEDURE Init
>***********************************************************************
>DODEFAULT()
>THIS.SHOW()
>**  KEYBOARD 'L'   && WORKS!  75% is perfect
>ENDPROC
>***********************************************************************
>
>***********************************************************************
>PROCEDURE Activate
>***********************************************************************
>DODEFAULT()
>IF WEXIST('Report Designer')
> *ZOOM WINDOW 'Report Designer' MAX
>ENDIF
>IF WEXIST('Print Preview')
> *ZOOM WINDOW 'Print Preview' MAX
> *MOUSE DBLCLICK AT -0.1,0.1 WINDOW "Print Preview"
> *DOCK WINDOW ("Print Preview") POSITION 0
>ENDIF
>
>ENDPROC
>***********************************************************************
>
>
>ENDDEFINE
>***********************************************************************
>
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform