I have developed a Matrix report in SQL Server 2005 SP4 environment, I have used following expression for defining background color in Details as well as for Total cell.
"=iif(inscope("matrix1_WeekStartDate") and inscope("matrix1_ProjectName"),"White",iif(Int(SUM(Fields!FORECASTWORK.Value)) < Fields!Capacity.Value or int(SUM(Fields!FORECASTWORK.Value)) = 0 ,"Yellow",iif (int(SUM(Fields!FORECASTWORK.Value)) = Fields!Capacity.Value,"DarkGreen","Red")))"
But based on above expression, background color is working fine in SSRS BI Studio preview pane, please confirm from below.
But based on above expression, background color coding is not working IE 8, please confirm from below attachment.
Can any body help me in finiding what's wrong there in Report, why backgrounbd color coding is not workingh while rendering the report.
I have SSRS BI Studio 2005 SP4 enviornment, using this I have developed one matrix report. I want to use Inscope() function for Details and Subtotal cell background color.
What I need: I have two Details cell which are "AssignmentWork aka Forecast Work" and "Capacity" which have been grouped on"matrx1_WeekStartDate" on Colum level and "matrix1_ResourceName, ProjectName,ProjectOwner and EmpRole" at Row Level.
I have two Subtotal cell as well 1) at ProjectName and 2) at ResourceName.
Now I want Details cell Background color which are in scope of "matrix1_WeekStartDate" should come as White and Subtotal Background color on ProjectName Group should come based on below expression. But When I am using below expression, on both cell Details as well as Total cell I am getting "White" background only".
Background Color Expression=iif(inscope("matrix1_WeekStartDate"),"White", iif(Int(SUM(Fields!FORECASTWORK.Value)) < Fields!Capacity.Value or int(SUM(Fields!FORECASTWORK.Value)) = 0 ,"Yellow",iif (int(SUM(Fields!FORECASTWORK.Value)) = Fields!Capacity.Value,"DarkGreen","Red")))
- Please suggest me what I am doing wrong here or is there any other alternative by which I can achieve the same.
Thanks Much !!!
I have developed a report, in which for cell background color coding I have used an expression using InScope() function.
But when I preview that matrix report in BI Studio(2005/SP4) it is showing background color coding based on the expression I have used.
But when I run the report in browser, I am not getting any color coding there only white background.
So just want to know why that InScope() function is working when I preview the report BI studio and why not in Broswer.
- Merged by Mike YinMicrosoft contingent staff, Moderator Sunday, October 07, 2012 4:23 PM duplicate
See these links
Hope this will help you !!!
I have gone through with specified links indeed got to know few more things about InScope() Function.
But my doubts is I have used below expression for defining background color.
"=iif(inscope("matrix1_WeekStartDate") and inscope("matrix1_ProjectName"),"White",iif(Int(SUM(Fields!FORECASTWORK.Value)) < Fields!Capacity.Value or int(SUM(Fields!FORECASTWORK.Value)) = 0 ,"Yellow",iif (int(SUM(Fields!FORECASTWORK.Value)) = Fields!Capacity.Value,"DarkGreen","Red
This expression using INScope, is working fine when i preview the report in VS BI Studio but not when I execute the report in Browser.
Can you please help my why this is showing such weird behaviour.
Sorry for the delay.
For more information about using Inscope() function, you can refer to the following two blogs:
In this issue, I suggest that you check the issue in Internet Explorer 8 Compatibility View mode. If the issue persists, you can check it on a different version of IE or a third party browser. Taking the factor that the IIf() function sometimes not works well with colors resetting into account, I also suggest that you use Switch() function instead of IIf() function in the expression.
Hope this helps.
TechNet Community Support
Thanks Mike for adressing this Issue, your are not late I am still doing research on this :)
I have gone with above articles, indeed they are good and now I have better understanding on InScope() function.
For compatabilty view mode settings, previously my IE8 was set to "Display Intranet sites in comapatbility view." Now I have changed it to "Dsplay all websites in compatability view" but still no luck.
Me and my colleagues all have IE8 so was not able to check this in diffrent version, but counter checked in Mozilla but there also Background color coding is not working.
And as suggested, I have changed the expression to include Switch() in place of IIF(), but after this color coding is not working even in VS BI Preview Pane. So I have rolled back the change to use previous expression which is using IIF().
So again unfortunately, I came back to same from where I have started :(
Mike, Let me know what else I can try with this report or do you have any alternative approach to show background color.
Thanks Much !!!