Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 Cascading Free Text Parameter

Author  Topic 

sprotson
Yak Posting Veteran

75 Posts

Posted - 2012-11-09 : 16:41:23
I am currently running a simple report that has 1 input parameter of @IN_DNGroup which is defined in a stored procedure.

In the report the parameter drop down is populated with distinct DNGroups from a Dataset.

I am looking to add another parameter in the form of a free text box, so if you entered a letter in this box, then the next parameter (DNGroup) would be filtered to only show groups starting with that letter. This would need to work for a phrase also, eg wesq would return all groups beggining with wesq.

I have experience of cascading parameters, but I have no idea how I can filter with this criteria.

Any Suggestions?

LarryC74
Yak Posting Veteran

94 Posts

Posted - 2012-11-17 : 18:30:30
Hey!
Try something like this:

Select Distinct DNGroups
From Table
Where Left(DNGroups,Len(@Parameter)) LIKE @Parameter + '%'

So basically it takes the length of the parameter string as the variable for the "LEFT" function then use the LIKE and "%" to get everything after that.


Larry





Everyday life brings me back to reality
Go to Top of Page
   

- Advertisement -