GetTagText(Printer: IGxDocumentPrinter; Tag: String): String;
GetTagText(Printer: Prognoz.Platform.Interop.Drawing.IGxDocumentPrinter; Tag: string): string;
Printer. The parameter is reserved for the future. . The printer that prints the document.
Tag. The tag that must be converted into text.
The GetTagText method converts the specified tag into text.
Null must be passed as value of the Printer property.
The tags passed as value of the Tag parameter are presented in description of the following properties:
IEaxHeaderPart.Text. Tags available for express reports.
IPrxSheetHeaderPart.Text. Tags available for regular reports.
IMPORTANT. In the current implementation the method calculates incorrectly the tag with the number of pages because the physical printer (device) is required for this.
Executing the example requires that the repository contains an express report with the EXPRESS_REPORT identifier.
Add links to the Drawing, Metabase and Ui system assemblies.
Sub UserProc;
Var
MB: IMetabase;
GxDoc: IGxDocument;
Text: String;
Begin
MB := MetabaseClass.Active;
GxDoc := MB.ItemById("EXPRESS_REPORT").Bind As IGxDocument;
Text := GxDoc.GetTagText(Null, "&[Name] &[Date]");
WinApplication.InformationBox(Text);
End Sub UserProc;
After executing the example the message with the value of the text is generated on using the specified tags.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
Imports Prognoz.Platform.Interop.Drawing;
Imports Prognoz.Platform.Interop.Ui;
Imports Prognoz.Platform.Forms.Net;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
GxDoc: IGxDocument;
Text: String;
WinApp: WinApplicationClassClass = New WinApplicationClassClass();
Begin
MB := Params.Metabase;
GxDoc := MB.ItemById["OBJ3333"].Bind() As IGxDocument;
Text := GxDoc.GetTagText(Null, "&[Name] &[Date]");
WinApp.InformationBox(Text, Null);
End Sub;
See also: