Quantcast
Channel: Adobe Community : Popular Discussions - Reporting
Viewing all articles
Browse latest Browse all 38309

Problem with IIf in Report Builder

$
0
0
Hi,

This is my first try with Report Builder and I have managed to create some custom labels however I would like to hide any empty address fields. At the moment if any of the address fields are empty I get an empty line terminated by the comma that I have added to each line. Here is my label expression:

query.Title & " " & query.Initials & " " & query.Surname & Chr(13) & Chr(10) &
Trim(query.Address1) & "," & Chr(13) & Chr(10)&
IIf(Trim(query.Address2) is '',DE(""),DE(Trim(query.Address2)& "," & Chr(13) & Chr(10) &)
Trim(query.Address3) & "," & Chr(13) & Chr(10)& Trim(query.Town) & "," & Chr(13) & Chr(10) &
Trim(query.County) & "," & Chr(13) & Chr(10)&
Trim(query.PostCode)

This is line causing problems:

IIf(Trim(query.Address2) is '',DE(""),DE(Trim(query.Address2)& "," & Chr(13) & Chr(10) &)

In expression builder how can I get this to work? I have tried various combinations of quotes and # symbols, with and without using DE() but they all throw the same error:

"...is not a valid ColdFusion expression"

I am sure it something simple I am missing.

Cheers,

Dave

Viewing all articles
Browse latest Browse all 38309

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>