Drill: IPrxDimensionDrill;
Drill: Prognoz.Platform.Interop.Report.IPrxDimensionDrill;
The Drill property determines parameters of the data area detailing.
To determine whether the Detailing option is enabled, use the IPrxDataIslandDimensionCommon.IsDrilled property.
Executing the example requires a form that contains the Button component with the Button1 identifier and the UiReport component with the UiReport1 identifier. A regular report with a configured hierarchy is used as a data source. The example is a handler of the OnClick event for the Button1 component.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Report: IPrxReport;
DI: IPrxDataIsland;
DIProp: IPrxDataIslandProperties;
Drill: IPrxDimensionDrill;
DimMode: IPrxSliceDimension;
DimModel: IDimensionModel;
Top: IPrxDataIslandDimension;
Level: IPrxDataIslandLevel;
Begin
Report := UiReport1.Instance As IPrxReport;
DI := Report.DataIslands.Item(0);
DI.Edit;
DimModel := DI.Slice.Dimensions.Item(0).Dimension.Dimension;
DIProp := DI.Properties;
Top := DIProp.Dimension(DimModel);
Level := Top.Level(DimModel.Levels.Item(0));
If Level.IsDrilled <> True Then
Level.Drilled := TriState.OnOption;
End If;
Drill := Level.Drill;
Drill.Mode := PrxDataDrillMode.Replace;
DimMode := Report.DataSources.Item(0).Slices.Item(0).Dimensions.Item(0);
Drill.Dimension := DimMode;
Drill.Index := DimMode.Dimension.Dimension.Indexes.PrimaryIndex;
Drill.Attribute := DimModel.Attributes.Id;
Drill.Sheet := Null;
Drill.Action := "#Sheet2!PrxChart1";
DI.Save;
End Sub Button1OnClick;
After executing the example detailing is set for the data area. Clicking the hyperlink executes positioning on the chart located on the second sheet of the report.
The requirements and result of Fore.NET Example execution match with those in the Fore Example. Use Fore.NET analogs instead of Fore components.
Add links to the Dimensions, ForeSystem and Report system assemblies.
Imports Prognoz.Platform.Interop.Dimensions;
Imports Prognoz.Platform.Interop.ForeSystem;
Imports Prognoz.Platform.Interop.Report;
…
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
Report: IPrxReport;
DI: IPrxDataIsland;
DIProp: IPrxDataIslandProperties;
Drill: IPrxDimensionDrill;
DimMode: IPrxSliceDimension;
DimModel: IDimensionModel;
Top: IPrxDataIslandDimension;
Level: IPrxDataIslandLevel;
Begin
Report := uiReportNet1.ReportUi.Instance As IPrxReport;
DI := Report.DataIslands.Item[0];
DI.Edit();
DimModel := DI.Slice.Dimensions.Item[0].Dimension.Dimension;
DIProp := DI.Properties;
Top := DIProp.Dimension[DimModel];
Level := Top.Level[DimModel.Levels.Item[0]];
If Level.IsDrilled <> True Then
Level.Drilled := TriState.tsOnOption;
End If;
Drill := Level.Drill;
Drill.Mode := PrxDataDrillMode.ddmReplace;
DimMode := Report.DataSources.Item[0].Slices.Item[0].Dimensions.Item[0];
Drill.Dimension := DimMode;
Drill.Index := DimMode.Dimension.Dimension.Indexes.PrimaryIndex;
Drill.Attribute := DimModel.Attributes.Id;
Drill.Sheet := Null;
Drill.Action := "#Sheet2!PrxChart1";
DI.Save();
End Sub;
See also: