Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Formula for Record counts Post Reply Post New Topic
Author Message
nitrotech
Groupie
Groupie


Joined: 30 Jan 2013
Location: United States
Online Status: Offline
Posts: 42
Quote nitrotech Replybullet Topic: Formula for Record counts
    Posted: 27 Nov 2013 at 11:27am
How would one beable to get a record count to put in a formula
 
For example I Have a line that gives me my data and for every line I need a count of 1 and beable to use that in a formula?
 
 
Thanks
IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet Posted: 28 Nov 2013 at 2:02am
Hi
 
You want 1 to be displayed always for all details ?
 
like :
1
1
1
1
1..
 
or you want a serial number :
1
2
3
4
5
6..
 
If you want only 1 to be displayed then.. say
 
If not(isnull(fileld}) then 1 else 0  // make sure the field is not null
 
To get serial number you will have to write a manual running total and this formula can be used in other formulas but can't be summarised.
 
 
 
 
Thanks,
Sastry
IP IP Logged
nitrotech
Groupie
Groupie


Joined: 30 Jan 2013
Location: United States
Online Status: Offline
Posts: 42
Quote nitrotech Replybullet Posted: 02 Dec 2013 at 9:46am
What I need is a total count of all the records in the body
 
So if I have 5 lines  I need a 5
or if there are 50 lines I need that to say 50.
 
Thanks
IP IP Logged
nitrotech
Groupie
Groupie


Joined: 30 Jan 2013
Location: United States
Online Status: Offline
Posts: 42
Quote nitrotech Replybullet Posted: 02 Dec 2013 at 10:54am
Thanks for the info but this is waht I was looking for sorry If I was not clear on what I wanted.
 
What I need is a total count of all the records in the body
So if I have 5 lines I need a 5
or if there are 50 lines I need that to say 50.
Thanks
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 02 Dec 2013 at 11:40am
I will assume a 'body' is a group.
count({table.field}, {table.groupfield})
will give you any count of rows in a group assuming that the field you use exists for each row.
IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet Posted: 02 Dec 2013 at 6:56pm
Hi
 
If you have group then use DBlank formula else right click on any string field and go in INSERT SUMMARY option and select count as you aggregate and click on OK to insert record count in grand total.
 
 
Thanks,
Sastry
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.