user1464855
user1464855

Reputation: 1

Grouping the Details in Crystal Reports

I am not much familiar with Crystal Reports. I facing one issue regarding the Detail fields in Crystal report.

Lets assume I have 5 fields in Details band.

Field a, b, c, d, e and the record set for the below fields will be as below

    A             B            C           D           E
   111            1            20         30          222
   111            1            21         31          222
   111            1            22         32          222
   111            2            11         11          222
   111            2            12         12          222
   111            2            13         13          222 

Now I need to display the details by grouping the field B and get the sum for C and D. And at the end my result should be as below

    A             B            C           D           E
   111            1            20          30         222
                               21          31          
                               22          32  
                            -------      ------
                     Total     63          93

   111            2            11          11         222
                               12          12 
                               13          13         
                            -------      ------
                     Total     36          36

Can some one help me how do I do this kind of Stuff.

Upvotes: 0

Views: 7992

Answers (2)

user1118704
user1118704

Reputation: 1

Urik is correct !

I just want to add some points as par the output user1464855 want.

  1. Add groups for two columns field A , field B . add these fields in the detail section also add the C, D and E in the section.
  2. To display Total you can use either of the following ways a. you can add new "Running Total field" for Columns C and Column D as Urik said. b. you can right click on the field "C" and select "Insert --> Summary" then select the field "C" select the "sum" and select the summary location "Group # 2" in "Insert Summary" dialoge box and click "OK".
  3. To avoid displaying the duplicate values (repeatation of values) select the field on the report e.g. field "E" right click on it Select "Format field" select "Common" Tab select check box "SUppress of Duplicated". you can repetae this step for other fields A, B.

I hope this will help you. kindly correct me if I am wrong !

Upvotes: 0

Urik
Urik

Reputation: 1728

You should use the group option (Insert --> Group) and select field B.

Then, use running total to sum the wanted fields. (View --> Field Explorer, then, on the field explorer right-click on 'Running Total Fields' --> New). Create the wanted running total using this expert and then drag into your report in order to show it.

Insert text boxes as needed for the caption of the group header and "Total".

Upvotes: 1

Related Questions