I wanted to know if there was a way I could check to see if a variable has been added to the report dictionary.
For example, in my code I have this expression:
StiReport report = new StiReport();
if (Add == true)
{
report.Dictionary.Variables.Add(new StiVariable("Custom", "Title", "Report"));
}
In the Report Designer, is there a function or expression that I can use to determine if the variable "Title" exists in the report dictionary?
Check to see if variable exists in dictionary
Check to see if variable exists in dictionary
Hello,
You can use the following code:
Thank you.
You can use the following code:
Code: Select all
foreach (Stimulsoft.Report.Dictionary.StiVariable var in report.Dictionary.Variables)
{
if (var.Name == "VariableAddName")
{
Add = false;
}
}
Re: Check to see if variable exists in dictionary
StiReport report = new StiReport();
if (report.Dictionary.Variables.Contains("variablename") == true)
if (report.Dictionary.Variables.Contains("variablename") == true)
-
- Posts: 6263
- Joined: Tue Mar 20, 2018 5:34 am
Re: Check to see if variable exists in dictionary
Hello,
Thank you.
Thank you.