erro when send query for variable

Stimulsoft Reports.JS discussion
Post Reply
eduardo12fox
Posts: 8
Joined: Fri Nov 22, 2019 9:20 pm

erro when send query for variable

Post by eduardo12fox »

hello guys,

I send my query for report as bellow

Code: Select all

var testeVea = "select * from cargo where 1=1 ";


		var report = new Stimulsoft.Report.StiReport();

        report.loadFile("reports/Report.mrt");
        report.dictionary.variables.list.find(x=>x.name == "querySql").val = testeVea;
       
 
Okay is done! But when I need put condition for string is bad look

Code: Select all


var testeVea = "select * from cargo where 1=1 and Descicao = 'teste' ";


		var report = new Stimulsoft.Report.StiReport();

        report.loadFile("reports/Report.mrt");
        report.dictionary.variables.list.find(x=>x.name == "querySql").val = testeVea;

when I put in my variable [testeVea] ==> ( and Descicao = 'teste' )

the query is stop and my report return blank.

How make query with filter in string???
Lech Kulikowski
Posts: 7308
Joined: Tue Mar 20, 2018 5:34 am

Re: erro when send query for variable

Post by Lech Kulikowski »

Hello,

Please send us a sample report with test data for analysis.

Thank you.
Post Reply