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

Display all if parameter is blank

Status
Not open for further replies.

StephHansen

Programmer
Dec 26, 2001
87
0
0
IN
We are using CR9 and VB.net. We are running a summary report over the web, with parameter fields for ClientID, StartDate, and EndDate (which are then used in the select statement)

If a certain client is using the report, we will (behind the scenes) pass a ClientID to the report for {?ClientID}. If the Admin is looking at it, we want to retrieve all records, not just ones with a certain ClientID.

What would I say in my select formula to retrieve all if {?ClientID} is blank? Right now I have:

{@ScreenDate} in {?StartDate} to {?EndDate} and
{Client.ClientID} = {?ClientID}

Thanks!

Stephanie
 
One option would be to add a new value in the default list for {?ClientID}. You can name it "ALL"
Then change your record selection to something like this:

{@ScreenDate} in {?StartDate} to {?EndDate} and
(If {?ClientID} <> "ALL" then
{Client.ClientID} = {?ClientID}
else If {?ClientID} = "ALL" then true)

Hope this helps!


Kchaudhry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top