IPrxReport.RefreshDataSources

Syntax

RefreshDataSources;

RefreshDataSources();

Description

The RefreshDataSources method refreshes metadata of regular report data sources.

Comments

To refresh slice dimensions, use the IPrxDataSource.Refresh method.

Example

To execute the example the repository must contain a regular report with the REPORT identifier. Report data source is a cube.

Add links to the Metabase, Report system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Report: IPrxReport;
Begin
    
// Get repository
    MB := MetabaseClass.Active;
    
// Get regular report
    Report := MB.ItemById("REPORT").Edit As IPrxReport;
    
// Get number of report data sources
    Debug.WriteLine(Report.DataSources.Count);
    
// Refresh report data sources
    Report.RefreshDataSources;
    
// Save report
    (Report As IMetabaseObject).Save;
End Sub UserProc;

Imports Prognoz.Platform.Interop.Report;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Report: IPrxReport;
Begin
    
// Get repository
    MB := Params.Metabase;
    
// Get regular report
    Report := MB.ItemById["REPORT"].Edit() As IPrxReport;
    
// Get number of report data sources
    System.Diagnostics.Debug.WriteLine(Report.DataSources.Count);
    
// Refresh report data sources
    Report.RefreshDataSources();
    
// Save report
    (Report As IMetabaseObject).Save();
End Sub;

After executing the example, data sources will be reopened: if data in the source was changed, the report will contain modified values.

See. also:

IPrxReport