Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Output to email
Message
 
To
18/07/2006 13:40:05
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Miscellaneous
Thread ID:
01137271
Message ID:
01137587
Views:
18
> Are you saying that I can read the VFP 9 Help and figure out how to use the ReportListener to create a JPG for a report page?

Pretty much so.
LOCAL oListener As ReportListener, nPageIndex
oListener = CREATEOBJECT("ReportListener")
oListener.ListenerType=3 && renders all pages at once

* make sure the report can load and run
REPORT FORM MyReport PREVIEW OBJECT oListener

FOR nPageIndex=1 TO oListener.PageTotal
        cOutputFile = "tmp"+TRANS(nPageIndex)+".bmp"
        oListener.OutputPage(nPageIndex,;
                cOutputFile, 105, 0,0,768,1024) && 105=bitmap, 102=JPEG
NEXT
Depending on output option chosen the images can be quite large. So you may think about using GDI+ library to convert them, for example, to monochrome. Though I remember you need some colors stay in your report.

How to convert a bitmap file to monochrome format
http://www.news2news.com/vfp/?example=493
Previous
Reply
Map
View

Click here to load this message in the networking platform