| Mission Statement |
DreamWeaverForum.infois an online Community of web developers joining together to better their field, share problems and solutions as well as promoting their cause. We strive to bring you the best information, tools, downloads and news to support your work and companys efforts working in web development. With our favorite tool "Dreamweaver" and the tools and information we bring you, You should be in a great postion to better your skills and show the world your work. Come back often, Stay late we have many new things coming your way. Wish you all the best in 2009
information.. |
|
|
|
|
|
|
 |
 |
|
|
|
 |

10-01-2008, 03:19 PM
|
|
|
Problem with IIf in Report Builder
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
|

10-01-2008, 03:19 PM
|
|
|
Re: Problem with IIf in Report Builder
This is how I was able to get it to work correctly on mine:
IIf(query.Address2 NEQ '', DE(query.Address2 & Chr(13) & Chr(10)),
DE(query.Address2))
Even though Address 2 is blank, it doesn't seem to like DE("").
|

10-01-2008, 03:19 PM
|
|
|
Re: Problem with IIf in Report Builder
This is how I was able to get it to work correctly on mine:
IIf(query.Address2 NEQ '', DE(query.Address2 & Chr(13) & Chr(10)),
DE(query.Address2))
Even though Address 2 is blank, it doesn't seem to like DE("").
|

10-31-2008, 06:41 PM
|
|
|
Re: Problem with IIf in Report Builder
This is how I was able to get it to work correctly on mine:
IIf(query.Address2 NEQ '', DE(query.Address2 & Chr(13) & Chr(10)),
DE(query.Address2))
Even though Address 2 is blank, it doesn't seem to like DE("").
|

11-02-2008, 01:54 AM
|
|
|
Re: Problem with IIf in Report Builder
This is how I was able to get it to work correctly on mine:
IIf(query.Address2 NEQ '', DE(query.Address2 & Chr(13) & Chr(10)),
DE(query.Address2))
Even though Address 2 is blank, it doesn't seem to like DE("").
|

11-03-2008, 04:51 AM
|
|
|
Re: Problem with IIf in Report Builder
This is how I was able to get it to work correctly on mine:
IIf(query.Address2 NEQ '', DE(query.Address2 & Chr(13) & Chr(10)),
DE(query.Address2))
Even though Address 2 is blank, it doesn't seem to like DE("").
|

11-04-2008, 09:17 AM
|
|
|
Re: Problem with IIf in Report Builder
This is how I was able to get it to work correctly on mine:
IIf(query.Address2 NEQ '', DE(query.Address2 & Chr(13) & Chr(10)),
DE(query.Address2))
Even though Address 2 is blank, it doesn't seem to like DE("").
|

11-04-2008, 09:22 AM
|
|
|
Re: Problem with IIf in Report Builder
This is how I was able to get it to work correctly on mine:
IIf(query.Address2 NEQ '', DE(query.Address2 & Chr(13) & Chr(10)),
DE(query.Address2))
Even though Address 2 is blank, it doesn't seem to like DE("").
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|