I want a group field as red represent, if included in a particular text box the value DL *.
Example of the Dataset:
Productname | Price | Text
A | 01 | ABC
A | 02 | DL-123
Now, the Field Productname should be RED in the Group Row.
If tried with: =iif(Fields!SalesLine.Text.Value like "DL*","RED","BLACK")
but this only works if the first detail line contains the value ABC in the TextBox TEXT.How can i solve this Problem. thanks
You can try any of below;
=IIf(Fields!SalesLine.Value.IndexOf("DL") >= 0,"Yellow","Transparent") =IIf(Fields!SalesLine.Value.Contains("DL"),"Yellow","Transparent") For uppercase Value =IIF(InStr(UCASE(Fields!SalesLine.Value),"DL"))>0, "Yellow", "Transparent") For Lower case Value =IIF(InStr(Fields!SalesLine.Value,"DL")>0, "Yellow", "Transparent")Thanks
No it doesn´t work. It´s the same result.
Maybe I did not explain the problem properly. Therefore I have now attached a screenshot.
At the date 15.4.2014 it works but the date 06.06.2014 it does not work. Since the field in the group is not formatted.
- Edited by stony17 Thursday, August 21, 2014 7:34 AM
According to your description, you want to set the text color in parent group based on the values in child group. Right?
In Reporting Services, if you want to use conditional expression for parent group based on the values in its child group, it will only compare the first row in the child group because compared field is not in the same scope as the parent group field. In this scenario, we need to add a calculated field: =IIF(Fields!Text.Value like "DL*","Red","Black"). Then we can use sum() function on this field and specify the parent group as the scope. So we can set the text color based on this sum result. We have tested this scenario with sample data in our local environment. Here are screenshots for your reference:
If you have any question, please feel free to ask.