SAP Knowledge Base Article - Public

1290656 - Conditional Grouping and sub grouping

Symptom

Need to show the main group as sub group and sub group as a main group depending on the parameter selected.

Reproducing the Issue

1.Create a report with a parameter.                               
2.When we select "DEPT" need to show the data in crosstab in which we has inserted a group on DEPT field as a main group and CLIENT as sub group.                                                                                                                        
3.But when we select the parameter as SUMMARY then need to show the data for each client. Since same client exist for two different departments the same client data is broken into two and showing in different pages.

4.Need to show the client data together and also based on client type field need to insert summary.                   

Resolution

1) Removed all the groups in the report                                                                                             
2) Created a new formula like                                                                                                       
                                                                                                                                   
Whilereadingrecords;                                                                                                                
If {?Parameter}=”DEPT” then “” else {client type field}                                                                             
                                                                                                                                   
3) Insert a group on this formula as main group                                                                                     
4) Write the suppress condition for this group header section like                                                                  
{?Parameter}=”DEPT”                                                                                                                 
                                                                                                                                   
5) Create another formula like                                                                                                      
                                                                                                                                   
If {?Parameter}=”DEPT” then {dept field} else {client type field}                                                                   
                                                                                                                                   
6) Insert this formula as a sub group and place the crosstab                                                                        
                                                                                                                                   
Now when you select “DEPT” the crosstab will show the data department wise and when you select “Summary” the crosstab will show the client data for each client

Keywords

KBA , BI-RA-CR , Crystal Reports designer or BusinessViews Manager , Problem

Product

SAP Crystal Reports XI R2