Page 1 of 1

Problem with Switch operator in Text ekenent

Posted: Mon Aug 06, 2018 12:52 pm
by VaDRo
Hi everybody.

I'm using Stimulsoft.Net 2015.1.
When I'm trying to set this formula into Text field in report -> I'm getting error when pressing "Check" button.
Statement under Text field is:

Code: Select all

{Switch((sq_getDriverRevenueReport.areaFromId==-1 && sq_getDriverRevenueReport.areaToId==-1), "", (sq_getDriverRevenueReport.areaFromId==sq_getDriverRevenueReport.areaToId), "")}
AreaFromId and areaToId has numeric type.
Error on Check button is:
There is no matching overloaded method for 'op_And2(Int32, Boolean)'
It looks funny, but limited condition works well:

Code: Select all

{Switch((sq_getDriverRevenueReport.areaFromId==-1 && sq_getDriverRevenueReport.areaToId==-1), "")}
What's going on? What is the right way to use Switch condition?

Re: Problem with Switch operator in Text ekenent

Posted: Thu Aug 09, 2018 8:29 pm
by Lech Kulikowski
Hello,

Please send us a sample report with test data which reproduces the issue for analysis.

Thank you.

Re: Problem with Switch operator in Text ekenent

Posted: Mon Aug 13, 2018 2:37 pm
by VaDRo
Lech Kulikowski wrote: Thu Aug 09, 2018 8:29 pm Hello,

Please send us a sample report with test data which reproduces the issue for analysis.

Thank you.
Please, give me any sample report with test data. Unfortunately I don't know how to embed test data inside report.
If you will send me any such sample report -> I will rebuild it with my sample formulas

Re: Problem with Switch operator in Text ekenent

Posted: Tue Aug 14, 2018 2:13 pm
by Lech Kulikowski
Hello,

You could send some data to XML file if you write next code in the BeforePrint event of a page:
[YourDataSourceName].DataTable.DataSet.WriteXml(@"e:\data.xml");
[YourDataSourceName].DataTable.DataSet.WriteXmlSchema(@"e:\data.xsd");

Thank you.