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

SAP BO

Status
Not open for further replies.

Spencer21128

Programmer
May 20, 2013
3
US
Hello All,

I am new to SAP Business Objects. I created a report, and using the Variable Editor, I am combining 4 columns into one column with a comma between each value. The problem I'm having is...where ever there is a null value, do not show the blank field and the comma.

This is what I have in the variable editor.

=If([Course Section Type 1] > "";[Course Section Type 1]+", "+[Course Section Type 2]+If([Course Section Type 3] > "";","+[Course Section Type 3];"")+", "+[Course Section Type 4])

This is what the crs_typ column look like.

DD,FR,
FR,GT,DG,
IU, ,

The bottom line is....If the last value is not blank then the comma should not be there.


Any help would be greatly appreciated.

 
Thanks blom0344, I understand what you were saying. I figured it out. At the report level, I created a variable editor and it worked. Below is the code:

=[Course Section Type 1] + If(IsNull([Course Section Type 2])) Then "" Else "," + [Course Section Type 2] + If(IsNull([Course Section Type 3])) Then "" Else "," +
[Course Section Type 3] + If(IsNull([Course Section Type 4])) Then "" Else "," + [Course Section Type 4]
 
Right, as you found out 3 - instead of 4 - is enough to tackle your predicament. Jolly Good!

Ties Blom

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top