Solved

How to show record count in report header?

Posted on 2003-12-04
6
579 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
  • 2
  • 2
  • 2
6 Comments
 
LVL 42

Accepted Solution

by:
frodoman earned 250 total points
Comment Utility
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
Comment Utility
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_
Comment Utility


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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 7

Author Comment

by:janmarini
Comment Utility
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_
Comment Utility



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
Comment Utility
Thank you!
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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 seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

743 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now