Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Running report in COM DLL
Message
From
25/10/2007 15:28:05
Joel Leach
Memorial Business Systems, Inc.
Tennessee, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Running report in COM DLL
Miscellaneous
Thread ID:
01263773
Message ID:
01263773
Views:
74
I'm using VFP9 SP2. As I understand it, running reports in a single-threaded DLL is now possible in VFP9. The code below works in a COM EXE, but in the DLL I get an error "Class Definition for OUTPUT TYPE 5 is not found" when I call the RunReport() method. Is there anything else I need to do to set up the environment properly for the DLL?
DEFINE CLASS COMRpt AS Custom OLEPUBLIC

cError = ""

PROCEDURE Init
	Cd C:\sandbox\comrpt2
	Set Path To C:\sandbox\comrpt2; "C:\Program Files\Microsoft Visual FoxPro 9\Samples\Data" additive
	_ReportOutput = "C:\PROGRAM FILES\MICROSOFT VISUAL FOXPRO 9\REPORTOUTPUT.APP"
	_ReportBuilder = "C:\PROGRAM FILES\MICROSOFT VISUAL FOXPRO 9\REPORTBUILDER.APP"
	_ReportPreview = "C:\PROGRAM FILES\MICROSOFT VISUAL FOXPRO 9\REPORTPREVIEW.APP"
	Set ReportBehavior 90
	Sys(2335,0)
ENDPROC

Procedure RunReport()
        Report Form invoice.frx object type 5
EndProc 

PROCEDURE Error(nError, cMethod, nLine)
	
Text to This.cError NOSHOW TEXTMERGE 
Error: <<nError>>
Method: <<cMethod>>
Line: <<nLine>>
Message: <<Message()>>
EndText 
	
ENDPROC
	
ENDDEFINE
Joel Leach
Microsoft Certified Professional
Blog: http://www.joelleach.net
Next
Reply
Map
View

Click here to load this message in the networking platform