Solved

How to show record count in report header?

Posted on 2003-12-04
6
585 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 250 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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

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…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

710 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