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!

multiple values in one row 1

Status
Not open for further replies.

nb4884

IS-IT--Management
Aug 2, 2010
141
US
Hi All,

My report is grouped by project ID.
There is also a field for Category - values as S,0,1,2,3,4,5,6,7
A project can have multiple values for category for ex: S, 0, 2, 5.

If I display Category in group footer it displays only one value 0.

Pls suggest me a formula to display all the values of category separated by comma.
I want to display this in group footer.

Thanks
 
Assuming that category is a string, use formulas like this:

//{@reset} in the group header for project ID:
whileprintingrecords;
stringvar x;
if not inrepeatedgroupheader then
x := "";

//{@accum} to be placed in the detail section and suppressed:
whileprintingrecords;
stringvar x := x + {table.category}+",";

//{@display} to be placed in the group footer:
whileprintingrecords;
stringvar x;
if len(x)>1 then
left(x,len(x)-1)

-LB
 
Thanks LB,

But the data doesnot display as unique.

I have another field in same section which is also multivalue (has about 8 values). I have set up a formula for that field to display only one record.

Now when i display the above 3 formulae, it mulitplies by 8 and displays S,0,2,5 pattern 8 times.

Please suggest how should I avoid the multiplication here.

Thanks
 
Thanks LB, the formulae worked. I created a sub report and works great
 
You don't need a subreport. Just change the accum formula to:

//{@accum} to be placed in the detail section and suppressed:
whileprintingrecords;
stringvar x;
if not({table.category} in x) then
x := x + {table.category}+",";

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top