'Declaration Public ReadOnly Property CustomVariables As StringDictionary
'Usage Dim instance As ReportSettings Dim value As StringDictionary value = instance.CustomVariables
public StringDictionary CustomVariables {get;}
'Declaration Public ReadOnly Property CustomVariables As StringDictionary
'Usage Dim instance As ReportSettings Dim value As StringDictionary value = instance.CustomVariables
public StringDictionary CustomVariables {get;}
The following table provides a list of the supported default variables and their definitions.
Supported variables | Descriptions |
---|---|
%PAGE[ format=["]format_specifier["] ]% | The current page. |
%TOTALPAGES[ format=format_specifier]% | The total number of pages. |
%DATETIME[ format=["]format_specifier["] ]% | The current date and time. By default, the system short date pattern will be used. |
%TITLE[ format=["]format_specifier["] ]% | The title of the report. |
All items placed in square brackets [] are optional. If the format_specifier contains spaces, then quotes must be used.
In addition to the default variables, custom variables can be provided through the CustomVariables property. The string representation of the default variables as well as the custom ones can be modified during the Report.QueryVariableText event.
Dim report As New Report( GridControl1 )
report.ReportStyleSheet.PageHeader.LeftElement.TextFormat = "The current date is: %DATETIME format=""dd MMM yy""%"
report.PrintPreview()
Report report = new Report( gridControl1 );
report.ReportStyleSheet.PageHeader.LeftElement.TextFormat = "The current date is: %DATETIME format=\"dd MMM yy\"%";
report.PrintPreview();
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2