SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 Analysis Server and Reporting Services (2005)
 SSRS 2005 Color Expression
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Makaio780
Starting Member

Canada
24 Posts

Posted - 07/31/2012 :  12:17:12  Show Profile  Reply with Quote
Could someone tell me why this expression does not work and i have i could achieve something like it.

=IIF(Fields!Customer.Value = FIRST(Fields!Customer.Value, "ds_Top10Prev2"),"Red","Black")

Ron Cheung

sunitabeck
Flowing Fount of Yak Knowledge

5155 Posts

Posted - 07/31/2012 :  13:11:41  Show Profile  Reply with Quote
That expression seems perfectly fine to me. The only reason I can think of that it does not work is if the data type is float and there is some kind of rounding error.
Go to Top of Page

Makaio780
Starting Member

Canada
24 Posts

Posted - 07/31/2012 :  13:18:24  Show Profile  Reply with Quote
What im trying to do is compare names from 2 datasets. Example if Name in dataset 1 exists in dataset 2. to color red if not then color black.

Thanks for the quick response.

Ron Cheung
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

Posted - 07/31/2012 :  13:18:47  Show Profile  Reply with Quote
actually that expression doesnt make much sense. it just makes first values color alone red. is it that you want?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

sunitabeck
Flowing Fount of Yak Knowledge

5155 Posts

Posted - 07/31/2012 :  13:21:37  Show Profile  Reply with Quote
I tested it and it seems to work fine.

Visakh I think what s/he is trying to do is to color all the rows that match the first row in red and have the others as black.

I tested it with two data sets, tested it with floating point and character data types - all seem to work fine.

Edited by - sunitabeck on 07/31/2012 13:22:17
Go to Top of Page

Makaio780
Starting Member

Canada
24 Posts

Posted - 07/31/2012 :  13:30:55  Show Profile  Reply with Quote
hmmm k one more example:

Dataset 1
Ron
Tim
Jon

Dataset 2
Jeff
Ron
Kim

If a name in dataset 1 matches a name in Dataset 2 then Color Red if not color black.

Sorry for being confusing.

Ron Cheung
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

Posted - 07/31/2012 :  14:18:33  Show Profile  Reply with Quote
quote:
Originally posted by Makaio780

hmmm k one more example:

Dataset 1
Ron
Tim
Jon

Dataset 2
Jeff
Ron
Kim

If a name in dataset 1 matches a name in Dataset 2 then Color Red if not color black.

Sorry for being confusing.

Ron Cheung


you cant compare between dataset fields like that inside SSRS

if thats the case why not apply the logic in query itself and then bring it as a single dataset with matching bit also?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
  Previous Topic Topic Next Topic  
 New 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.09 seconds. Powered By: Snitz Forums 2000