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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

variable/ formula or conditions

Status
Not open for further replies.

vani65

Programmer
May 19, 2003
101
AU
I have a master detailed report with 15 columns, which really working fine except with some extra-unwanted records. Now I’m trying to eliminate those records – but I was stumped. I want to implement this logic at report level either by creating variable/ formula or conditions like this:
If Payment Type Code = “A” then Total Amount “ should be >0
If Payment Type Code = “B” then Total Amount “ should be >=0

Currently Total Amount column for Payment Type Code = “A” is showing “0” which I don’t want; it should be greater than “0”.
Can any one help me in this regard?
 
A complex condition and then a filter should do the job.

I don't know about other columns...

Lets say you have Year, Month and Sales... Lets change the condition as to simulate your problem

If Year = 2003 Then Sales > 0
If Year = 2004 Then Sales >=0

Create a new variable like this..

Code:
= If <Year> = 2003 Then <Sales> > 0 Else If <Year> = 2004 Then <Sales> >=0

Now insert a filter on this new variable for 1.

Sri
 
Hi Sri,
I managed to solve this problem by creating Union Query, it perfectly working now. Anyway thanks for suggestion.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top