Codeunit 18122315 EOS Report Parameter Helper
Helper functions for reading, handling and dealing with report parameter XML.
procedure Decode(XmlParameterSet: Text)
Decodes a report parameter XML into this instance and extracts all fields and its values.
XmlParameterSet Text
The report parameter XML.
procedure Encode(): Text
Creates a report parameter XML from the fields and values of this instance.
Returns Text
The report parameter XML.
procedure Encode(NewReportId: Integer): Text
Creates a report parameter XML from the fields and values of this instance, for a specific report.
NewReportId Integer
The ID of the report this report parameter XML is for.
Returns Text
The report parameter XML.
procedure ReportId(): Integer
Returns the report ID from the decoded report parameter XML.
Returns Integer
The report ID.
procedure Get(Name: Text; MustExist: Boolean): Text
Returns the value of field from the decoded report parameter XML.
Name Text
The name of the field to return.
MustExist Boolean
Specifies if the field must exist. A runtime error is generated if it does not and this is true
.
Returns Text
The value of the field as an XML-formatted string.
procedure GetBool(Name: Text; MustExist: Boolean): Boolean
Returns the value as Boolean of field from the decoded report parameter XML.
Name Text
The name of the field to return.
MustExist Boolean
Specifies if the field must exist. A runtime error is generated if it does not and this is true
.
Returns Boolean
The value of the field as a Boolean.
procedure GetInt(Name: Text; MustExist: Boolean): Integer
Returns the value as Integer of field from the decoded report parameter XML.
Name Text
The name of the field to return.
MustExist Boolean
Specifies if the field must exist. A runtime error is generated if it does not and this is true
.
Returns Integer
The value of the field as an Integer.
procedure GetDate(Name: Text; MustExist: Boolean): Date
Returns the value as Date of field from the decoded report parameter XML.
Name Text
The name of the field to return.
MustExist Boolean
Specifies if the field must exist. A runtime error is generated if it does not and this is true
.
Returns Date
The value of the field as an Date.
procedure GetKeys(var result: List of [Text])
Returns a list of all fields that were present on the decoded report parameter XML.
result List[Text]
A list of text that will contain all field names.
procedure Set(Name: Text; Value: Variant)
Sets the value of a field. If the field does not exist, it is created.
Name Text
The name of the field. Be aware that this must be a valid XML name.
Value Variant
The value of the field.
procedure Contains(Name: Text): Boolean
Checks if a given field name exists.
Name Text
The name of the field. Be aware that this must be a valid XML name.
Returns Boolean
true
if the field exists, false
otherwise.
procedure Test(Name: Text)
Checks if a given field name exists. A runtime error is generated if it does not.
Name Text
The name of the field. Be aware that this must be a valid XML name.
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.