Syntax
| SQL.RunReport ViewOrTableOrQuery[, RunNow][, OutputStyle[, ExportFileName]
| ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Description
| Opens a VIEW, TABLE or SELECT query as a report, or opens a previously created report.
The output is similar to the output option: "Report" in the SQL Designer
Since release V12.10.039, RunReport also opens a project of the TRADIUM Report Designer (List & Label): a list (.tlst), label (.tlbl) or card (.tcrd) project. Such a project contains its own query, so it is opened with the data as it is at that moment. With RunNow = True the print preview is shown directly, from where the report can be printed or exported (for example to PDF). This requires the user right "report designer".
| ||||||||||
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 Example with a Report Designer project, opened directly in the print preview:
Sub Main() Example for a scheduled task or web macro: export to PDF without a dialog, then send the file by mail:
Sub Main() | ||||||||||