Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to group records by part of a report field.

I am using SAP Crystal Reports 2011 version 14.0.3.613 RTM.

I have a report where I need to insert a group based on the first 9 characters of the Serial Number.  For each group, I need to sum up the Quantity and Net Weight fields.

For example,  Let's say I have the following:

Serial Number               Quantity          Net Weight

-------------------------------------------------------------------------------------

M12345678B1               275                    14.3

M12345678B6               155                    45.9

M12345678BS1             90                      56.1

M09876543B2               111                    23.0

M09876543B3               78                      12.5

M09876543B4               105                    123.4


This needs to look like the following:

Serial Number               Quantity          Net Weight

-------------------------------------------------------------------------------------

M12345678B1               275                    14.3

M12345678B6               155                    45.9

M12345678BS1             90                      56.1

                    Total:       520                    116.3

M09876543B2               111                    23.0

M09876543B3               78                      12.5

M09876543B4               105                    123.4

                    Total:       294                    158.9


How to do this in SAP Crystal Reports?


Sincerely,

Keith Jackson

Tags:
replied

Hi Keith,

1) Create a formula with this code:

Left({Serial_Number_Field},9)

2) Insert a group off of this formula field

3) Go to the Insert Summary Options > Choose the Qty field as the Field to summarize > Under 'Summary Location', choose 'Group #1'

4) Repeat step 3 for Net Weight

5) Suppress the Group Header if you don't need it to display.

-Abhilash

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question