Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Preview Report In a Form
Message
 
To
05/12/1999 12:37:39
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00298910
Message ID:
00299083
Views:
20
>> 1. Place a preview of a report in a form
Create form named PrtPrew and change your print preview code:

DO FORM PrtPrew NAME oForm NOSHOW
oForm.Caption = "Caption for preview"
oForm.WindowState = 2 && Maximised
wnd_name = oForm.Name
REPORT FORM MyReport PREVIEW WINDOW (wnd_name)

>> 2. Remove the Print Option from a preview

In VFP customize the print preview toolbar (remove print button) and save. Then just use FoxUser.DBF as a resource file in your application

>> 3. Add code so that if the user prints from a preview the app can update a table (date printed etc)

You may put a button and property run_report in PrtPrev.FRX (the form for preview window),when you create it so the print preview code must change:

DO FORM PrtPrew NAME oForm NOSHOW
oForm.Caption = "Caption for preview"
oForm.WindowState = 2 && Maximised
oForm.Run_Report = "MyReport"
wnd_name = oForm.Name

REPORT FORM MyReport PREVIEW WINDOW (wnd_name)

then in Click Event of button you can print the report:

REPORT FORM (thisform.run_report) TO PRINTER [PROMPT]

HTH
Boris
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform