Page 1 of 1

define image variable

Posted: Fri Nov 19, 2021 9:39 pm
by hra1368
How to define an image variable?

this.designer.report.dictionary.variables.add(
new Stimulsoft.Report.Dictionary.StiVariable(category,name,alias)
)

Also, the synchronize function does not work

this.designer.report.dictionary.synchronize();

Re: define image variable

Posted: Mon Nov 22, 2021 1:27 pm
by Max Shamanov
Hello,

please try to use the following code for creating an image variable:

Code: Select all

var info = new Stimulsoft.Report.Dictionary.StiDialogInfo();
        info.Base64 = report.dictionary.variables.add(new Stimulsoft.Report.Dictionary.StiVariable("myVariables", "myImage",
        "myImage", "", Stimulsoft.System.Drawing.Image, (null, false, Stimulsoft.Report.Dictionary.StiVariableInitBy.Value, true, info)));
Thank you.