Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Problem with some Grouping Post Reply Post New Topic
Author Message
vipulbhatia29
Newbie
Newbie


Joined: 08 May 2009
Location: India
Online Status: Offline
Posts: 10
Quote vipulbhatia29 Replybullet Topic: Problem with some Grouping
     Posted: 07 Jun 2009 at 10:41pm

Hi I have to group the data in my report on the basis of months in a particular year. Foreg. My groups should be like JANUARY 1999 , FEB 99, Mar 99 ------- DEC 99,--------- JAN 2009-----------DEC 2009. My Geroup is based on some Entry_dt column in the database. I'm grouping the report on the basis of entry_dt and in the group expert I have set  it on a monthly basis so the group looks good in the report. But there is one problem now, according to the client he wants the groups on those months also for which the data is not present and so he wants it as a group but under that group no data should be displayed
For instance if the database contains data such as 03/15/2009, 04/16/09 and so on etc. and there is no data present for the month of January and February there should be a group like

January 2009
Entry_dt Name AMOUNT

February 2009
Entry_dt Name AMOUNT

March 2009
Entry_dt   Name          AMOUNT
03/15/2009 Thomaes Scott $ 500

And so on

Now my report displays only the groups for which the dates are present in the ENTRY_DT column.
For Example


March 2009
Entry_dt      Name          AMOUNT
03/15/2009 Thomaes Scott $ 500

And January and February do not show up.

Please help me on this and Also the client wants the first group to start from the January corresponding to the Year(date) which is the earliest in the database. till the date which is the latest.

How to find the solution for this



Edited by vipulbhatia29 - 07 Jun 2009 at 10:43pm
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 08 Jun 2009 at 6:25am
You need a data source that has all of the dates as an option then you left join it to your current dataset and group on the date field from this new source that has all dates available.

Edited by DBlank - 08 Jun 2009 at 6:29am
IP IP Logged
vipulbhatia29
Newbie
Newbie


Joined: 08 May 2009
Location: India
Online Status: Offline
Posts: 10
Quote vipulbhatia29 Replybullet Posted: 08 Jun 2009 at 9:49pm

thanks a lot for the approach but i have already implemented this thing.

But the client would not prefer the addition of a separate table/view in the database.
the client wants this thing handled in the crystal reports itself and not touch the database. Please help me with the handling of this functionality in the crystal reports itself through some way.
 
Personally I could think of no alternative than to create a table/view and then outer join it with the existing table.
 
Please also reply if it is not possible to handle everything in the report. 
 


Edited by vipulbhatia29 - 09 Jun 2009 at 7:00am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 09 Jun 2009 at 7:01am
I would stick with the SQL approach. You will have more flexibility thre than trying to get this done in Crystal.
I have not had to do this (as yet) so I cannot give any real help on it but if you run into a snag you can re-post what you have so far. There are people here that will try to help you with it as needed.
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