IIF return null if not true

Stimulsoft Reports.NET discussion
Post Reply
owainesau
Posts: 7
Joined: Wed Jul 19, 2017 1:02 am

IIF return null if not true

Post by owainesau »

Hi,

Im trying to print out some values to a label based on whether it has a value or not, using the following:

Code: Select all

JobID:
----------------------------------------------
{IIF(Length(UnservicedJobs1.jobid) > 0, UnservicedJobs1.jobid, " ")}
{IIF(Length(UnservicedJobs2.jobid) > 0, UnservicedJobs2.jobid, " ")}
{IIF(Length(UnservicedJobs3.jobid) > 0, UnservicedJobs3.jobid, " ")}
{IIF(Length(UnservicedJobs4.jobid) > 0, UnservicedJobs4.jobid, " ")}
{IIF(Length(UnservicedJobs5.jobid) > 0, UnservicedJobs5.jobid, " ")}
however if it evaluates to false, it prints a 0 not a blank space.

I have tried the same with a switch as well, same issue.

Thanks
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: IIF return null if not true

Post by Alex K. »

Hello,

Please try to set the HideZeros property for the Text component.

Thank you.
Post Reply