Adobe Dreamweaver Forums



Last 10 THreads :         Re: Photoshop CS4 is a disaster (Last Post : John Joslin - Replies : 0 - Views : 1 )           »          Re: Optimal Scratch Disk (Last Post : PMueller@adobeforums.com - Replies : 0 - Views : 1 )           »          strange bugs (Last Post : Daniel - Replies : 4 - Views : 5 )           »          Re: Photoshop CS4 is a disaster (Last Post : Mike_Sargent@adobeforums.com - Replies : 0 - Views : 1 )           »          Can't add action to button? (Last Post : Petteri_P - Replies : 1 - Views : 4 )           »          Removing browser referesh capabilities (Last Post : amthekkel - Replies : 6 - Views : 7 )           »          Web friendly URLs (Last Post : Outside5.com - Replies : 1 - Views : 2 )           »          CSH Calls for Merged CHM's (Last Post : Colum McAndrew - Replies : 2 - Views : 3 )           »          Sessions and subdomains (Last Post : Mack - Replies : 2 - Views : 3 )           »          button event with transparency (Last Post : Kruc3fix - Replies : 1 - Views : 2 )           »         


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



 



User Info Statistics
Go Back   Adobe Dreamweaver Forums > Macromedia Software > Cold Fusion > Reporting
 
Tags:



Reply
  #1 (permalink)  
Old 10-01-2008, 03:19 PM
Dave Phipps
 
Posts: n/a
Diggs:
Default 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



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 10-01-2008, 03:19 PM
cpeterson
 
Posts: n/a
Diggs:
Default 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("").

Reply With Quote
  #3 (permalink)  
Old 10-01-2008, 03:19 PM
cpeterson
 
Posts: n/a
Diggs:
Default 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("").

Reply With Quote


  #4 (permalink)  
Old 10-31-2008, 06:41 PM
cpeterson
 
Posts: n/a
Diggs:
Default 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("").

Reply With Quote
  #5 (permalink)  
Old 11-02-2008, 01:54 AM
cpeterson
 
Posts: n/a
Diggs:
Default 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("").

Reply With Quote
  #6 (permalink)  
Old 11-03-2008, 04:51 AM
cpeterson
 
Posts: n/a
Diggs:
Default 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("").

Reply With Quote


  #7 (permalink)  
Old 11-04-2008, 09:17 AM
cpeterson
 
Posts: n/a
Diggs:
Default 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("").

Reply With Quote
  #8 (permalink)  
Old 11-04-2008, 09:22 AM
cpeterson
 
Posts: n/a
Diggs:
Default 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("").

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 10:30 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk