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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Join() not working well with Arrays

Status
Not open for further replies.

Roni1

Programmer
Dec 4, 2001
36
US
I have the following Join() function:

Join( [if {?Parameter} = 'A' then 'Letter A', if {?Parameter} = 'B' then 'Letter B'], ', ')

But if {?Parameter} is only 'A' then I will get 'Letter A,'.

What do I need to do to only get 'Letter A' (without the ',')?

I have CR8.5 and MSSQL2000.

Any help is appreciated.

Ron
 
What are you trying to join? What else should be concateneated with either "Letter A" or "Letter B" ? Software Sales, Training and Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
Dgillz,

Let me add more detail to the problem.

It wouldn't be any problem to show on the report all the selections for a specific parameter just using the join() function like join({?Parameter},', '). If I have entered "A" and "B", it will show on the report "A, B", and that would have been correct.

The problem I am facing is because I am basing the parameter in a VALUE, and I need to show on the report their DESRCIPTION (e.g. VALUE "A", DESCRIPTION "Terminated").

My join() formula is like that:
join([if {?Parameter} = "A" then "Terminated",
if {?Parameter} = "B" then "Active"]),", ")

If I only select "A" ("Terminated"), the formula is showing "Terminated,".
It is showing all the commas because is an Array.
Please let me know if I did clarify the question for you.

Thanks,
Ron
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top