The GetReport method returns a Report object with information about the specified report. This method is useful if you need to know whether a report has any ask-at-runtime filter conditions and, if so, what fields are used in those conditions. This allows you to query the user for the values for those fields in your own application and then pass those values to the RunReport or RunReportToFile methods.
Syntax
GetReport(ReportName) as Object
Parameters
ReportName
The name of the report to get information for.
Return Value
A Report object.
Example
The examples below show you how to use GetReport() in an SQProxy .NET application to retrieve a report and print the names of all fields on that report.
C#
using SFQWrapper;
using SQProxyWrapper;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
SQProxy sqProxy = new SQProxy();
sqProxy.LoadProject(@"C:\Program Files\Stonefield Query SDK\Sample Project");
// Wait for project to finish loading
while (!sqProxy.ProjectLoaded)
{
}
// Get a report and display the names of all fields in it
Report report = sqProxy.SQApplication.ReportEngine.GetReport("Customer List");
foreach (ReportField field in report.Fields)
{
System.Console.WriteLine(field.FieldName);
}
}
}
}
VB.NET
Imports SQProxyWrapper
Imports SFQWrapper
Module Module1
Sub Main()
Dim sqProxy As SQProxyWrapper.SQProxy = New SQProxyWrapper.SQProxy
sqProxy.LoadProject("C:\Program Files\Stonefield Query SDK\Sample Project")
' Wait for project to finish loading
While Not sqProxy.ProjectLoaded
End While
' Get a report and display the names of all fields in it
Dim report As Report = sqProxy.SQApplication.ReportEngine.GetReport("Customer List")
For Each field As ReportField In report.Fields
System.Console.WriteLine(field.FieldName)
Next
End Sub
End Module
See also
GetReports | ReportEngine Object | RunReport | RunReportToFile | SQProxy Object© Stonefield Software Inc., 2023 • Updated: 06/06/16
Comment or report problem with topic