Solved

How to calculate minimum value of a field within a group

Posted on 2006-11-06
8
301 Views
Last Modified: 2012-05-05
I was able to easily setup a summary to get the maximum value of a given field within a group, but now I need to figure out the minimum value of the same field.  The problem is the value of Zero should not be counted as the minimum value.  Let's say the field contains three values: 0.00, 1.12, and 87.3.  The minimum value should be 1.12 instead of 0.00.  How could I accomplish this?  Thanks for any feedback.
0
Comment
Question by:cmp119
8 Comments
 
LVL 77

Expert Comment

by:peter57r
ID: 17884664
Hi cmp119,
Use a running total field to get the minimum.
Reset for each group and in the Evaluate For use a formula which says something like...
{table.field} <>0

Pete

0
 
LVL 17

Expert Comment

by:MIKE
ID: 17884685
Do you need to see the items that have 0.00? IF NOT, then just remove them from your report using SELECT EXPERT.

choose the value...and assign GREATER THAN ">" 0.00.

MikeV
0
 

Author Comment

by:cmp119
ID: 17884763
I tried your suggestions and they didn't work.  I search your site  a bit more and discovered the below resolution to work fine.  Thanks so much for your feedback.  I should of done a more thorough search before asking.  Thanks.

Accepted Answer from frodoman
Date: 08/14/2004 06:58PM PDT
Grade: A
 Accepted Answer  


So what you want is the lowest value within each group, right?  In that case do this:

In the report header create this formula:

     shared numberVar SmallestFound;

In the group header create this formula (just use a value larger than anything you'll see in your report):

     shared numberVar SmallestFound := 99999;

In the details section create this formula:

     if {table.field} > 0 and {table.field} < shared numberVar SmallestFound then shared numberVar SmallestFound := {table.field};

In the group footer put this formula:

    shared numberVar SmallestFound;


You can suppress any of these formula so they aren't visible on the report.

HTH

frodoman
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

Author Comment

by:cmp119
ID: 17884793
I think the points should go to frodoman if anyone, but I could not figure out how to do it.  Otherwise, the question should be removed.  Thanks again.
0
 
LVL 17

Expert Comment

by:MIKE
ID: 17884832
Sounds good....

MikeV
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 18136504
PAQed with points refunded (250)

Computer101
EE Admin
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

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…
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…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

757 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