Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: group by of SQL in Crystal report Post Reply Post New Topic
Author Message
luarit
Newbie
Newbie


Joined: 22 Aug 2011
Location: Spain
Online Status: Offline
Posts: 6
Quote luarit Replybullet Topic: group by of SQL in Crystal report
     Posted: 23 Aug 2011 at 3:24am
Hello,
 
How could I make a group by in Crystal reports. I need it to make a max of a group with same values. The problem that I have is duplicated records with same values.
 
I need that in show SQL query get "group by", any idea?
IP IP Logged
sharona
Senior Member
Senior Member
Avatar

Joined: 16 Oct 2008
Location: United States
Online Status: Offline
Posts: 255
Quote sharona Replybullet Posted: 23 Aug 2011 at 3:51am

is this the same as the previous posted question?

to create a group
click on the field you want to group by
right click
insert group
 
duplicate records are caused by joins, but to get rid of the duplicate records if you create a group and place the field in the group it will return the 1st unique value for the group.
 
 I need it to make a max of a group with same values?????
 
I need that in show SQL query get "group by", any idea????
 
can you be more specific, it is easier to help you.
 
 
sharona
IP IP Logged
luarit
Newbie
Newbie


Joined: 22 Aug 2011
Location: Spain
Online Status: Offline
Posts: 6
Quote luarit Replybullet Posted: 23 Aug 2011 at 4:20am
If I click on a "Field explorer" the table that I want to group by, I have only this options:
 
Insert to report
Browse data
Data expert
Set Datasource Location...*
Log on or Off server
Find in formulas
Show Field type
Refresh
 
I dont find insert group, the only way
 
Yes, I need to make a max of a group with same values
 
The las question I mean that if I click Database tap on top, then Show SQL Qery...I have the query that Crystal report has created automatically, but I have not got to see group by...
 
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 23 Aug 2011 at 4:24am
You have a couple of options.
 
1.  In Report Options, turn on "Use Index or Server for Speed" and "Perform Grouping on Server"
 
2.  Use a Command (SQL Select statement)  to pull the data for your report instead of connecting to individual tables.
 
-Dell
IP IP Logged
sharona
Senior Member
Senior Member
Avatar

Joined: 16 Oct 2008
Location: United States
Online Status: Offline
Posts: 255
Quote sharona Replybullet Posted: 23 Aug 2011 at 5:28am
okay,
you can create a group a few ways
on the menu ribbon
go to INSERT
GROUP
select the  field.
it will insert a group into the report
 
when you say you need to need to make a max of a group with same values
you need to group by a number which will be a maximum number of a field?
sharona
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum