Sap Crystal Reports 2013 - How to group a set of fields

elm9999 used Ask the Experts™
Hi Experts,

I'm working with Visual Basic 2013, MySQL, Sap Crystal Reports and connection with ODBC, I already made a couple of reports successfully, but now I'm trying to make another report but I can't find a way to do it.

Table: temporal1

Key    Fecha              City                     Office             Docto_A     Docto_B    Docto_C      Total
0001      2016-03-15      Los Angeles     Sede               256             111             12                10,000.00
0002      2016-03-15      Los Angeles     Sede Mat       125             114             12                13,000.00
0003      2016-03-15      Los Angeles     Sede Vesp     130              87              12                 14,500.00
0004      2016-03-15      Los Angeles     CSR1               478             121            12                  9,200.00
0005      2016-03-15      Los Angeles     CSR2               201             67              12                  17,600.00
0006      2016-03-15      Los Angeles     CSR3               995             402            12                   4,500.00
0006      2016-03-15      Chicago            Sede               916             402            12                   4,500.00
0006      2016-03-15      Chicago            CSR1               985             402            12                   4,500.00
0006      2016-03-15      Houston           Sede               995             409            12                   4,500.00

As you see, I have six rows with City = Angeles and different office each one.

What I need is to to make a formula or a query in Formula Workshop Editor of Crystal Reports to show only one line per City on the report like this:

RME                                        Sedes                 CSR's           Total
Los Angeles                              859                 2,300                 3,159
Chicago                                  1,330                 1,399                 2,729
Houston                                 1,416                        0                 1,416

Sedes     is the sum of (Docto_a, Docto_B and Docto_C) of  (Sede + Sede Mat + Sede Vesp)
CSR's      is the sum of (Docto_a, Docto_B and Docto_C) of  (CSR1 + CSR2 + CSR3)
Total      is the sum of (Sedes + CSR's)

I hope you guys can help me on this report and Thank you so much in advance
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
lcohanDatabase Analyst

Please see explanation from:
 "How to Use Grouping in Crystal Reports

SAP Crystal Reports allows you to integrate the information stored in your various databases to create customized reports. The software’s grouping feature provides the additional flexibility many businesses need to meet their reporting needs. Separating your data into groups often helps you to focus the information you share with clients and staff, making the report more informative and easier to read.
Senior Consultant
Most Valuable Expert 2011
Top Expert 2013
This fairly easy.

Add a group to your report
Open the report
Select the field you want (CITY)
Right click the field in the detail section you want to summarize
Set the summary to SUM
Set to put the summary in each group footer
Click OK
Now you can drag the summary from the footer to the group header
Put the other common information in the group header
Hide the detail section



Sorry, I just return to code, thank you guys for your help.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial