Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: select first row Post Reply Post New Topic
<< Prev  Page  of 2
Author Message
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 21 Sep 2009 at 10:31am

Not exactly. Part of this is a bit of a language issue with the word displayed. Often people refer to displayed as meaning "not hidden". There is a big difference because rows or items that you hide (suppress) are still in the report and are still included in SUms, counts, averages, etc. ,they are just not displayed. With the group selection the data is more akin to removed from the the report and no longer end up in any calculations (sums, counts etc.). To further confuse on this if you are grouping and do the selection on that a group minimum you will still see the removed groups in the group tree.

That being said. Say you 3 tables all with one row for the field you want to join on. Say you do a minimum() on table 1 to get it to one row out of all of the rows. Now you take table 1 and join it to table 2 and you still get one row. Now you add table 3 and join table 1 to it. now you have 2 rows.
if you had had joined table 1 to table 2 and table 2 to table 3 you would have 1 row of data.
Is this making sense?
IP IP Logged
elie234
Groupie
Groupie


Joined: 21 Aug 2009
Online Status: Offline
Posts: 68
Quote elie234 Replybullet Posted: 21 Sep 2009 at 10:36am
I understand your first point about the difference between something being suppressed and not being calculated in the report. Don't think I understand your second point. Why is there a difference in the outcome of linking table 1 to table 2 and linking table 1 to table 3?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 21 Sep 2009 at 11:11am
Sorry, I am re-reading my example and realize I messed it up. I think I retyped it like 6 times trying to decide on a way to explain it and lost which example I ended up trying to use Wacko
 
Joins can get confusing quickly (obviously) and when you are trying to control that many tables coming in it can get out of hand quickly.
basically as soon as one table introduces more than one matching row your returned values can get expanded hugely especially if the tables are not linked sequentially but back to the same source table.
You can create circumstances that allow you to filter the table to a single row and then join that filtered data to limit the rows.
Sorry I can't explain better.Maybe some else can jump in and help better here.
Unless one can see your tables and sample data and how the tbales are joined it is hard to figure out where to apply the fix.
 
IP IP Logged
elie234
Groupie
Groupie


Joined: 21 Aug 2009
Online Status: Offline
Posts: 68
Quote elie234 Replybullet Posted: 21 Sep 2009 at 11:16am
I see. Thanks for all your help.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 21 Sep 2009 at 11:20am

Another trick would be to add in one tables to your report one at a time and see if which is causing your dupes. Make sure to add a feild from the table to the report to "activate the link".

Or don't get rid of them, just hide them in report.
NEXT() and PREVIOUS() are great for that.
You can also use them in gettting your values.
Or use Running Totals.
Sometimes it is easier to do that.
If you have a set of data int he report that has dupes post that sample data and we can help show you how to conditianlly suppress and conditionally count or sum.
 


Edited by DBlank - 21 Sep 2009 at 11:21am
IP IP Logged
<< Prev  Page  of 2
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