cancel
Showing results for 
Search instead for 
Did you mean: 

How to add "GROUP BY"

Former Member
0 Kudos

Post Author: roman.keller

CA Forum: Data Connectivity and SQL

How can i add a "group by" statment to the sql in Crystal Reports?The Problem is that i get multiple unique rows. I checked the get unique rows but i still get multiple rows. If i run the sql direct on the database, the "DISTINCT" and "GROUP BY" works perfect. I tryed to find a solution in the manual and forum. So i hope someone can halp me.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Post Author: roman.keller

CA Forum: Data Connectivity and SQL

Thank you for the quik reply.I created the groups i need (actually 2 groups). the problem is, that in the details still every record is displayed. i do some mathematic functions on all the rows. At the moment i get 30 of the same rows. its not really a great performance. Is there a way to fix that in the select statement?

Former Member
0 Kudos

Post Author: ecathell

CA Forum: Data Connectivity and SQL

you have to actually create a group in the report based on the criteria that you want to group by.

if you want to group by X you have to create a group in the report that uses X as the group item. Hopefully this is clear enough.