Report Element automation object

Report Element automation object allows access to TARGET Reports' report element from external programming environments.
The object is exposed through the IRSetup interface. Report Element automation object is exposed by TARGET Reports component through GetRSetup method.

Properties

enabled

This property indicates whether the report element should be included in the report generation process. Use this property to turn the report's visibility on and off accordingly to custom logic.

Read/Write property
Type: boolean

Dim rm, rs1, rs2 
Set rm = CreateObject( "ReportManager.ReportManager.1" )
rm.OpenProject( "C:\data\Test.report" )

Set rs1 = rm.GetRSetup( "Report1" )
Set rs2 = rm.GetRSetup( "Report2" )

rs1.enabled = true
rs2.enabled = false

Methods

GetOutputDS

Provides access to the report element's output data source (database table) object, which is returned as a Data source object.

Function GetOutputDS()

Parameters:
none

Return value:
ITDataSource - an object associated with an output database table.

An exception is thrown in case of errors.

Dim rm, rs, ds
Set rm = CreateObject( "ReportManager.ReportManager.1" )
rm.OpenProject( "C:\data\Test.report" )
Set rs = rm.GetRSetup( "Report1" )
Set ds = rs.GetOutputDS()
ds.database = "c:\data\access\my.mdb"
ds.table    = "Accounts"

GetScope

Provides access to the report element's scope object, which is returned as a Scope object.

Function GetScope()

Parameters:
none

Return value:
IScope

An exception is thrown in case of errors.

Dim rm, rs, scope
Set rm = CreateObject( "ReportManager.ReportManager.1" )
rm.OpenProject( "C:\data\Test.report" )
Set rs = rm.GetRSetup( "Report1" )
Set scope = rs.GetScope()
scope.Set "ID=24", 1, true

GetVar

Returns a TARGET variable by the variable's name. The variable is returned as a Value object.

Function GetVar( name )

Parameters:
string - the variable's name.

Return value:
ITargetVar

An exception is thrown in case of errors.

Dim rm, rs, var
Set rm = CreateObject( "ReportManager.ReportManager.1" )
rm.OpenProject( "C:\data\Test.report" )
Set rs  = rm.GetRSetup( "Report1" )
Set var = rs.GetVar( "Var1" )
var.value = 15


Comments