Generic IIF

Stimulsoft Reports.NET discussion
Post Reply
LukasT
Posts: 306
Joined: Mon May 03, 2010 2:50 am
Location: Czech Republic

Generic IIF

Post by LukasT »

Hello,
why is not IIF function generic? That is problem, because I can't use this for automatic conversion of our old expressions because of need of type casting...
Thank you...
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Generic IIF

Post by Jan »

Hello Lukas,

Can you explain this problem in more details?

Thank you.
LukasT
Posts: 306
Joined: Mon May 03, 2010 2:50 am
Location: Czech Republic

Generic IIF

Post by LukasT »

Hello Jan,
your function IIF has object params and return type object, but we need this generic... it means, if we put string params, function has to return string value, not only object...
For example: 1.1 == IIF(1==1, 1.0, 2.1) will return exception, that operator '==' cannot be applied to operands of type 'double' and 'object'...
Yes, solution is to do casting, but that is not elegant and not friendly for automatic generation of expresions, is it?
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Generic IIF

Post by Alex K. »

Hello,

We added overloads for the IIF function for the same types for friendly automatic generation of expressions.
Please check the latest build when it will be available.

Thank you.
LukasT
Posts: 306
Joined: Mon May 03, 2010 2:50 am
Location: Czech Republic

Generic IIF

Post by LukasT »

Hello Aleksey,
great job! I am looking forward to the next build ;-)
Thank you and have a nice day ;-)
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Generic IIF

Post by Alex K. »

Ok! Have a nice day too!!!
Post Reply