BeachSandGuy
Programmer
Hi,
I'm a relative beginner with SQL and reporting and can do some basic reports using SQL and the Report Designer in SQL Server 2005 Visual Studio tools.
I have a query to pull results that is relatively simple:
Select *
From dbo.RouteTable
Where
EffectiveDate >=@StartDate AND
EffectiveDate <=@EndDate AND
Policy in (@Policy) AND
TFN in (@TFN) AND
GroupName like '%' + @GroupText + '%'
My problem is that in the report that runs based off of this, I would like to allow the @GroupText variable to be blank, which would then allow all records to be returned. However when blank, I get nothing. How can I make this so it would allow text entry or NULL to bring all records back?
In Report parameters, i do have datatype set as String, have the Allow null value and Allow Blank value checked. Default value is set to Null.
Thanks.
Ian
I'm a relative beginner with SQL and reporting and can do some basic reports using SQL and the Report Designer in SQL Server 2005 Visual Studio tools.
I have a query to pull results that is relatively simple:
Select *
From dbo.RouteTable
Where
EffectiveDate >=@StartDate AND
EffectiveDate <=@EndDate AND
Policy in (@Policy) AND
TFN in (@TFN) AND
GroupName like '%' + @GroupText + '%'
My problem is that in the report that runs based off of this, I would like to allow the @GroupText variable to be blank, which would then allow all records to be returned. However when blank, I get nothing. How can I make this so it would allow text entry or NULL to bring all records back?
In Report parameters, i do have datatype set as String, have the Allow null value and Allow Blank value checked. Default value is set to Null.
Thanks.
Ian