Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding a null field to a group name

Status
Not open for further replies.

yogurt21

Technical User
Dec 11, 2007
6
US
I have a program that makes the customer name into the group name and then I use the detail lines after that. Recently when I tried to run the report I noticed that if there was no title (which is a code linked to another database to get the actual text) so that it couldn't find a link it would erase the entire line of the group name leaving it blank. I went in and created a workaround

if Donor.info.title ='' then
donor.info.last+", "+donor.info.first
else
donor.info.last+", "+titles.title+" "+donor.info.first

(titles.title is linked to donor.info.title so when donor.info.title is blank it is crashing the line without the if) but I have many reports that have this type of group name and do not want to goto all of them and add this in. (Especially since I didn't design the reports and I am only working on them now) any Ideas would be great
thanx
Yosef
 
//Check if null or 'blank' and return accordingly.
if isnull(Donor.info.title) or trim(Donor.info.title)like '' then donor.info.last + ", " + donor.info.first else
donor.info.last + ", " + titles.title + " " + donor.info.first

Try this formula in place of your current and give a couple of samples of example data.

'J
 
Just noticed the alternate table for title also - Why do you use a different datasource for the title in this section?

Surely it would make more sense to perform the null check on the relevant field?

//Check if null or 'blank' and return accordingly.
if isnull(titles.title) or trim(titles.title)like '' then donor.info.last + ", " + donor.info.first else
donor.info.last + ", " + titles.title + " " + donor.info.first

It seems a little confusing as currently explained - Sample data and crystal version info would assist.

'J
 
I am working with someone elses database how they set it up is not my fault. Iagree that I should check on the relevant data not hte follow thru
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top