Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Anyway to output to monochrome bitmap
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01047324
Message ID:
01047418
Vues:
10
Steven,

Try the following code (VFP9). It creates quick report on a fake table and renders the output to a set of JPEG files, one file per report page. The files are not monochromes yet; I need to check a couple of things. Actually I got interested in finding a solution too :)
LOCAL oListener As ReportListener, nPageIndex
oListener = CREATEOBJECT("ReportListener")
oListener.ListenerType=3

DO CreateData
SET SAFETY OFF
CREATE REPORT SampleReport FROM csDates
SET SAFETY ON
REPORT FORM SampleReport PREVIEW OBJECT oListener

FOR nPageIndex=1 TO oListener.PageTotal
	oListener.OutputPage(nPageIndex,;
		"tmp"+TRANSFORM(nPageIndex)+".jpg",;
		102, 0,0,768,1024)
NEXT

PROCEDURE CreateData
	SET CENTURY ON
	CLOSE DATABASES
	CLOSE TABLES ALL
	
	CREATE CURSOR csDates (;
		dt D, dw C(20), dy C(30))
	
	LOCAL nIndex, dIndex
	FOR nIndex=1 TO 365
		dIndex=DATE()-nIndex
		INSERT INTO csDates VALUES (;
			dIndex, CDOW(dIndex), MDY(dIndex))
	NEXT
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform