Print Page | Close Window

Formula for Record counts

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=20258
Printed Date: 07 May 2024 at 7:10pm


Topic: Formula for Record counts
Posted By: nitrotech
Subject: Formula for Record counts
Date 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



Replies:
Posted By: Sastry
Date 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


Posted By: nitrotech
Date 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


Posted By: nitrotech
Date 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


Posted By: DBlank
Date 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.


Posted By: Sastry
Date 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



Print Page | Close Window