The NewReport method displays the report wizard to create a new report. This method is most commonly used when you want to create a report from an application using the SQProxy object.
Syntax
NewReport(Type as String [, AppView as String
[, NoEventLoop as Boolean]]) as Object
Parameters
Type
The type of report to create. Valid values are:
- Q: quick report
- X: cross-tab report
- L: label report
- C: chart report
AppView
The default application view to select in step 2. This parameter is optional.
NoEventLoop
Pass True if you do not want an event loop and want NewReport to return a reference to the wizard form or False if you do want an event loop and want NewReport to return once the wizard is closed (and return nothing in that case). Passing True allows you to bring the wizard window to the top if desired, but you also need to not allow the wizard form reference to go out of scope or the window closes.
Return Value
None.
Example
This example creates a new quick report.
Visual FoxPro
loQuery = createobject('SQProxy.SQProxy')
loQuery.LoadProject('\MyProjects\Northwind', 'admin', 'admin')
if loQuery.ProjectLoaded
loQuery.SQApplication.ReportEngine.NewReport('Q')
endif
This example creates a new quick report and brings the wizard to the top.
Visual FoxPro
loQuery = createobject('SQProxy.SQProxy')
loQuery.LoadProject('\MyProjects\Northwind', 'admin', 'admin')
if loQuery.ProjectLoaded
loWizard = loQuery.SQApplication.ReportEngine.NewReport('Q', ;
.NULL., .T.)
declare integer SetForegroundWindow in Win32API ;
integer lnhWnd
SetForegroundWindow(loWizard.hWnd)
endif
See also
EditReport | ReportEngine Object | SQProxy Object© Stonefield Software Inc., 2023 • Updated: 05/12/17
Comment or report problem with topic