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

Stumped on report select criteria

Status
Not open for further replies.

dianemarie

Instructor
Jul 11, 2001
583
0
0
US
Hello, I have a report that prints out orders from an ordertable and shows any associated deals for those orders, which are in two different views by players on the order (for this example let's say buyer and seller are the two players, each with their own view although I actually have several views). The report groups by order number, with order detail on the group, then the detail section is broken into two sections, with the deal description on section a for seller and section b for buyer . They want to be able to run the report with an option to show orders with deals only, orders without deals only, and all orders (whether there is a deal or not). I have a parameter and the following in my selection criteria, kind of wordy but it seems to do the trick for showing only deals, or showing only no deals, but how do I get it to show all deals? Thanks for any help.

(if {?Deal or No Deal?} = "Print no deals only" then
isnull ({v_seller.DealID}) = true and
isnull ({v_buyer.DealID}) = true)
else if {?Deal or No Deal?} = "Print deals only" then
isnull ({v_seller.DealID}) = false or
isnull ({v_buyer.DealID}) = false)
 
Maybe you should add an "else":

else
(isnull ({v_seller.DealID}) = true and
isnull ({v_buyer.DealID}) = true)
or
(isnull ({v_seller.DealID}) = false or
isnull ({v_buyer.DealID}) = false)

------------------------------------------------------------------------------------------------------------
"Now I can look at you in peace; I don't eat you any more." Franz Kafka, while admiring fish in an aquarium
 
Hi,
Also try:
Code:
(if {?Deal or No Deal?} = "Print no deals only" 
then
(
isnull ({v_seller.DealID}) and 
isnull ({v_buyer.DealID})
)
  
else
 if {?Deal or No Deal?} = "Print deals only"
 then
(
not(isnull ({v_seller.DealID})) or
not (isnull ({v_buyer.DealID}))
)

Also be sure that there are really NULLs and not blanks in those fields being tested - depending on the database it can be significant.



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top