[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

How to highlight data only if it meets criteria comparing against the rest of the data.

Posted on 2013-02-06
3
Medium Priority
?
403 Views
Last Modified: 2013-02-21
Hi Experts, I have a complicated issue.
I need to highlight rows of data if it meets a set of criteria. It is simple to highlight the row if it meets 3 sets criteria E.g. If column1=”Dog”, Column2=”Claws” and Column3=”Hungry” then highlight row. That is easy to do, however what I want to do is look at the rest of the rows of data for that day and see if Column2 and Column3 also appear but with a different column1.  This is very confusing to explain. I will use false data but hopefully you will see what I am trying to do. Say I have a pet cage and I don't mind all (column1) dogs, cats, bear’s etc mixing in that same cage. However if there are more than two types of column1 plus Column2=”Claws” and column3=”Hungry” then I want those rows highlighted so I don’t put them in the same cage. That is only if the column1 types are different. If for example there are 3 rows with dogs and they all have “Claws” and are “Hungry” they don’t need to be highlighted.  Not a very good example but best I could come up with to explain my problem. Is there a way to do this using custom code? I have studied programming but not for 10 years, so I know the concepts but I am very rusty.  I guess I just need a little guidance I how I might go about doing this. If It can't be done then I would like to know this as well. Many thanks for your help.   One more thing, I can only do the programming in the Report. I cannot setup procedures or anything directly to the Database. This needs to be done via the custom code in the report as we use a ODBC connection.
0
Comment
Question by:bruskhickory
[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 Comments
 
LVL 10

Assisted Solution

by:Mez4343
Mez4343 earned 750 total points
ID: 38862142
First thought is to create a new DataSet (SQL Query) that will return row(s) based on the conditional criteria you need. This may involve creating a somewhat complex SQL query to do everything you detailed so you you need some decent sql skills. If you can create SQL result then you can check the result in your BackgroundColor property with a simple =IIF statement to do the highlighting. If you want to try SQL and need some help, post a sample db with requirements.

Custom code is an option but I wouldnt presonally put in ODBC db access calls there because you would need to handle errors and the like. If you need a starter reference for doing Custom Code check here. http://msdn.microsoft.com/en-us/library/ms156028.aspx
0
 
LVL 23

Accepted Solution

by:
Ioannis Paraskevopoulos earned 750 total points
ID: 38862623
Select a.column1, a.column2, a. column3, b.species from table1 a join
(Select column2, column3, case when max( column1)<>column2 then 'Different' else 'same' end as Species from table1 group by column2, column3) b
On a.column2 = b.column2
and a.column3 = b.column3


Try the above and see if it gets you the data you want.

Giannis
0
 

Author Closing Comment

by:bruskhickory
ID: 38916378
Sorry for late feed back I had to put this issue down the list. I still have yet to try it out.
Thanks for your help.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Time Corrections for Reports Working with a report, we made some interesting discoveries about the time corrections/updates We are using the following Parameters: Starting Entered Date (Date) formatted as Data type: "Date/Time" Ending Entered …
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…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

656 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