IMobilePublishReport.UseOnlyInAnalyticDashboard

Fore Syntax

UseOnlyInAnalyticDashboard: Boolean;

Fore.NET Syntax

UseOnlyInAnalyticDashboard: boolean;

Description

The UseOnlyInAnalyticDashboard property returns whether regular report is used only as a data source for dashboard.

Comments

Available values:

Fore Example

Executing the example requires that the repository contains a mobile application with the MA_PUB identifier.

Add links to the Metabase, Mobile, Report system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    Mobile: IMobileApplication;
    Publicator: IMobileApplicationPublicator;
    MaPubObs: IMobileApplicationPublishObjects;
    n, i, j: Integer;
    MaPubObj: IMobileApplicationPublishObject;
    PubObj: IMobilePublishObject;
    EaxPubObj: IMobilePublishReport;
    s: String;
    report: IPrxReport;
    Sheets: IPrxSheets;
Begin
    mb := MetabaseClass.Active;
    
// Get mobile application
    Mobile := mb.ItemById("MA_PUB").Bind As IMobileApplication;
    
// Create a publicator
    Publicator := Mobile.CreatePublicator;
    
// Get mobile application objects
    MaPubObs := Publicator.Items;
    
For i := 0 To MaPubObs.Count - 1 Do MaPubObj := MaPubObs.Item(i);
        
// Select regular reports among objects
        If MaPubObj.Type = MobilePublishObjectType.Report Then
            PubObj := MaPubObj.PublishObject;
            EaxPubObj := PubObj 
As IMobilePublishReport;
            
//Calculate the number of regular report sheets
            report := PubObj.Object As IPrxReport;
            Sheets := report.Sheets;
            n := Sheets.Count;
            
// Display data about regular report in the console window
            s := PubObj.Object.Name + "(" + PubObj.Object.Id + ")";
            
If EaxPubObj.UseOnlyInAnalyticDashboard Then
                Debug.WriteLine(
"Regular report '" + s + "'is used as a data source of dashboard");
            
Else Debug.WriteLine("Regular report '" + s + "'is an independent object of mobile application");
            
End If;
            
//Check if the specified sheet key is in the list of sheet keys
            For j := 0 To n - 1 Do
                Debug.WriteLine(
"Sheet: " + (j + 1).ToString);
                
If EaxPubObj.IsPublishSheet(Sheets.Item(j).Key) Then
                    Debug.WriteLine(
"Sheet is in the list")
                
Else Debug.WriteLine("Sheet is not in the list");
                
End If;
            
End For;
            
// Set publication sheet
            If EaxPubObj.IsPublishSheet(n) Then
                EaxPubObj.SetPublishSheet(n, 
False);
            
Else EaxPubObj.SetPublishSheet(n, True);
            
End If;
            
//Check if the specified sheet key is in the list of sheet keys
            For j := 0 To n - 1 Do
                Debug.WriteLine(
"Sheet: " + (j + 1).ToString);
                
If EaxPubObj.IsPublishSheet(Sheets.Item(j).Key) Then
                    Debug.WriteLine(
"Sheet is in the list")
                
Else Debug.WriteLine("Key is not in the list")
                
End If;
            
End For;
        
End If;
    
End For;
End Sub UserProc;

After executing the example the console window displays information about regular reports contained in mobile application.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Mobile;
Imports Prognoz.Platform.Interop.Report;

Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    Mobile: IMobileApplication;
    Publicator: IMobileApplicationPublicator;
    MaPubObs: IMobileApplicationPublishObjects;
    n, i, j: Integer;
    MaPubObj: IMobileApplicationPublishObject;
    PubObj: IMobilePublishObject;
    EaxPubObj: IMobilePublishReport;
    s: String;
    report: IPrxReport;
    Sheets: IPrxSheets;
Begin
    mb := Params.Metabase;
    // Get mobile application
    Mobile := mb.ItemById["MA_PUB"].Bind() As  IMobileApplication;
    // Create a publisher
    Publicator := Mobile.CreatePublicator();
    // Get mobile application objects
    MaPubObs := Publicator.Items;
    For  i := 0 To  MaPubObs.Count - 1 Do
        MaPubObj := MaPubObs.Item[i];
        // Select regular reports among objects
        If  MaPubObj.Type = MobilePublishObjectType.mpotReport Then
            PubObj := MaPubObj.PublishObject;
            EaxPubObj := PubObj As  IMobilePublishReport;
            //Calculate the number of regular report sheets
            report := PubObj.Object As IPrxReport;
            Sheets := report.Sheets;
            n := Sheets.Count;
            // Display data about regular report in the console window
            s := PubObj.Object.Name + " (" + PubObj.Object.Id + ")";
            If  EaxPubObj.UseOnlyInAnalyticDashboard Then
                System.Diagnostics.Debug.WriteLine("Regular report '" + s + "' is used as a data source of dashboard");
            Else System.Diagnostics.Debug.WriteLine("Regular report '" + s + "' is a separate object of mobile application");
            End If;
            //Check if the specified sheet key is in the list of sheet keys
            For j := 0 To n - 1 Do
                System.Diagnostics.Debug.WriteLine("Sheet: " + (j + 1).ToString());
                If EaxPubObj.IsPublishSheet(Sheets.Item[j].Key) Then
                    System.Diagnostics.Debug.WriteLine("Key is in the list")
                Else System.Diagnostics.Debug.WriteLine("Key is not in the list");
                End If;
            End For;
            // Set publication sheet
            If EaxPubObj.IsPublishSheet(1Then
                EaxPubObj.SetPublishSheet(1False);
            Else EaxPubObj.SetPublishSheet(1True);
            End If;
            //Check if the specified sheet key is in the list of sheet keys
            For j := 0 To n - 1 Do
                System.Diagnostics.Debug.WriteLine("Sheet: " + (j + 1).ToString());
                If EaxPubObj.IsPublishSheet(Sheets.Item[j].Key) Then
                    System.Diagnostics.Debug.WriteLine("Key is in the list")
                Else System.Diagnostics.Debug.WriteLine("Key is not in the list");
                End If;
            End For;
        End If;
    End For;
End Sub;

See also:

IMobilePublishReport