UseOnlyInAnalyticDashboard: Boolean;
UseOnlyInAnalyticDashboard: boolean;
The UseOnlyInAnalyticDashboard property returns whether regular report is used only as a data source for dashboard.
Available values:
True. Regular report is a data source of dashboard.
False. Regular report is an independent mobile application object.
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.
After executing the example the console window displays information about regular reports contained in mobile application.
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(1) Then
EaxPubObj.SetPublishSheet(1, False);
Else EaxPubObj.SetPublishSheet(1, True);
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: