Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: records duplication Post Reply Post New Topic
Author Message
kirandb
Groupie
Groupie
Avatar

Joined: 10 Jun 2009
Location: United States
Online Status: Offline
Posts: 69
Quote kirandb Replybullet Topic: records duplication
     Posted: 07 Oct 2010 at 3:29am
When I run the report first time, my report asks for connection parameters and the report runs fine. When I reexecute the same report from the designer, the records duplicate itself. I mean it caches and the second time it doesnt asks me to enter the connection parameters. Is there any setting that needs to be taken care of in the designer which gives me the same report output no matter how many times i run the report without actually closing the designer.
 
Any Suggestions ?
Thanks,
Kiran
share your knowledge
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 07 Oct 2010 at 3:36am
are you saving the data with the report?
File>Report Options>Save Data With Reports should be set to false.
IP IP Logged
kirandb
Groupie
Groupie
Avatar

Joined: 10 Jun 2009
Location: United States
Online Status: Offline
Posts: 69
Quote kirandb Replybullet Posted: 07 Oct 2010 at 3:40am
save data option is unchecked.  any other options ?
 
Thanks,
Kiran
share your knowledge
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 07 Oct 2010 at 3:44am
weird.
i assume this is the same report that is duplicating the records as well.
So in the preview mode if you hit F5 after the initial preview it does not prmopt you to either use existing params or enter new ones, it just doubles the data?
 
IP IP Logged
kirandb
Groupie
Groupie
Avatar

Joined: 10 Jun 2009
Location: United States
Online Status: Offline
Posts: 69
Quote kirandb Replybullet Posted: 07 Oct 2010 at 3:47am
it prompts for existing or new params, but the weird thing is the data from the previous run is also stored. so if i run the report 10 times in the same session, i get 10 duplicates. my report is using a stored proc with return a refcursor. is it bcos of this. how do i close this cursor in the report if possible ?
 
Thanks,
kiran
share your knowledge
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 07 Oct 2010 at 3:55am
Never tried that but from your description i would agree with assessment of the cause. I am guessing here but i think it may require you to chaneg how you are closing the cursor in the procedure itself.
Maybe Hilfy will jump in on this one...?
You out there Hilfy?
IP IP Logged
kirandb
Groupie
Groupie
Avatar

Joined: 10 Jun 2009
Location: United States
Online Status: Offline
Posts: 69
Quote kirandb Replybullet Posted: 07 Oct 2010 at 7:18am
How can I eliminate the duplicates on the report side. So my detail frame fetches the same record as the previous row, just hid that row. How can i do this ?
 
Thanks,
Kiran
share your knowledge
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 07 Oct 2010 at 7:57am

under File> Report Options

do you have 'Select Distinct Records' checked as True?
IP IP Logged
kirandb
Groupie
Groupie
Avatar

Joined: 10 Jun 2009
Location: United States
Online Status: Offline
Posts: 69
Quote kirandb Replybullet Posted: 07 Oct 2010 at 8:34am
Yes...is there any way.  I tried going to Database menu but the "Select Distinct Records"  options is greyed out. how do i activate it ?
Thanks,
Kiran
 
share your knowledge
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 07 Oct 2010 at 8:41am
crud, just realized cannot be used for a sp
From Help...
Select Distinct Records command
This command is only available for ODBC, OLE DB, and SQL native drivers; it is not available for Stored Procedures. Note also that your server may automatically sort returned values if no sort is specified in Crystal Reports
 
if your data set has a unique identifier per row You can do a suppression using next(pkID)<>pkid in the detail section but it won't solve your real issue of the data duplicating.


Edited by DBlank - 07 Oct 2010 at 8:42am
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