Tips and Tricks
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Tips and Tricks
Message Icon Topic: Date comparison probs Post Reply Post New Topic
Author Message
markh
Newbie
Newbie
Avatar

Joined: 28 Apr 2008
Location: Australia
Online Status: Offline
Posts: 2
Quote markh Replybullet Topic: Date comparison probs
    Posted: 28 Apr 2008 at 12:12am
Hi Everyone,
Real newbie at CR & i am trying to create a report that has two date ranges on the same table data that i want to create a sales report for.
I want to compare [example] feb 2007 with feb 2008 sales figures for category,qty , $value etc but i want to make the date ranges by submitting parameters.
All i get is thousands of results because the join is multiplying the data.

IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 28 Apr 2008 at 4:20pm
The reason why you are getting thousands of records is probably because you are joining the same table to itself (so that both date ranges can be compared) and this produces a 'cartesian product' (which means you get thousands of duplicate records). Have you looked into using a crosstab object? This summarizes the data for you and puts the data side by side in two columns. You can also tell it to group by year. This might be what you need.

I cover everything you need to know about cross-tab reports in my Encyclopedia book. You can find out more about my books at Amazon.com or reading the Crystal Reports eBooks online.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.039 seconds.