From: childofthe1980s on
Hello:

I have created a SQL 2005 report that contains report parameters for such
things as a beginning and ending date range and a string field.

Is it possible to configure a report that allows you to do an "either/or"
search, where you can put in a date range and not put in a value for that
parameter string field that I mentioned? And, vice versa?

I just want to allow for users to put in a date range if they want to and/or
a value for the string field but not necessarily both.

Is it possible to configure multiple parameter fields like this where you
can choose to enter the parameters or not? If so, how?

Or, should I just create separate reports with one parameter each?

childofthe1980s
From: childofthe1980s on
Disregard.....I figured it out.

For your reference, use the following link:

http://bloggingabout.net/blogs/egiardina/archive/2007/06/26/sql-server-reporting-services-optional-parameters.aspx

"childofthe1980s" wrote:

> Hello:
>
> I have created a SQL 2005 report that contains report parameters for such
> things as a beginning and ending date range and a string field.
>
> Is it possible to configure a report that allows you to do an "either/or"
> search, where you can put in a date range and not put in a value for that
> parameter string field that I mentioned? And, vice versa?
>
> I just want to allow for users to put in a date range if they want to and/or
> a value for the string field but not necessarily both.
>
> Is it possible to configure multiple parameter fields like this where you
> can choose to enter the parameters or not? If so, how?
>
> Or, should I just create separate reports with one parameter each?
>
> childofthe1980s
From: Rictastic on
On 12 Nov, 17:14, childofthe1980s
<childofthe19...(a)discussions.microsoft.com> wrote:
> Disregard.....I figured it out.
>
> For your reference, use the following link:
>
> http://bloggingabout.net/blogs/egiardina/archive/2007/06/26/sql-serve... 
>
>
>
> "childofthe1980s" wrote:
> > Hello:
>
> > I have created a SQL 2005 report that contains report parameters for such
> > things as a beginning and ending date range and a string field.
>
> > Is it possible to configure a report that allows you to do an "either/or"
> > search, where you can put in a date range and not put in a value for that
> > parameter string field that I mentioned?  And, vice versa?
>
> > I just want to allow for users to put in a date range if they want to and/or
> > a value for the string field but not necessarily both.
>
> > Is it possible to configure multiple parameter fields like this where you
> > can choose to enter the parameters or not?  If so, how?
>
> > Or, should I just create separate reports with one parameter each?
>
> > childofthe1980s- Hide quoted text -
>
> - Show quoted text -

Hi

The way isn't done in the link:

SELECT * FROM Table
WHERE
(AssetID = @AssetID OR @AssetID IS NULL)

isn't the best way, the OR bit can ve quite slow over big tables, it's
better going

WHERE ISNULL(@AssetID, AssetID) = AssetID

Rick
www.reportingservicestips.co.uk