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!

Parameters/Record selection 1

Status
Not open for further replies.

northw

MIS
Nov 12, 2010
140
US
Hello All,

I have an issue with the record selection.
The issue is, My report datasource is a SQl server stored procedure with startdate and enddate parameters, and I have a few other paramenters created on the report.
State and County. If the user enters State = "MO" and County = "Greene" Or State = "All" and County = "All" It works fine, But If the user enters State = "All" and County = "Greene", Then It will pull all the records, So How can I rewrite the record selection to address all three cases mentioned above.
Any help is appreciated.

Thanks in advance!

 
alladi333,

I believe the following should work:
Code:
IF {?Parameter_State} = "ALL" AND {?Parameter_County} = "ALL" THEN TRUE ELSE
IF {?Parameter_State} = "ALL" AND {?Parameter_County} <> "ALL" THEN
(
   {Table.County}={?Parameter_County}
) ELSE
IF {?Parameter_State} <> "ALL" AND {?Parameter_County} = "ALL" THEN
(
   {Table.State}={?Parameter_State}
)

Hope this helps! Cheers!

Mike
---------------------------------------------------------------
"To be alive is to revel in the moments, in the sunrise and the sunset, in the sudden and brief episodes of love and adventure,
in the hours of companionship. It is, most of all, to never be paralyzed by your fears of a future that no one can foretell."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top