Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: formula not outputting correctly Post Reply Post New Topic
Author Message
mpaddock
Newbie
Newbie


Joined: 21 Jan 2009
Location: United States
Online Status: Offline
Posts: 6
Quote mpaddock Replybullet Topic: formula not outputting correctly
    Posted: 24 Mar 2010 at 7:32am
Ok, I am trying to create a report that outputs an answer based on a condition of a field for a group. The formula only outputs correctly if the first record of the group matches the condition. I am using CR XI.
 
It is grouped on a formula with a specified order.
 
Here are my formulas:
Grouped on this formula called category:
if {Observations.Standard}="1.30.02.02.00.00.00"
or {Observations.Standard}="1.14.01.03.00.00.00"
or {Observations.Standard}="1.24.01.04.00.00.00"
or {Observations.Standard}="1.27.01.01.00.00.00"
or {Observations.Standard}="1.29.01.01.00.00.00"
then "OP" else
if {Observations.Standard}="2.05.01.02.00.00.00"
or {Observations.Standard}="2.08.01.01.00.00.00"
or {Observations.Standard}="2.20.01.01.00.00.00"
then "MS" else
if {Observations.Standard}="3.04.01.04.00.00.00"
then "CP" else
if {Observations.Standard}="5.10.01.02.00.00.00"
or {Observations.Standard}="5.14.01.02.00.00.00"
then "APS"
 
here is the conditional formula called score:
if field="(SERIOUS)" then True
 
I have placed {@score} in the Group Header.
 
If I leave the condition off this record {Observations.Standard}="1.30.02.02.00.00.00" (meaning the  then the whole group will come back False even though the 2nd-5th records match it.
 
Any help?


Edited by mpaddock - 24 Mar 2010 at 8:22am
IP IP Logged
Jyothi Yepuri
Senior Member
Senior Member


Joined: 11 May 2009
Location: Australia
Online Status: Offline
Posts: 127
Quote Jyothi Yepuri Replybullet Posted: 24 Mar 2010 at 2:39pm
whats this "field" in score formula?
database field?

Jyothi
IP IP Logged
mpaddock
Newbie
Newbie


Joined: 21 Jan 2009
Location: United States
Online Status: Offline
Posts: 6
Quote mpaddock Replybullet Posted: 24 Mar 2010 at 3:44pm
 field="(SERIOUS)"
field={Observations.Recommendations}
IP IP Logged
mpaddock
Newbie
Newbie


Joined: 21 Jan 2009
Location: United States
Online Status: Offline
Posts: 6
Quote mpaddock Replybullet Posted: 25 Mar 2010 at 3:06am
Ok. I figured this out (actually my co-worker who has no CR knowledge helped me out). The sort inside the  group was set to a specified order. Since the group was based on a formula anyway, I did not need the order since I just needed the output from the formula and it didn't matter what order it was. (horrible grammar, sorry). I changed the order for the group to ascending and voila! it worked.
 
 
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.016 seconds.