Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Split record in to 2 values Post Reply Post New Topic
Author Message
robbate
Newbie
Newbie
Avatar

Joined: 05 Apr 2010
Location: United Kingdom
Online Status: Offline
Posts: 2
Quote robbate Replybullet Topic: Split record in to 2 values
     Posted: 05 Apr 2010 at 11:56am
I have a dataset with the following columns
 
Initial Date
Initial Payment
Final Date
Final Payment
 
I need to group the payments by month. The problem arises when the Initial Date is in a different month to the Final Date.
 
How can I group the Initial Payment in to a different month from the Final Payment?
 
Thanks for your time.
IP IP Logged
chris
Newbie
Newbie


Joined: 02 Apr 2008
Location: United Kingdom
Online Status: Offline
Posts: 35
Quote chris Replybullet Posted: 06 Apr 2010 at 2:38am

I'm sure there is a simple way of doing this but as I'm currently writing a report with a Union query so I will suggest using this method.

Create a basic SQL command which selects just the Initial Date and Initial Payment from the table and then Union with another select statement that only picks Final Date and Final Payment. The fields could be renamed to be generic -  Date and payment for example.

You will then only have 2 fields to actually report on. Group by the Date field and choose the monthly option in group settings.

Hope that helps.
IP IP Logged
robbate
Newbie
Newbie
Avatar

Joined: 05 Apr 2010
Location: United Kingdom
Online Status: Offline
Posts: 2
Quote robbate Replybullet Posted: 06 Apr 2010 at 5:39am
Now that's a good idea. I also managed to do it by linking the tables together with 2 different fields that will never match with an outer join.
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