473,326 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

How to compare against column with multiple values seperated by comma?

Hi All,
I am using rdlc report, i have a column in database which i want to display in the report.
vehicleDamageArea=1,2,3
In the report i need to mark the placeholders with these values .

=iif((Fields!vehicleDamageArea.Value="3"),Chr(253) ,Chr(168)) like this.

But as we know,it will check the whole value 1,2,3="3" not the spilted values.
Any suggestion to check by spilting the vehicleDamageArea parameter.
Nov 22 '10 #1
3 2202
i understand the problem to be this.
1. Database has a column with values "1,2,3"
2. From code wish to check for '3' and display in report if exists

you can look for substring existence in your sql query itself. say does '3' exists in "1,2,3".
Nov 25 '10 #2
Thanks 4 the suggestion.

I did like below
Expand|Select|Wrap|Line Numbers
  1. Public Shared Function CheckValue(ByVal InString As String,ByVal input as String) As Char
  2.  Dim output As String = String.Empty
  3.         Dim Parts() As String = InString.ToString().Split(",")
  4.         For i As Integer = 0 To Parts.Length - 1
  5.             If Parts(i) = input Then
  6.                 output = Chr(0120)
  7.                 Exit For
  8.             Else
  9.                 output = Chr(0111)                
  10.             End If
  11.         Next i
  12.         Return output
  13. End Function
Dec 3 '10 #3
Just refactoring your code.Can it be like this..
Expand|Select|Wrap|Line Numbers
  1. InString.Contains(input)
  2.         output = IIf(InString.Contains(input), Chr(120), Chr(111))
  3. (OR)
  4.         InString.IndexOf(input)
  5.         output = IIf(InString.IndexOf(input) <> -1, Chr(120), Chr(111))
instead of splitting, looping and comparing
Dec 5 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: flecki | last post by:
I have the following Question: Is it possible to install a Reporting Service at IIS Webserver without SQL Server 2000 on the same machine. We have a Enterprise SQL Server at another machine...
2
by: ferit meftun harmankaya | last post by:
I have some report which are designed in "Crystal Report". I want to run these reports in "Reporting Service" My aim is to convert from extension of Crystal Report (rpt) to extension of reporting...
1
by: Krish | last post by:
Hi, I tried to Develop one Report in SQL Reporting Service. I have installed SQL Reporting Serivice in Windows 2003 machine. SQL Server Database is in another machine, running on Windows 2000. I...
1
by: hotice3100 | last post by:
I have created an interface for a SQL Reporting Service report. SQL Reporting Service makes a virutal directly in IIS called ReportServer. There are various buttons on the form I created and one...
7
by: ad | last post by:
I found that there is reporting service bundle with SQLSever 2005 express. Can VS2005 express can use the reporting service in SQLSever 2005 express?
1
by: holly | last post by:
Does anyone know a good newsgroup that I can ask question about sql reporting service? Thanks
2
by: RdS | last post by:
Hello, I use sourcesafe and vb 2003 for my dev environment. on the sourcesafe server I also have sql2005 and reporting services installed. The web app references this sql server for db. When...
0
by: refv8 | last post by:
Hi im working on aplications with Form authentication where the users is from a Active Directory in one server inside the Domain, i want to see using the ReportViewer to see the report hosted in...
2
by: jack | last post by:
Hi Our team is developing reports using sql reporting service 2005. We all are new in this area. I would be glad if any one suggest me the integration of asp.net and sql reporting service. ...
2
by: =?Utf-8?B?QmlsbHkgWmhhbmc=?= | last post by:
I am using reporting service with asp.net. I want to save a report snapshot in some time. How do I do this in asp.net? Is there any web service to do this? Thanks in advance! -Billy
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.