Solved

Find number of unsupressed records

Posted on 2004-10-06
11
248 Views
Last Modified: 2007-12-19
Hi
I am using crystal reports 10
I am using a formula field which is total_work
It is the sum of 2 database fields ( employee is table)
{@tot_wrk} := employee.regular_wrk + employee.overtime_wrk;

This tot_wrk has to be suppressed whenever its value is greater than 24;
I need to calculate the count of all the unsupressed tot_wrk
formula fields ; ie the total records which are displayed

The formula field is in a group header (G2)  and is again contained within another main group (G1). I could not do
Sum ({@tot_wrk} and this is giving me an error

So the count of all the {@tot_wrk} present in group G2 should be displayed in its super group G1

Can some one please help

Thanks
0
Comment
Question by:vsuripeddi
[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
  • +1
11 Comments
 
LVL 28

Expert Comment

by:bdreed35
ID: 12245531
Can you post the exact formula that you are using in the @tot_wrk formula?  I am curious to see why you cannot summarize it.
You can create a running total to summarize it but you will NOT be able to display it in G1 header, it would have to be in the footer.

If you are just adding 2 database fields together, you should be able to just add them together in a formula like this:

{employee.regular_wrk} + {employee.overtime_wrk}

and then right click the field and insert, summary.
0
 

Author Comment

by:vsuripeddi
ID: 12245645
Formula field is {@total_wrk} It is sum of two summation fields ( sum(regular_wrk) + sum(overtime_wrk))
The formula field {total_wrk} is in a group header .
Hence I could not find count({@total_wrk} or sum({@total_wrk} .

If it were to be in the detail section I could easily find its summation or count
This formula field  is in group header section

This has to be suprressed whenever its value is greater than 24
The count of all these unsuprressed {@total_wrk} whsould be displayed in a group above this group
Group2 is contained in Group1

Group2 contains {@total_wrk}
Count of {@total_wrk}.... not suprressed should be displayed in Group1

Could you please help with this

Thanks

0
 
LVL 42

Expert Comment

by:frodoman
ID: 12247980
>>> This tot_wrk has to be suppressed whenever its value is greater than 24; I need to calculate the count of all the unsupressed tot_wrk

So in other words you need to count all of these where the value is <= 24 (because these are the unsuppressed) right?

Can't you simply create another formula:

// @CountUnsuppressed
if {@total_wrk} <= 24 then 1 else 0;

And then add a SUM({@CountUnsuppressed})

frodoman
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

 

Author Comment

by:vsuripeddi
ID: 12248084
thanks for the post....

Yes.. precisely that is what I wanted to say...

I could not add up the formula SUM({@CountUnsuppressed})
and this is giving me error
IT is giving me a message that {@CountUnsuppressed } cannot be summarized
Could you kindly help

thamks

0
 
LVL 101

Accepted Solution

by:
mlmcc earned 63 total points
ID: 12249375
Create a running total using @CountUnsuppressed

mlmcc
0
 
LVL 42

Expert Comment

by:frodoman
ID: 12249391
Agree - create a running total on this new formula.
0
 
LVL 28

Assisted Solution

by:bdreed35
bdreed35 earned 62 total points
ID: 12250122
A running total will work but just keep in mind that it will have to be placed in the group 1 footer to be accurate.  You cannot use a running total and display the correct number in the Group 1 Header.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 12454738
SHould have solved it.

mlmcc
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

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

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 …
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

626 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