Link to home
Start Free TrialLog in
Avatar of Genius123
Genius123Flag for United States of America

asked on

Crystal Report detail

Hello,

In the detail of the sub report called CWProfiles, instead of having the value not repeat if duplicated, I want to show the quantity of the value.  So instead of showing T3_057-CB1 four times, I want it to say 4 @ T3_057-CB1.

BOM-mill-code-qty.rpt

Thanks for your help,
Joel
Avatar of Mike McCracken
Mike McCracken

Try this

Add a group on the field
Add a formula to the group header

CStr(Count({YourPartField},{YourPartField}),0))  + " @ " + {YourPartField}

Open in new window


mlmcc
Avatar of Genius123

ASKER

Thanks mlmcc.  This does work, however I can't do multiple columns in a group.  Any other ideas?
What do you mean?

What version of Crystal?

In the versions I have used you can extend the multiple columns to the group.

This is the subreport, does it have multiple columns?

mlmcc
I have version 14.  When in the section expert, it only allows me to do multiple columns within a detail, not a group.
When you set the detail to multiple columns the group then can be set to use multiple columns

mlmcc
Hmm, it's not letting me.  Is there anyway you can try it on my file I attached?  If you could get the multiple columns to show up, I think I can do the rest.
I can try but you didn't upload it

mlmcc
mlmcc,

 I assume that he was referring to the file attached to his first post.

 James
I actually found the grouping selection, but just can't get it to layout right.
I don't know about the multi-column option for the group (not details).  I've got an older version of CR that doesn't seem to have the multi-column option for groups.  But here's an addition to mlmcc's suggestion that might work.

 As he suggested, use a group on MIL_CODE and create a formula to produce your count string (eg. "4 @ T3_057-CB1").

 Suppress the MIL_CODE group header and footer.

 Replace the MillCodeWithBox formula in the detail section with the new formula (or change MillCodeWithBox to produce the count string).

 Go into the field format for the count formula in the detail section and set the "Suppress if Duplicated" option on the Common tab.

 So, you're replacing the old strings (eg. "___T3_057-CB1") with new strings (eg. "4 @ T3_057-CB1"), getting those in columns, and suppressing the duplicates (so instead of getting "4 @ T3_057-CB1" repeated 4 times, you only see it once).


 If I understand what you're trying to do, that seems to work.

 James
SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
James - Unfortunately that won't work since the new group will have only 1 column.

mlmcc
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hurray, that worked!  Thank you.  mlmcc had the first solution, but James's solution was easier for me to understand.  If you don't mind I'll just split the points.

Thanks again.
You're welcome.  Glad I could help.  If you happened to use my version of the report, don't forget to change the Round functions that I changed back to RoundUp.

 James