Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: If Statement help Post Reply Post New Topic
Author Message
eball218
Newbie
Newbie


Joined: 03 Apr 2008
Location: United States
Online Status: Offline
Posts: 2
Quote eball218 Replybullet Topic: If Statement help
     Posted: 03 Apr 2008 at 3:34pm

Looking to get some help with this report I am working on. Basically what I am trying to do is this, If IncdPers.TYPEOFACTIVITY = Incident Reporting Record and (DistinctCount ({In5basic.INCIDENTNUMBER}, {IncdPers.PERSONLOOKUPID})/DistinctCount ({In5basic.INCIDENTNUMBER}))*100 <= 10% then IncdPers.POINTS = 12.5 else IncdPers.POINTS = 0

I have tryed this many different ways and can not figure out how to make it work. any help would be great.
IP IP Logged
jon2ryhme
Newbie
Newbie


Joined: 03 Apr 2008
Location: United Kingdom
Online Status: Offline
Posts: 16
Quote jon2ryhme Replybullet Posted: 04 Apr 2008 at 2:41am

I think this would solve your problem, I have removed
IncdPers.POINTS

If {IncdPers.TYPEOFACTIVITY} = "Incident Reporting Record" and (DistinctCount ({In5basic.INCIDENTNUMBER}, {IncdPers.PERSONLOOKUPID}) % DistinctCount ({In5basic.INCIDENTNUMBER})) <= 10
then
     12.5
else
      10
IP IP Logged
eball218
Newbie
Newbie


Joined: 03 Apr 2008
Location: United States
Online Status: Offline
Posts: 2
Quote eball218 Replybullet Posted: 04 Apr 2008 at 5:30am
ok let me try and explain what i am looking to do here.
 
If the feild IncdPers.TYPEOFACTIVITY = Incident Reporting Record and the (DistinctCount ({In5basic.INCIDENTNUMBER}, {IncdPers.PERSONLOOKUPID})/DistinctCount ({In5basic.INCIDENTNUMBER}))*100 <= 10%
 
If both of these are true do this
 
than the feild {IncdPers.POINTS} will = 12.5
if not the feild {IncdPers.POINTS} will = 0
 
If both are not true then get sum of {IncdPers.POINTS}
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