Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Count Specific Words in Field Post Reply Post New Topic
<< Prev Page  of 2
Author Message
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Apr 2009 at 6:11am
Lets fix the formula then get the RT after that.
Does the string have any variation from the two items in the formula? Like replacing an actual user name for " user" or adding items at the end like john suggested?
And which version did you use?
IP IP Logged
JohnT
Groupie
Groupie
Avatar

Joined: 20 Jan 2008
Online Status: Offline
Posts: 92
Quote JohnT Replybullet Posted: 17 Apr 2009 at 11:52am
Dblank gave you the formula to use.  Why don't you try dragging that field to your detail line to see if the field is correctly getting set to -1, 0, or 1.  That might help you find the problem.  This field must be set correctly before your counts will be accurate.

Edited by JohnT - 17 Apr 2009 at 11:52am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Apr 2009 at 1:51pm
try this for the formula...
if instr({table.logintextfield},"logged in")>0 then 1 else
if instr({table.logintextfield},"logged off")>0 then -1 else 0
 
For your Running Total:
Right click on Running total and select NEW
Name it "LogCounter"
Field to summarize is : your formula field from above
Type of summary: SUM
Evaluate : for each record
Reset: Never
 
Place this on your details row and assuming the formula is fixed you should see it sum incrementally.
For a final total after the last record do insert summary as a SUM on the formula field and palce it in the report footer or just the RT field in the footer (as well as the details).
 
 
IP IP Logged
<< Prev Page  of 2
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.