Hello,
is there a way, I can create variables via code, when there are undefined before.
I know how to edit variables that are existing, but for creating variables in the designer via code, I didn't found a solution.
Thank you
Best regards
loki
Creating new Variables via Code
Re: Creating new Variables via Code
Hello.
You could add a variable with next code:
Before adding it to the report you could set next properties:
Thank you.
You could add a variable with next code:
Code: Select all
var newVariable = new Stimulsoft.Report.Dictionary.StiVariable();
...
report.dictionary.variables.add(newVariable);
Code: Select all
category: string = String.empty,
name: string = String.empty,
alias: string = String.empty,
description: string = String.empty,
typeT: Type = String.getType(),
value: string = String.empty,
readOnly: boolean = false,
initBy: StiVariableInitBy = StiVariableInitBy.Value,
requestFromUser: boolean = false,
dialogInfo: StiDialogInfo = new StiDialogInfo(),
key: string = null, allowUseAsSqlParameter: boolean = false