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!

Building a list from 4 different fields

Status
Not open for further replies.

bettaa

IS-IT--Management
Feb 28, 2006
20
0
0
US
I am trying to build a list of 4 numbers that may or may not be avaliable in a certian table. The problem is when I use it with another simular formula it makes duplicat entries for the main formula.

here is the formula in question (CR5):

stringvar ICD:=
if not IsNull({Service.ICD1}) then
ICD:=ICD+{Service.ICD1};
if not IsNull({Service.ICD2}) then
ICD:=ICD+","+{Service.ICD2};
if not IsNull({Service.ICD3}) then
ICD:=ICD+","+{Service.ICD3};
if not IsNull({Service.ICD4}) then
ICD:=ICD+","+{Service.ICD4};
ICD

And here is the Main formula (this one works great when the other one is not present in the report):

if IsNull({Appointment.FirstName}) then //PRINT LAST NAME ONLY IF FIRST IS BLANK
{Appointment.LastName}
else if IsNull({Appointment.LastName}) then //PRINT FIRST NAME ONLY IF LAST IS BLANK
{Appointment.FirstName}
else //PRINT BOTH FIRST AND LAST NAME
{Appointment.LastName} + ", " + {Appointment.FirstName}
 
Please show some sample data at the detail level that includes all fields referenced in the formulas, and then show how you would want to display the same data.

-LB
 
basically it should look like:
name code
Smith, John 1234,5678,8674,8346
Doe, Jane 8674,8273
Johnson, Bill
Gretzky, Wayne 9999

Optimally that's what should happen, it should list the names and those codes if they're avaliable.
 
But where's the sample detail level data, i.e., what does the data look like now?

-LB
 
name code
Smith, John
Smith, John
Smith, John
Smith, John
Smith, John
Smith, John
Smith, John
Smith, John
Smith, John
Smith, John
Doe, Jane
Doe, Jane
Doe, Jane
Doe, Jane
Doe, Jane
Doe, Jane
Doe, Jane
Doe, Jane
and so on and so forth it turns out very ugly and the codes don't appear. Mind you that without the formula in question in the report the names come out quite nicely...
 
Why aren't the codes appearing? Place the fields on the detail section--not your formula--that is what we need to see.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top