cancel
Showing results for 
Search instead for 
Did you mean: 

How to get a total record count before grouping?

Former Member
0 Kudos

I need to group a report on a formula that does roughly the following:

[record count] / ( [total record count] / 20 )

What this acheives is to label each record with a number of 1 - 20 which I want to group on. Getting this figure is the easy part, what is not working is the fact that I cannot group from a formula that is calculated after grouping. I overcame a portion of this by using "Whilereadingrecords" (rather than "count", running totals, or while printing records) to acheive a record count.

I can't figure out how to get a total record count done before grouping. Is there a way to do this with "WhileReadingRecords"?? Is this even possible?

Thanks

John

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member292966
Active Contributor
0 Kudos

Hi John,

The order of how Crystal does things dictates the order of which features you can use. Crystal has a two pass method. In the first pass it does things like passing the query, grouping, summarizing. In the second pass it does formulas, formatting, etc.

Unfortunately Crystal does the Grouping before summarizing so what you want to do can't be done in Crystal. The best way to get around this to either create a SQL Command or view/stored procedure that will do the summarizing for you. Then in the report you can use it.

Hope this helps,

Brian