BulkSelectionSet: IPrxBulkSelectionSet;
BulkSelectionSet : Prognoz.Platform.Interop.Report.IPrxBulkSelectionSet;
The BulkSelectionSet property determines the collection of fixed dimension selections of published regular report.
Available selections are selections of the dimensions, for which a control is created.
Executing the example requires that the repository contains the objects:
Regular report with the REG_REPORT_PUB identifier that contains a control and a fixed dimension managed by this control.
Mobile application container with the MA_PUB identifier that contains a regular report shortcut with the REG_REPORT_PUB identifier. The shortcut is the first object in the list of mobile application container objects.
Add links to the Metabase, Mobile, Report system assemblies.
Sub UserProc;
Var
mb: IMetabase;
RegRep: IPrxReport;
Mobile: IMobileApplication;
SelSet: IPrxBulkSelectionSet;
Publicator: IMobileApplicationPublicator;
MaPubObjs: IMobileApplicationPublishObjects;
MaPubObj: IMobileApplicationPublishObject;
PrxPubObj: IMobilePublishReport;
PubObj: IMobilePublishObject;
res: MobilePublishObjectResult;
Begin
// Get repository
mb := MetabaseClass.Active;
// Get regular report
RegRep := mb.ItemById("REG_REPORT_PUB").Edit As IPrxReport;
// Get fixed dimension selection
SelSet := Regrep.GetBulkSelectionSet("1");
// Get mobile application
Mobile := mb.ItemById("MA_PUB").Bind As IMobileApplication;
// Create a mobile application publisher
Publicator := Mobile.CreatePublicator;
// Get collection of published objects
MaPubObjs := Publicator.Items;
// Select the first published object
MaPubObj := MaPubObjs.Item(0);
PubObj := MaPubObj.PublishObject;
PrxPubObj := PubObj As IMobilePublishReport;
// Set selection of fixed dimension for publication
PrxPubObj.BulkSelectionSet := SelSet;
// Specify that all report sheets should be published into one file
PrxPubObj.OneFileMode := True;
// Set publication path
PubObj.ExportPath := "C:\" + PubObj.Object.Id + ".zip";
// Publish regular report
res := PubObj.Publish;
// Display result in console window
If (res As integer) = 0 Then Debug.WriteLine("Publication is successful");
Debug.WriteLine("Publication path: " + PubObj.ExportPath);
Else Debug.WriteLine("Error occurred on publication");
End If;
End Sub UserProc;
After executing the example the mobile application containing regular report with the set selection of fixed dimension is published by the specified path.
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;
RegRep: IPrxReport;
Mobile: IMobileApplication;
SelSet: IPrxBulkSelectionSet;
Publicator: IMobileApplicationPublicator;
MaPubObjs: IMobileApplicationPublishObjects;
MaPubObj: IMobileApplicationPublishObject;
PrxPubObj: IMobilePublishReport;
PubObj: IMobilePublishObject;
res: MobilePublishObjectResult;
Begin
// Get repository
mb := Params.Metabase;
// Get regular report
RegRep := mb.ItemById["REG_REPORT_PUB"].Edit() As IPrxReport;
// Get fixed dimension selection
SelSet := Regrep.GetBulkSelectionSet("1");
// Get mobile application
Mobile := mb.ItemById["MA_PUB"].Bind() As IMobileApplication;
// Create a mobile application publisher
Publicator := Mobile.CreatePublicator();
// Get collection of published objects
MaPubObjs := Publicator.Items;
// Select the first published object
MaPubObj := MaPubObjs.Item[0];
PubObj := MaPubObj.PublishObject;
PrxPubObj := PubObj As IMobilePublishReport;
// Set selection of fixed dimension for publication
PrxPubObj.BulkSelectionSet := SelSet;
// Specify that all report sheets should be published into one file
PrxPubObj.OneFileMode := True;
// Set publication path
PubObj.ExportPath := "C:\" + PubObj.Object.Id + ".zip";
// Publish regular report
res := PubObj.Publish(Null);
// Display result in console window
If (res As integer) = 0 Then System.Diagnostics.Debug.WriteLine("Publication is successful");
System.Diagnostics.Debug.WriteLine("Publication path: " + PubObj.ExportPath);
Else System.Diagnostics.Debug.WriteLine("Error occurred on publication");
End If;
End Sub;
See also: