This script is called when a report file is imported. It allows you to adjust the report as necessary, such as placing it in a folder other than the one it was created in.

Parameters
A reference to the Stonefield Query Application object and a reference to a Report object for the report.

Return Value
True if the report should be added to the reports list or False if not.

Example
Here's an example that saves the imported report in the user's Favorites folder regardless of what folder it was in originally.

Visual FoxPro

lparameters toApplication as SQApplication, ;
  toReport as Report
toReport.Folders = 'Favorites'
return .T.

VBScript

function Main(Application, Report)
Report.Folders = "Favorites"
Main = True
end function

JavaScript

function Main(Application, Report) {
Report.Folders = "Favorites";
return true ;
}

C#

Please note that the method in this script must be named ReportEngine_ImportReport.

public static bool ReportEngine_ImportReport(SFQApplication sfqApplication, 
  Report report)
{	
  Report.Folders = "Favorites";
  return true;
}

VB.NET

Please note that the method in this script must be named ReportEngine_ImportReport.

public shared function
  ReportEngine_ImportReport(sfqApplication as SFQApplication,
  report as Report) as Boolean
  Report.Folders = "Favorites"
  Return True
End Function

See also

Scripts

© Stonefield Software Inc., 2023 • Updated: 01/13/17
Comment or report problem with topic