Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: Help Crystal Report on HP service manager Post Reply Post New Topic
Author Message
NEO_X
Newbie
Newbie
Avatar

Joined: 10 Sep 2012
Online Status: Offline
Posts: 7
Quote NEO_X Replybullet Topic: Help Crystal Report on HP service manager
    Posted: 16 Oct 2012 at 7:02pm
Hi all
I have problem with report on my system, I can't code formula to count number of Incident.
This is my Formula:

   if left (totext({ACTIVITYM1.DESCRIPTION}),35) = "Incident Status Change to Completed" then 1 else 0

but some records more than 1 desciption="Incident Status Change to Completed" -> count fail

plz help me resolve
thanks all


Edited by NEO_X - 16 Oct 2012 at 7:02pm
NEOLEO
IP IP Logged
NEO_X
Newbie
Newbie
Avatar

Joined: 10 Sep 2012
Online Status: Offline
Posts: 7
Quote NEO_X Replybullet Posted: 16 Oct 2012 at 10:27pm
everyone
plz help me!!!!!
NEOLEO
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 17 Oct 2012 at 6:38am
Neo_X,
 
Most of the folks who answer questions here are in the US. ALL of us are volunteers who answer questions when we have time.  Like any other all-volunteer forum, you cannot expect immediate answers.
 
Here's what I would try.  Change your formula to something like this (use the correct field name....)
 
if left (totext({ACTIVITYM1.DESCRIPTION}),35) = "Incident Status Change to Completed" then {ACTIVITYM1.INCIDENT_ID}
 
Then, instead of doing a sum, do a distinct count on the Incident_ID to get the number you're looking for.
 
-Dell


Edited by hilfy - 17 Oct 2012 at 6:39am
IP IP Logged
NEO_X
Newbie
Newbie
Avatar

Joined: 10 Sep 2012
Online Status: Offline
Posts: 7
Quote NEO_X Replybullet Posted: 22 Oct 2012 at 12:46am
Thank for help Hilfy
but your solution still error, because if that formula false -> else "". then "distinctcount" error
now i have idea, is create subreport but i don't know how to add "record selection" to rationalize
plz help me
thanks
NEOLEO
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 22 Oct 2012 at 3:24am
If you don't put an Else on the if statement, the else is null, which should not be counted.
 
-Dell
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.000 seconds.