Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I filter records based on a formula?

Status
Not open for further replies.

PTW

Programmer
Jul 7, 2000
82
CA
I'm using Crystal Reports 7.0 and I'm trying to use a filter to show only records that have whole dollar amounts (no pennies) in a field called Doc_Amount.

I created the following formula:
Right(ToText(Doc_Amount), 2) = "00"

Now, how do I use this formula to filter the records, or should I be using a different method altogether? Thanks for any help! [sig][/sig]
 
First, place this field on the report and make sure that you are getting the Boolean values on the right records. I would have used the Remainder function which is cleaner. or maybe:
field = Truncate(Field)

But, anyway, once you get the boolean to work on the right records, then you open the select expert (report - select expert) and add a rule that uses your boolean field; something like
{@myboolean} is True.

Or you could open (report - edit selection formula) and simply insert the field as the formula, since it is already a boolean. [sig]<p>Ken Hamady<br><a href=mailto:ken@kenhamady.com>ken@kenhamady.com</a><br><a href= Reports Taining by Ken Hamady</a><br>[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top