Text: String;
Text: string;
The Text property determines table cell text.
If the property is used for selected cell range, it must contain at least one cell with value.
To execute the example, the repository must contain a regular report with the REG_REPORT_TAB identifier. The report contains non-empty cell range A0:I0.
Add links to the Metabase, Report, Tab system assemblies.
Sub UserProc;
Var
MB: IMetaBase;
RegRep: IPrxReport;
Sheet: IPrxSheet;
Table: IPrxTable;
Range: ITabSheet;
Diap: ITabRange;
Style: ITabCellStyle;
Begin
// Get repository
MB := MetabaseClass.Active;
// Get regular report
RegRep := MB.ItemById("REG_REPORT_TAB").Edit As IPrxReport;
// Get cell range (A0:I0)
Sheet := RegRep.Activesheet;
Table := Sheet As IPrxTable;
Range := Table.TabSheet;
Diap := Range.ParseRange("A0:I0");
// Get cell style of the range (A0:I0)
Style := Diap.Style;
// Determine text for cells
Style.Text := "text";
// Save changes
(RegRep As IMetabaseObject).Save;
End Sub UserProc;
After executing the example, text in cells of the A0:I0 range is changed.
The requirements and result of the Fore.NET Example execution match with those in the Fore Example.
Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Tab;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetaBase;
RegRep: IPrxReport;
Sheet: IPrxSheet;
Table: IPrxTable;
Range: ITabSheet;
Diap: ITabRange;
Style: ITabCellStyle;
Begin
// Get repository
MB := Params.Metabase;
// Get regular report
RegRep := MB.ItemById["REG_REPORT_TAB"].Edit() As IPrxReport;
// Get cell range (A0:I0)
Sheet := RegRep.Activesheet;
Table := Sheet As IPrxTable;
Range := Table.TabSheet;
Diap := Range.ParseRange("A0:I0");
// Get cell style of the range (A0:I0)
Style := Diap.Style;
// Determine text for cells
Style.Text := "text";
// Save changes
(RegRep As IMetabaseObject).Save();
End Sub;
See also: