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 2008 Forums
 Analysis Server and Reporting Services (2008)
 SSRS change fill color on report title
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Villanuev
Constraint Violating Yak Guru

447 Posts

Posted - 03/12/2013 :  05:34:49  Show Profile  Reply with Quote

Hi guys,

I have a requirements to change the fill color of my report title
in my dataset "OpenRAW" i have a field name RESULT.
Under Result fieldname, it contains data "OK" and "CHECK-100"
I have to evaluate if there is a word or it contains "CHECK-100" or "CHECK" in the RESULT field.
then i will change the default fill color of my report header into Red color. thank you in advance..

-------------
OPEN PO   --- report title > need to change the fill color if the RESULT field contains "CHECK-100" or "CHECK"
------------
My Date

Purchid--itemid---Date--RESULT > column header


visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

Posted - 03/12/2013 :  05:39:26  Show Profile  Reply with Quote
SO does OpenRAW only have single record always? if there are mutiples how will you determine which one to be considered based on which you've manipulate report title color? or is it that value of RESULT field will be same across?

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

Go to Top of Page

Villanuev
Constraint Violating Yak Guru

447 Posts

Posted - 03/12/2013 :  06:00:42  Show Profile  Reply with Quote
Hi Visakh,

Here is the content of my OPENRAW dataset. it came from the value of RESULT fields.
its possible to scan the RESULT field? once it detect a "CHECK" the fill color will change.


"OPENRAW" DATASET

Purchid--itemid---Date--RESULT > column header
11111---HTC1235--3-11-13--OK
22222---HTC1233--3-12-13--CHECK
33333---HTC1235--3-13-13--OK
44444---HTC1321--3-14-13--OK
66635---HTC1354--3-15-13--CHECK




Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

Posted - 03/12/2013 :  06:41:29  Show Profile  Reply with Quote
but you've both CHECK and OK coming here isnt it? in that case , what would be your report title color?

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

Go to Top of Page

Villanuev
Constraint Violating Yak Guru

447 Posts

Posted - 03/12/2013 :  20:15:04  Show Profile  Reply with Quote
My Report Title would be "OPEN PO". Its either i will change the font color or change the back ground (fill color) into red color. If the result field has contains "CHECK". present background color is Light blue. thanks.
Go to Top of Page

Villanuev
Constraint Violating Yak Guru

447 Posts

Posted - 03/12/2013 :  23:44:28  Show Profile  Reply with Quote
i make some modification and here is the result.

I'd make another dataset that contains only field RESULT.

then i made an script filtering only those with "CHECK"

after doing this i used this dataset to my table header and it's working.


=IIF(First(Fields!RESULT.Value, "CheckDS)="CHeck",Red","#003366")


Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

Posted - 03/13/2013 :  00:25:48  Show Profile  Reply with Quote
nope..this wont work always. In case you have a value CHECK in dataset but its not first value it will still show the color as #003366.

I think based on your earlier sample data what you need is this

=IIF(SUM(IIF(Fields!RESULT.Value="CHeck",1,0), "CheckDS)>0,Red","#003366")

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

Go to Top of Page

Villanuev
Constraint Violating Yak Guru

447 Posts

Posted - 03/13/2013 :  01:01:27  Show Profile  Reply with Quote
i got an error using your recomendation.

1.Right clik Text properties of report title
2. click text box properties ---> Fill--Fill Color Expression-->Set expression for background color

=IIF(SUM(IIF(Fields!RESULT.Value="CHeck",1,0), "CheckDS)>0,Red","#003366")


The BackgroundColor expression for the text box ‘Textbox10’ uses an aggregate expression with an invalid recursive/simple flag. The valid values for this flag are ‘Recursive’ and ‘Simple’.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

Posted - 03/13/2013 :  02:08:53  Show Profile  Reply with Quote
the below is wrking fine for me.

=IIF(SUM(IIF(Fields!RESULT.Value LIKE "CHeck*",1,0), "DataSetName")>0,"Red","Green")

I'm using this expression fro Backgroundcolor property available from properties window by selecting textbox and clicking show properties icon on top.

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

Go to Top of Page

Villanuev
Constraint Violating Yak Guru

447 Posts

Posted - 03/13/2013 :  21:54:45  Show Profile  Reply with Quote
Thank you very much.
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.08 seconds. Powered By: Snitz Forums 2000