Joined: 21 Aug 2009
Online Status: Offline
Posts: 68
Posted: 21 Sep 2009 at 8:11am
I think min would work in this case, but when I try to do a formula for minumum of the field in select expert it says that must be evaluated later. Is there some other way to select based on minimum?
Joined: 21 Aug 2009
Online Status: Offline
Posts: 68
Posted: 21 Sep 2009 at 9:30am
Yes I am joining tables. This report consists of a bunch of different tables and subreports. It was displaying multiple records (8 when it should be 1). I have located that so far that without the table we are discussing I only get 4 records. So it is responsible for half of the duplication. For my purposes it is enough to select the first row in that table. I have been experimenting with just the table at hand in a blank test report with the group selection formula you recommended.
The weird thing is that in the test report it is now only displaying one detail row with the correct data for the minimum row but it is saying I still have two records. When I try the "real" report with this group selection formula I am still getting 8 records back.
Joined: 21 Aug 2009
Online Status: Offline
Posts: 68
Posted: 21 Sep 2009 at 9:33am
Maybe I should have been more clear as to what my problem is. I am getting ok data from this table. The problem is that I am getting multiple records from this table when I only need 1 and it is causing a bunch of other parts of the report to be duplicated. So I need the actual record selection of this table to be only 1 record. Does group selection formula only relate to what is displayed but not actual record selection?
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Posted: 21 Sep 2009 at 9:45am
Group Selection in Crystal is a little different than the Record selection process.
Not sure how to best explain it...Record selection filters data after it is read from the DataBase but before it ends up in the report. Group selection has to let the data into the report, then group it then discard/exclude it. Does that help explain?
Likely your duplication is occuring by the table joins.
If you cannot biuld a process outside of crystal to limit the data you can try and use the Command functionality to build a SQL statement to try and do it inside crystal or you can use conditioanl suppression options to hide duplicate data and forumla fields or Running Totals to consitionally count or sum your values.
Joined: 21 Aug 2009
Online Status: Offline
Posts: 68
Posted: 21 Sep 2009 at 9:58am
If I understand you correctly- in this example:
For field X
Record 1= 5
Record 2= 6
If I use a group selection formula for the min of field X then the report will display only 5 but will actually be returning two records. Is that correct?
If so then I will still be getting two records and all of the other tables this table is linked to will also return two records and display their data twice (which I assume is what you mean that the duplication is the result of table joins).
I guess I could try an SQL statement or conditional suppression but it will be more tedious.
Is there any way to select based on record number?
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