Opens a standard dialog box that is used to set up table styles.
Command parameters are passed in the Data property. Executing the command requires to specify an array of the Variant type in this property, the elements of this array contain the following values:
Value type | Description |
Element 1: ITabSheet | The page containing a cell range. |
Element 2: ITabRange | The cell range, for which the table style setup dialog box opens. If the parameter is not specified and a single cell is selected in the table, a dialog box opens that is used to set up styles of the entire table. If a cell range is selected in the table, the dialog box opens to set up styles for this range. |
Element 3: IStyleSheet | The optional parameter determining a style set, which styles are to be available when setting up the formatting. The following objects can be used as values for the parameter: sets of repository style tables, or a style set selected for the repository in the StyleSheet property. |
NOTE. If a style set is selected for the repository, but this set is not specified in the element 2 of the array, the styles of this style set are unavailable on setting up formatting.
The command is used only for regular reports.
Executing the example requires a form with the Button1 button, the ReportBox component and the UiReport component named UiReport1, which is used as a data source for the ReportBox component.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Rep: IPrxReport;
Sheet: ITabSheet;
Target: IUiCommandTarget;
Context: IUiCommandExecutionContext;
Data: Array;
Begin
Rep := UiReport1.Instance As IPrxReport;
Sheet := Rep.ActiveSheet As ITabSheet;
Target := WinApplication.Instance.GetPluginTarget("Report");
Context := Target.CreateExecutionContext;
Data := New Variant[3];
Data[0] := Sheet;
If Rep.StyleSheet <> Null Then
Data[2] := Rep.StyleSheet;
End If;
Context.Data := Data;
Target.Execute("TableStylesSetup", Context);
End Sub Button1OnClick;
Clicking the button opens a dialog box that is used to set up styles for active sheet of the regular report connected in the UiReport1 component. If a repository style set is connected to the regular report, styles of this set are available on setting up style.
See also: