SQL Object
 
Syntax
 
SQL.RunReport ViewOrTableOrQuery[, RunNow][, OutputStyle]
 
Description
Opens a VIEW, TABLE or a SELECT query, and then launches a Wizard function to process the lines into printable labels.
 
The output is similar to the output option: "Report" in the SQL Designer
 
Parameter
Description
ViewOrTableOrQuery
A reference to a View, Table or Select query.
If a previously created report is to be opened, the full path and file name of the .vrd file is entered here, preceded by an @ sign.
Example: "@o:\adminsql\script\mijnrapport.vrd"
RunNow
Boolean, default value = False.
Executes the report directly, without displaying the editor. Is only possible in combination with a previously created report.
OutputStyle
If RunNow = False, this value is ignored.
Here a choice is made from the output options for the report to be run directly.
Default value: vsPreview. This displays the print preview from where the other output options can also be selected.
 
See Also
other SQL.Runxxxxxxxx methodes, Rapport.
Example
Sub Main()
 
    Dim sQuery As String
 
    sQuery = "Select * From Klanten Where Admin = 1 And Postcode Like '25%'"
    SQL.RunReport sQuery
 
End Sub
 
Example with previously prepared report:
Sub Main()
 
    Dim sQuery As String
 
    sQuery = "@o:\adminsql\scripts\mijn rapport.vrd"
    SQL.RunReport sQuery, True, vsPreview
 
End Sub