GetBulkSelectionSet(Range: String): IPrxBulkSelectionSet;
GetBulkSelectionSet(Range: String): Prognoz.Platform.Interop.Report.IPrxBulkSelectionSet;
Range. The sheets, for which the user should set a selection for batch operations (The list of sheets may have one of the following formats: "1", "1,3", "1-3").
The GetBulkSelectionSet method returns allowed selection that is used to execute batch operations for the specified sheet range.
For the sheets specified in the Range parameter, the user must create common controls configured to work with a fixed slice dimension.
Executing the example requires that the repository contains a regular report with the Report_1 identifier. A common control linked to the dimension is created for the two first report sheets. The dimension is located in the fixed area of the slice.
Sub UserProc;
Var
MB: IMetabase;
DocPrint: IGxDocumentPrinter;
RegRep: IPrxReport;
GxDoc: IGxDocument;
BulkSettings: IPrxBulkSettings;
SelSet: IPrxBulkSelectionSet;
Begin
MB := MetabaseClass.Active;
//Printer to be used
DocPrint := GxPrinters.DefaultPrinter As IGxDocumentPrinter;
//Regular report, for which the user sets up batch print
RegRep := MB.ItemById("Report_1").Bind As IPrxReport;
GxDoc := RegRep As IGxDocument;
//Batch print options
BulkSettings := GxDoc.BulkSettings As IPrxBulkSettings;
BulkSettings.Enabled := True;
SelSet := RegRep.GetBulkSelectionSet("1,2");
SelSet.Item(0).Selection.SelectAll;
BulkSettings.SelectionSet := SelSet;
GxDoc.Print(DocPrint, -1, 0, "");
End Sub UserProc;
After executing the example two sheets of the regular report are batch printed. Report versions are based on all the elements of the fixed dimension.
Executing the example requires that the repository contains a regular report with the Report_1 identifier. A common control linked to the dimension is created for the two first report sheets. The dimension is located in the fixed area of the slice. The specified procedure is an entry point of a .NET assembly.
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
GxPrintersCls: GxPrintersClassClass = New GxPrintersClassClass();
DocPrint: IGxDocumentPrinter;
RegRep: IPrxReport;
GxDoc: IGxDocument;
BulkSettings: IPrxBulkSettings;
SelSet: IPrxBulkSelectionSet;
Begin
MB := Params.Metabase;
//Printer to be used
DocPrint := GxPrintersCls.DefaultPrinter As IGxDocumentPrinter;
//Regular report, for which the user sets up batch print
RegRep := MB.ItemById["Report_1"].Bind() As IPrxReport;
GxDoc := RegRep As IGxDocument;
//Batch print options
BulkSettings := GxDoc.BulkSettings As IPrxBulkSettings;
BulkSettings.Enabled := True;
SelSet := RegRep.GetBulkSelectionSet("1,2");
SelSet.Item[0].Selection.SelectAll();
BulkSettings.SelectionSet := SelSet;
GxDoc.Print(DocPrint, -1, 0, "", True);
End Sub;
After executing the example two sheets of the regular report are batch printed. Report versions are based on all the elements of the fixed dimension.
See also: