Question : How to Get Grouping Formula to Display Same Record More than Once When Meets Criterion

Hello Experts,

I have prepared a Crystal Report that uses a grouping field to display Case records.  If a Case meets the criterion for more than one category, is there a way to structure the grouping formula so the Case will display more than once - so it displays in each group where it meets the criterion?  For instance, a domestic violence Case might also meet the criterion of a rape case.  Currently, each Case will only show up a single time - in one group.

Thank you for your help on this one.
~Chopp

Here is my grouping formula:

if {IBROffenseCodes.Category} = "Arson"  
then "ARSON" else

if {IBROffenseCodes.Description} =  "Forcible Rape"
then "RAPE" else

if ({CASD_SpecialStudyCodes.Description} = "Hate Crime" or
{OffenseHateBiasCodes.Description} like ["anti*","Unknown (Offenders Motivation Not Known)"])
then "HATE CRIME" else
 
if {IBROffenseCodes.Category} = "HOMICIDE OFFENSES"
then "HOMICIDE" else

if {CASD_SpecialStudyCodes.Description} like "DV*"
then "DOMESTIC VIOLENCE  in  SPECIAL STUDIES" else

{OffenseCodes.CodeSection}

Answer : How to Get Grouping Formula to Display Same Record More than Once When Meets Criterion

In Crystal, using the grouping features, I don't believe there is. Your best option might be to have the groups in the main report then use a subreport to display all records relating to that group (which would then allow you to show the same record in different groups).

There is one other workaround i can think of but it's pretty nasty. How many groups do you have and are they likely to change?

You could also achieve the same result in SQL returning the "duplicate" records. Are the groups defined in SQL?

L
Random Solutions  
 
programming4us programming4us