Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: crystal report group by query Post Reply Post New Topic
Author Message
niranjana
Newbie
Newbie


Joined: 21 Nov 2007
Online Status: Offline
Posts: 15
Quote niranjana Replybullet Topic: crystal report group by query
     Posted: 08 Feb 2008 at 5:03am
anybody have an idea regarding how the query for GROUP BY been used in crystal reports.?
After selecting all database field including the group by clause
if we go to  'Show sql query' no group by statement is not showing.
i need the actual query used behind the group by statement in Crystal reports
 
 
IP IP Logged
Lugh
Senior Member
Senior Member
Avatar

Joined: 14 Nov 2007
Online Status: Offline
Posts: 377
Quote Lugh Replybullet Posted: 08 Feb 2008 at 5:28am
Crystal won't show you that anywhere, because Crystal doesn't actually add it to the SQL at all.  It executes the grouping in a slightly different way.  Similarly, it executes the selection criteria in a slightly different way.

The tricky bit to recreating the SQL with the grouping included is that the SQL requires you to summarize any fields that are not indicated in the GROUP BY clause.  So, in Crystal terms, you would only be returning the data from the group headers and footers, and nothing from the detail sections.


IP IP Logged
niranjana
Newbie
Newbie


Joined: 21 Nov 2007
Online Status: Offline
Posts: 15
Quote niranjana Replybullet Posted: 08 Feb 2008 at 8:51pm
Sir,
 
In the sql query we r getting only order by clause. not any group by.
As u said they r dealing the group by internally,
but the report generated as a result of order by clause.
In the select statement they are including the grouby field ...that is the only diff. from order by.
 
IP IP Logged
niranjana
Newbie
Newbie


Joined: 21 Nov 2007
Online Status: Offline
Posts: 15
Quote niranjana Replybullet Posted: 08 Feb 2008 at 8:59pm
Sir,
so in crystal reports while using group by they are not using aggregate function?
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