?
Solved

How to show record count in report header?

Posted on 2003-12-04
6
Medium Priority
?
587 Views
Last Modified: 2010-05-18

I need to show the total number of records on the report header.  I tried

WhilePrintingRecords;
NumberVar RunningCount;
NumberCount

but it always returns 1.

How do I do this?

Thanks
0
Comment
Question by:janmarini
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
6 Comments
 
LVL 42

Accepted Solution

by:
frodoman earned 1000 total points
ID: 9876035
Just insert a grand total on one of your columns, but set it to "count" instead of "sum".  Then move the grand total from the report footer to the report header.
0
 
LVL 42

Expert Comment

by:frodoman
ID: 9876050
If you need instructions:

Click on a field in the detail section to select it.

Click Insert -> Grand Total.

Default in dropdown will be "SUM" - change this by selecting "COUNT"

The count field will be placed in the RF by default but you can drag & drop it on the RH.
0
 
LVL 22

Expert Comment

by:_TAD_
ID: 9877990


The best solution (in my opinion) is provided above by frodoman.


However, there are some instances when you want to put conditions on your count, but you don't necessarily want group by that condition.

The way around this is to create three formulas

formula1  init_count:  // gets placed on the level you want to reset your count to 0
WhilePrintingRecords;
Shared NumberVar count := 0;
count;

formula2 inc_count: // gets placed usually in the details section, but not always
WhilePrintingRecords;
Shared NumberVar count;
If (<condition>) then
     count := count + 1
else
     count;

count;


formula3 disp_count: // place wherever you want to see the final value
WhilePrintingRecords;
Shared NumberVar count;
count;

0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 7

Author Comment

by:janmarini
ID: 9878214
ummm... Kind of new here and I am not sure how to split points.  Both of your answers are great, and helped me out a lot.  I wasn't able to move the Grand Total Field - but after I placed and suppressed the GT, I was able to reference it in a formula that I placed in the Report Header, and that worked perfectly.  And I appreciate the added info from Tad, will be usefull in the future - I'm sure.  LOL - been working with Crystal forever, and there is always so much to learn!  Since I don't have a lot of experience with this forum, please help me figure out how I can divvy up the points appropriately.

Thank you!
0
 
LVL 22

Expert Comment

by:_TAD_
ID: 9878283



Give Frodoman the points.



I didn't submit a comment for points... it was more of an FYI (just in case).

Frodoman provided the answer to the question you asked.  I believe awarding him full points would be the most fair route to go.
0
 
LVL 7

Author Comment

by:janmarini
ID: 9878685
Thank you!
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question