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 enddefineIn 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 enddefineThere 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!