Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Record Selections with Summary sum Post Reply Post New Topic
Author Message
bryanrevelant
Newbie
Newbie


Joined: 03 Apr 2015
Online Status: Offline
Posts: 8
Quote bryanrevelant Replybullet Topic: Record Selections with Summary sum
    Posted: 05 May 2015 at 9:52am
Hello,

I am new at crystal reports, just sort learned some stuff. I created a crystal report, with a record selection parm. called date. The code below.

{?Date} IN {ABSTJ.start_date} TO (if isnull({ABSTJ.discharge_date}) THEN CurrentDateTime)

I now want a summary field counter after the record selection is run.

Formula field

if ({ABSTJ.Location} = "CC")

then 1
else 0

I then have a summary field that does a SUM. The problem here is that the summary is being executed after the selection record.
IP IP Logged
bryanrevelant
Newbie
Newbie


Joined: 03 Apr 2015
Online Status: Offline
Posts: 8
Quote bryanrevelant Replybullet Posted: 05 May 2015 at 10:03am
Actually, I figured it out that is not my problem. The problem is in SQL this gets me the correct results.
'2015-05-05' BETWEEN vs.start_date AND COALESCE(v.discharge_date,CURRENT_TIMESTAMP) SQL I get
21 records. IN Crystal I get 51.
In cyrstal this appears to now work right.

{?Date} IN {ABSTJ.start_date} TO (if isnull({ABSTJ.discharge_date}) THEN CurrentDateTime)
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.031 seconds.