define image variable

Stimulsoft Reports.JS discussion
Post Reply
hra1368
Posts: 1
Joined: Fri Nov 19, 2021 9:28 pm

define image variable

Post 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();
Max Shamanov
Posts: 767
Joined: Tue Sep 07, 2021 10:11 am

Re: define image variable

Post 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.
Post Reply