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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 Cascading Free Text Parameter
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Yak Posting Veteran

75 Posts

Posted - 11/09/2012 :  16:41:23  Show Profile  Reply with Quote
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?

Yak Posting Veteran

94 Posts

Posted - 11/17/2012 :  18:30:30  Show Profile  Reply with Quote
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.


Everyday life brings me back to reality
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000