Using criteria in reports?

  • Thread starter Thread starter BT
  • Start date Start date
B

BT

I'm working on a report where a certain value is
calculated that can evaluate to any negative or positive
number, or to zero. Is there any way that I can prevent a
record from being displayed when that value is not greater
than zero?

I could approach this from the query level, but it is
proving to be more complex than I think should be
necessary.

Thanks
 
You can apply a filter to your report

Where MyValue > 0

Or you can just update the query that populates the report
with the same criteria.
 
Perhaps I need to be a little clearer on my question. :)

The value that I am wanting to filter by is a value that
is actually calculated on the report from various fields
in the query that the report is based on. The actual
calculation that I am wanting to filter by is this:

Sum([6wkReq])-([QTY_ON_HAND]+[QTY_ON_ORDER])

It is in the group header of the report, with no detail
records being show. This is calculated for each group of
records to show how much of a certain material the company
needs to order. To my knowledge, this isn't possible to
calculate in the query due to the nature of the records.
There are many different parts that can be made from each
material, so the QTY_ON_HAND and QTY_ON_ORDER fields are
the same for each record because they reference the
quantity we have measured in feet, but the 6wkReq field
can have different values between the records due to the
fact that the imported data that we recieve is based on
the number of parts needed, and not on material.

Basically what I want to do is hide the entire record
group if the calculated value mentioned above evaluates to
zero or to a negative number, therefore meaning that we do
not need to order any of this material at this time.

Maybe I can still do what you suggested and I just don't
know how. I tried to apply the filter using the text box
that contains the calculated value, but it doesn't seem to
recognize the textbox. When I open the report, it prompts
me to enter a value, when it should be using the value in
the text box.

Any ideas? Hope I didn't make this too confusing.

Thanks again.
 
BT said:
I'm working on a report where a certain value is
calculated that can evaluate to any negative or positive
number, or to zero. Is there any way that I can prevent a
record from being displayed when that value is not greater
than zero?

I could approach this from the query level, but it is
proving to be more complex than I think should be
necessary.


This really does need to be done in the query. Perhaps
someone will be able to make a helpful suggestion if you
posted your existing query along with a brief explanation of
the fields and the calculation that you need to check for 0.
 
I haven't tried this and don't know if it will work. On your group header
you can add code that will cancel the format and print event of the group
section if the value of your calculated control returned <= 0.
 
Back
Top