Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Output to email
Message
 
À
18/07/2006 13:40:05
Tim Muller
Innovative Solutions, Inc.
West New York, New Jersey, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
Divers
Thread ID:
01137271
Message ID:
01137587
Vues:
19
> 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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform