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

I got a problem with my filtering - formula

Status
Not open for further replies.

rajrev

Programmer
Sep 25, 2003
148
US
ISSUE

I'm trying to filter my report with
1.Date range, 2.area and 3.Status

I got the answer for the combination:

1. any date range - all status - all area

2. any date range - all status - particular area

3. any date range - particular status - all area

but i coudn't get the correct answer for

4. any date range - particular status - particular area

It gives the result as (ie all status - particular area)


The formula I'm using is

(
{?Date} ={Q.Date}
)

and
if ( {?area} <> &quot;ALL&quot;) then
{?area} = {Q.area}
else if ({?area} = &quot;ALL&quot;) then
true

and
if ({?Status}<>&quot;ALL&quot; ) then
{?Status}={Q.Status}
else if ({?Status} = &quot;ALL&quot;) then
true

please give me suggestion on this problem.

thanks
MK
 
How are you deploying your report (or how are you passing the parameter values?) If you are doing it via the RDC, there is a much simpler approach I could show you(setting the RecordSelection property of the report object, bypassing the parameters entirely). I try to avoid if-then's in the record selection as much as possible, although there are some folks here in the forum have done really good stuff with if-then's in record selection formulas.
 
Looks like a parenthetical problem:

(
{?Date} ={Q.Date}
)

and
(
if ( {?area} <> &quot;ALL&quot;) then
{?area} = {Q.area}
else if ({?area} = &quot;ALL&quot;) then
true
)
and
(
if ({?Status}<>&quot;ALL&quot; ) then
{?Status}={Q.Status}
else if ({?Status} = &quot;ALL&quot;) then
true
)

-k
 
I'm sorry, its my blender mistake. Thanks for your catch.

Thanks
MK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top