Problem with Switch operator in Text ekenent

Stimulsoft Reports.NET discussion
Post Reply
VaDRo
Posts: 25
Joined: Mon Dec 15, 2014 5:47 pm

Problem with Switch operator in Text ekenent

Post 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?
Lech Kulikowski
Posts: 6198
Joined: Tue Mar 20, 2018 5:34 am

Re: Problem with Switch operator in Text ekenent

Post by Lech Kulikowski »

Hello,

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

Thank you.
VaDRo
Posts: 25
Joined: Mon Dec 15, 2014 5:47 pm

Re: Problem with Switch operator in Text ekenent

Post 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
Lech Kulikowski
Posts: 6198
Joined: Tue Mar 20, 2018 5:34 am

Re: Problem with Switch operator in Text ekenent

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