UseOnlyInAnalyticDashboard: Boolean;
UseOnlyInAnalyticDashboard: boolean;
The UseOnlyInAnalyticDashboard property returns whether the express report is used as a dashboard data source only.
Available values:
True. The express report is a data source for the dashboard.
False. The express report is an independent object of the mobile application.
Executing the example requires that the repository contains a mobile application with the MA_PUB identifier. Add links to the Metabase, Mobile system assemblies.
Sub UserProc;
Var
mb: IMetabase;
Mobile: IMobileApplication;
Publicator: IMobileApplicationPublicator;
MaPubObs: IMobileApplicationPublishObjects;
i: Integer;
MaPubObj: IMobileApplicationPublishObject;
PubObj: IMobilePublishObject;
EaxPubObj: IMobilePublishAnalyzer;
s: String;
Begin
mb := MetabaseClass.Active;
// Get mobile application
Mobile := mb.ItemById("MA_PUB").Bind As IMobileApplication;
// Create a mobile application publisher
Publicator := Mobile.CreatePublicator;
// Get mobile application objects
MaPubObs := Publicator.Items;
For i := 0 To MaPubObs.Count - 1 Do
MaPubObj := MaPubObs.Item(i);
// Select express reports among objects
If MaPubObj.Type = MobilePublishObjectType.Analyzer Then
PubObj := MaPubObj.PublishObject;
EaxPubObj := PubObj As IMobilePublishAnalyzer;
// Display data on the express report in the console window
s := PubObj.Object.Name + " (" + PubObj.Object.Id + ")";
If EaxPubObj.UseOnlyInAnalyticDashboard Then
Debug.WriteLine("Express report '" +
s + "' used as a dashboard data source").
Else
Debug.WriteLine("Express report '" +
s + "' is an independent object of mobile application").
End If;
End If;
End For
End Sub UserProc;
Example execution result: the console window displays information on express reports from the mobile application.
Executing the example requires that the repository contains a mobile application with the MA_PUB identifier.
Imports Prognoz.Platform.Interop.Mobile;
…
[STAThread]
Public Shared Sub Main(Params: StartParams);
Var
mb: IMetabase;
Mobile: IMobileApplication;
Publicator: IMobileApplicationPublicator;
MaPubObs: IMobileApplicationPublishObjects;
i: Integer;
MaPubObj: IMobileApplicationPublishObject;
PubObj: IMobilePublishObject;
EaxPubObj: IMobilePublishAnalyzer;
s: String;
Begin
mb := Params.Metabase;
// Get mobile application
Mobile := mb.ItemById["MA_PUB"].Bind() As IMobileApplication;
// Create a mobile application publisher
Publicator := Mobile.CreatePublicator();
// Get mobile application objects
MaPubObs := Publicator.Items;
For i := 0 To MaPubObs.Count - 1 Do
MaPubObj := MaPubObs.Item[i];
// Select express reports among objects
If MaPubObj.Type = MobilePublishObjectType.mpotAnalyzer Then
PubObj := MaPubObj.PublishObject;
EaxPubObj := PubObj As IMobilePublishAnalyzer;
// Display data on the express report in the console window
s := PubObj.Object.Name + " (" + PubObj.Object.Id + ")";
If EaxPubObj.UseOnlyInAnalyticDashboard Then
System.Diagnostics.Debug.WriteLine("Express report '" +
s + "' used as a dashboard data source").
Else
System.Diagnostics.Debug.WriteLine("Express report '" +
s + "' is an independent object of mobile application").
End If;
End If;
End For
End Sub;
Example execution result: the console window displays information on express reports from the mobile application.
See also: