Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Odd Preview Window Behavior
Message
From
02/06/2005 16:27:34
 
 
To
26/05/2005 17:17:15
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01017308
Message ID:
01019571
Views:
31
Sorry for the late reply, Memorial Day weekend and a busy week after...

Here's the code:
TRY

PUBLIC loForm

loForm = CREATEOBJECT('myForm')
loForm.Show()
loForm.RunReport()

READ EVENTS


CATCH TO oException
		

ENDTRY

DEFINE CLASS myForm as Form

ShowWindow = 2 &&as top level form
WindowState = 2 && Maximized



PROCEDURE RunReport()
	
	SET REPORTBEHAVIOR 90
	
	loListener = CREATEOBJECT('ReportListener')
	loListener.ListenerType = 1
	pc = null
	DO (_reportpreview) WITH pc
	pc.TopForm = .T.
	loListener.PreviewContainer = pc
	
	REPORT FORM HOME(1) + "Tools\Filespec\60SCX1.frx" OBJECT loListener
	
	*MESSAGEBOX('test')

ENDPROC 

PROCEDURE destroy
	CLEAR EVENTS
ENDPROC

ENDDEFINE 
The report preview is created inside of "MyForm" - which it shouldn't if it is supposed to be a separate top level form.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform