Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RE: FRX ReportPreview
Message
From
10/08/2004 02:53:28
 
 
To
09/08/2004 21:48:04
Arthur Evangelista
David-Link Corporation
Makati, Philippines
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro Beta
Miscellaneous
Thread ID:
00931666
Message ID:
00931961
Views:
30
Arthur -

There are (at least) two ways of configuring Report Preview in VFP9.0 to exist as an independent top form. One of them works in previous versions of FoxPro and was shown to me by Lisa Nicholls. It requires a little bit of code:
loForm = create("TopForm")
loForm.Show()

report form ? preview window (loForm.Name) 

define class TopForm as Form
	Caption = "My Top Form Report Preview"
	ShowWindow = 2
	Width = 300
	Height = 600
enddefine
In 9.0, the default preview container recognises the syntax and duplicates the behavior. Lisa shows how you can use a little bit of extra code manipulating the exposed properties of the default preview container to exert greater control over the initial appearance:
public pc, rl, loForm

* Obtain a default preview container:
pc = null
do (_REPORTPREVIEW) with m.pc

* Control its initial appearence:
pc.Zoomlevel = 5
pc.ToolbarIsVisible = .T.

* Obtain a default Reportlistener, make it 
* "preview" style and give it our container:
rl = create("Reportlistener")
rl.ListenerType = 1
rl.PreviewContainer = m.pc

loForm = create("TopForm")
loForm.Show()

report form ? object m.rl window (loForm.Name) nowait

pc.oForm.Toolbar.Dock(0)   && Docked at the top
pc.oForm.WindowState = 2   && maximised

return

define class TopForm as Form
	Caption = "My Top Form Report Preview"
	ShowWindow = 2
	Width = 300
	Height = 600
enddefine
There is another way to do what you want, but as a) it is not backward compatible, and b) it isn't working in the build you have, you'll have to read the help file when VFP 9.0 ships find out more, sorry!

regards,
- Colin
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform