Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error code1001 Feature is not available
Message
De
28/10/2008 10:43:28
Marcel Roy
South West Direct
Floride, États-Unis
 
 
À
10/10/2008 09:05:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro et .NET
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01353315
Message ID:
01357689
Vues:
20
Thanks for you time guys

I found the solution!
Check the code I have created with MindsEyeReport, but this COM need to be single thread only and work only if you use
SET REPORTBEHAVIOR 90.
I am using this on a ASP.NET web server to generate on the fly a statement ant this COM send me back a PDFSTREAM of the stement.
Now I am save the PDF file in a history directory and I remove only the pages I need with a PDF TOOL KIT to show at run time on my web server.
I am doing a statement view on the web for CSR and later soon I will start a customer bill pay for the web.
Define Class wwMyserver As Custom OlePublic

	Procedure PrintFile(pM_DIR, pM_ID, pFileToPrint, pFilter)
		If Parameters() 3
			Return "0, Missing a parameter."
			Exit
		Endif

		Local lcDIR, lcID, lcFiletoPrint, lcFRX, lcFilter
		lcFilter = pFilter
		lcDIR = pM_DIR
		lcID = pM_ID

		lcFiletoPrint = lcDIR + "HISTORY\" + pFileToPrint
		lcFRX = pM_DIR  + lcID + "TESTPCL.FRX"

		If File('&lcFiletoPrint')=.F.
			Return "0, File to Print not Found"
			Exit
		Endif
		If File('&lcFRX')=.F.
			Return "0, Report FRX not Found"
			Exit
		Endif

		Set REPORTBEHAVIOR 90
		Public rpt_prerun
		cPath = "C:\meb\"+ "libs\mere_reportlistener"
		Set Classlib To (cPath) Additive
		cPath = "C:\meb\" + "libs\MindsEyeReportPreviewForms"
		Set Classlib To (cPath) Additive
		cPath = "C:\meb\" + "libs\MindsEyeReportEngine"
		Set Classlib To (cPath) Additive

		Local llShowAsTopLevelForm, llDoNotShowMEREPreview, llDynamicLineHeight
		m.llShowAsTopLevelForm = .F.
		m.llDynamicLineHeight  = .T.

		m.llDoNotShowMEREPreview = .T.     && DO NOT AUTOMATICALLY DISPLAY THE MERE PREVIEW
		*		*m.llDoNotShowMEREPreview = .F.     && AUTOMATICALLY DISPLAY THE MERE PREVIEW

		rpt_prerun = .F.

		If m.llShowAsTopLevelForm Then
			m.oRPT = Createobject('MindsEyeReportPreviewTopLevelForm')
		Else
			m.oRPT = Createobject('MindsEyeReportPreviewForm')
		Endif

		If Vartype(oRPT) = 'O' Then
			m.oMERE = Createobject('MERE_ReportListener',oRPT,m.llDoNotShowMEREPreview)
		Else
			m.oMERE = Createobject('MERE_ReportListener',,m.llDoNotShowMEREPreview)
		Endif
		oMERE.DynamicLineHeight = m.llDynamicLineHeight
		oRPT.oReportEngine.PDFXOffset=0
		oRPT.oReportEngine.PDFYOffset=0
		With oRPT.oReportEngine
			.PrintPromptForPrint = .F.
			prt_name3 = "1 Delta PS"
			.SetPrinterTo('prt_name3')

			If Empty(lcFilter)=.F.
				Select * From &lcFiletoPrint &lcFilter Into Cursor TMP
			Else
				If Used('TMP')=.T.
					Select TMP
					Use
				Endif

				Use &lcFiletoPrint In 0 Alias TMP
			Endif

			Select TMP
			m.Quantity = Reccount()
			If Reccount()  0
				Report Form (lcFRX) Object oMERE Nodialog

				Select TMP
				m.lcPDFStream = .PDFStream()
			Else
				m.lcPDFStream = "No data matching your criterias."
				m.Quantity = 0
			Endif

			Select TMP
			Use
			Return Str(m.Quantity) + ", " + m.lcPDFStream
		Endwith
		oMERE = Null
		oRPT = Null
		Release oRPT
		Release oMERE
	Endproc
Enddefine
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform