Solved

How to Filter with "starts with" in Report Builder 3.0 Reporting Model Query Designer?

Posted on 2014-02-10
5
2,441 Views
Last Modified: 2014-02-12
I have a filter for a text field.  I want to filter out any items that starts with two letters "AB".  
I'm working with a reporting model and the related query designer.  
There is a "contains" option but I don't see a starts with or ends with option.  Nor do I see an option to ender my own expression.  I've tried contains with variations of the  % and *, but neither worked.  Any suggestions as to how to use a "starts with"/"ends with" type of filter with the query designer and a reporting mode?  (not sql)

Thank you,
0
Comment
Question by:jaisy99
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 37

Expert Comment

by:ValentinoV
ID: 39849488
It should be possible to use the Filter functionality on the dataset.  One of the operators is "like".  If you use the like in combination with a search value that ends with an asterisk (and not starts), you've got exactly the same as you'd have with Starts With.

Here's what the complete filter would look like:

Expression: YourTextField
Operator: Like
Value: AB*

Please note: this filter is different functionality than the filtering through the query designer...
0
 
LVL 1

Author Comment

by:jaisy99
ID: 39851564
Thank you.  This is working to find all that start with AB, but I want to filter these out/exclude them.  Where would I put the NOT using this filter section?
0
 
LVL 37

Accepted Solution

by:
ValentinoV earned 500 total points
ID: 39852477
but I want to filter these out/exclude them

Ow right, missed that part, sorry.  This makes it a little more complicated because there's no "not like" operator, but it is possible.  The trick is to build an expression that filters out the records you don't want and then use a simple boolean comparison.  Here's how that goes:

Expression: =Left(Fields!YourTextField.Value, 2) = "AB"
Type: Boolean
Operator: =
Value: false
1
 
LVL 1

Author Closing Comment

by:jaisy99
ID: 39853467
Perfect.  Thank you so much!
0
 
LVL 37

Expert Comment

by:ValentinoV
ID: 39855460
You're welcome!
0

Featured Post

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A recent questions about how to add SSRS named instances, couldn't find any that talks about SQL server 2008, anyway I decided to help by creating some screen shots. The installation is straightforward, you just pop the SQL server 2008 installati…
I recently went through setting up a JasperReports Server using the AWS EC2 instance, and this article will cover some basic administration tasks I had to perform.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question