Create variable from code.

Stimulsoft Reports.JS discussion
Post Reply
fabien
Posts: 19
Joined: Thu Jul 15, 2021 9:07 am

Create variable from code.

Post by fabien » Tue Sep 14, 2021 3:45 pm

Hi,

i'm trying to create variable from code :

Code: Select all

var masquerlignesdetail = new Stimulsoft.Report.Dictionary.StiVariable();
masquerlignesdetail.name = "masquerlignesdetail";
masquerlignesdetail.alias = "masquerlignesdetail";
masquerlignesdetail.type = Stimulsoft.System.Int;
masquerlignesdetail.requestFromUser = false;
masquerlignesdetail.value = req.body.masquerlignesdetail;		// come from http post
var di = new Stimulsoft.Report.Dictionary.StiDialogInfo();
di.dateTimeType = "DateAndTime";
masquerlignesdetail.dialogInfo = di;
                        
report.dictionary.variables.add(masquerlignesdetail);   
but when i try to use it in a condition in band, it doesn't work (band is never disabled).

Code: Select all

dataBand.expressions.add(new Stimulsoft.Base.StiAppExpression('Enabled', "{masquerlignesdetail == 0}"));
where is my error ?

also, we don't see documentation for StiDialogInfo class in documentation : https://admin.stimulsoft.com/documentat ... lsoft.html

I also create a report from code : see liste.mrt in attached file.
but when i want to save this report, i've got a json parse error.
Where is my error ?

Thanks you,

Fabien.
Attachments
liste.mrt
(28.36 KiB) Downloaded 5 times
Lech Kulikowski
Posts: 3947
Joined: Tue Mar 20, 2018 5:34 am

Re: Create variable from code.

Post by Lech Kulikowski » Thu Sep 16, 2021 1:18 pm

Hello,

We need some additional time to investigate the issue, we will let you know about the result.

Thank you.
Post Reply