SSRS - Indicator and value in same cell? - reporting-services

I have created a Directional indicator (Green up arrow and Red down arrow) in my SSRS report, referring to the value of the column next to it. This all works ok:
However, I really want the indicator and the value to be in the same cell, like Excel can:
A Google found the following article , where the last post suggest it is possible using the following syntax:
=Format(Fields!Column1.Value, "Format") + " " + "Indicator"
I assume "Indicator" refers to the name I gave to my Direction indicator, but I can't get it to work..
I have read that by using border formatting I can get my two cells to look like one, but I would ideally like it all to be in one.
Any thoughts appreciated!
Mark

I would do this by placing a Rectangle inside of the cell and place your indicator along with another text box inside the rectangle. The downside to this is (depending on how you align the items in the rectangle) the formatting may cause split cells in excel exports.

Ross's method will work and there are alternatives..
The article you referenced was a text indicator not an image (from what I could tell).
You could do something similar by simply adding a a placeholder in the cell (right-click inside the cell and click "create placeholder"). You can then set the font and colour independently from the rest of the cell.
You could use a common font such as wingdings to get arrows and then the value and color properties would be expressions to show the correct 'character' (arrow) and the correct colour.

Related

SSRS Color Expression Not Working When Deployed

In SSRS 2016 I have a matrix that is using a recursive parent hierarchy and have the following expression outside of the column groups, this textbox is the referenced for the Color property to set the text White or Black:
=IIF(Level() = 0 And Fields!HasChildren.Value, "White", "Black")
This works perfectly fine using the preview in SQL Server Data Tools but when viewing the deployed report in report manager when this expression is true the row group text box has black text and not white, yet the column group text boxes have white text as expected.
If I export the report into Excel, Word, PDF, MHTML when the expression is true all text is white. This appears to a problem with the ReportViewer and it is the same in IE11 and Chrome 68.0.3440.84
Putting the expression directly on the textbox does not fix the issue, I have found that if I put the actual expression within the same textbox as a placeholder the property is set correctly.
Any suggestions on how to resolve this?
Expected:
Actual:
I had this problem too. Not sure if I can nail it down specifically, but what I did was looked at the canGrow and canShrink properties of every cell on the row, and make sure they are all the set the same way. In my case, both were set to true. Once I did that, the coloring rendered correctly on screen in SSRS.
Looked here because I had a very different problem that I was banging my head against the wall for where the problem wound up being settings for this field being different for cells in the same row.
I found the expression based foreground colour property doesn't propagate past the first column to any cell that has canGrow false. canShrink has no effect. Other cell properties don't show this problem.
Thanks liver.larson.
I believe this patch from Microsoft fixes the problem properly:
[https://support.microsoft.com/en-au/help/4338240/kb4338240-fix-toggle-item-font-color-and-background-color-expressions][1]
If your organisation won't let you deploy this patch, a workaround is to make the cell contents into an HTML placeholder, then use <font> and <b> etc. tags (possibly generated conditionally) to control the formatting of the cell. If the cell has numerical information in it, change the text box format to General and use the format() function in the cell's value expression to convert the value to text (the format string can be whatever it was in the Properties window for the cell)

Target reference for each bar in Spotfire

In Spotfire:
Is it possible to show target value reference line for each bar in a bar chart.
A way around that i am doing now is using combination chart. Refer screenshot.
The problem here is that now i can not define a color by property to color bars using rules.
I don't believe you can do it automatically without scripting but here is an example of how to do it by hand.
Right click on your bar chart and go to the Lines & Curves section:
Here you can see I've added 4 lines based on percentage of the data.
You can do this or add lines of set values using the Add button in the top right and selecting Horizontal Line.
Notice I've added the line name as the description of the percentage it is, hovering over will show an actual value so it may better to do this if it isn't clear what the value represents.
This is what it produces:
To make it better match your question I've added 2 more employees and coloured by employee instead, I've also set fixed targets for each person rather than percentages and renamed them to make sure it is clear which line applies to which person in case the colour isn't enough.
Using the Settings -> Appearance section back in the first picture change the colour of the lines to match the fields they represent.
Like I said at the start you should be able to create a script to do this for you but that is another question.

Filter for Google Docs to display colored row

I am using Google spread sheet as my bug sheet,i have mark some bugs as fixed and had highlighted that row with some color ,know i want to see all those fixed bugs row .how can i apply filter for it?
I don't understand the question. Do you want to make it so that the cell turns a different color if a certain text, such as "Error", or "Fixed" is entered in? If so, go to where you change the background or text color in the menu, go to "Conditional Formatting", and enter in the rule
Text Contains: Error. Format: Background color(and change it to the color you want)
Then click "Add Rule" and Do the same thing, except instead of Error, you put fixed. If you do this, then click the box in the bottom right corner of the cell you have just edited, then drag it down to all the cells you want the conditional formatting to occur, every time you enter in either "Fixed" or "Error", it will turn the color you want it to.
If you are trying to sort the row by what is fixed or not, then I suggest you add another column that says "Fixed" or "Still Bugged". After you do this, create another tab at the bottom of the spreadsheet. Once you have done that, enter in =QUERY(Sheet1!A1:F20, "Order by E")
In that formula, the A1:F20 is the table you have if it is debugged, the link, the name, or whatever you have in the table. The Column E is the column in which you have that says if it is fixed or not. Sheet1 the sheet that has all of your data in it.
Hope I could help!

SSRS Hiding the textbox in a table cell causes the borders to disappear

I have a report with a table in it. And each table cell has borders around it.
The problem I'm experiencing is that if I hide the textbox in any of the cells, the borders also disappear.
I want the textbox to hide but still show the borders.
The textbox in question shows the visibility toggle icons (+/-) so I can't use an iif statement to change the textbox's value to be an empty string when I don't want to see anything in it.
You can place the textbox inside a rectangle.
***So , I was having this same issue:* **
The Problem:
I assume that you placed a border around your text box and decided to place the hide and toggle element to your text box. or your Rows are not stepped down. Two solutions, I think the first solution is what you are looking for:
Solution 1:
I Noticed that SRSS reporting also has this grouping feature by rows. So to hide the text in the textbox without losing borders is to create a step-down feature within the grouping. So basically you can assign hide text box property without disturbing the rows above the textbox. This may be a better solution.
Solution 2:
You must instead place the border attribute to your text box and place the hide and toggle function on the individual groups. So for you, you have to remove the hide + toggle feature on the textbox. Right click the group element in your "rows" or "columns" and assign your drilldown hide + toggle feature on the group elements. In other words: "group properties" not "text box properties"
I hope this re-solve your issue.
I ran into the same issue. I solved it by changing the text color to white (or whatever the background color of the textbox is). I was doing this inside a table, and couldn't find a way to insert a textbox inside of a rectangle as stated in the other answer...
I had similar problem and used similar approach like #Anony Mous, but instead of changing text color to background color I used expression to change text value =IIF(InScope("RowGroup") = "True", Fields!Textboxvalue.Value, "") - and it works as expected.
Problem with background color change is that, if user unintendely select the text and makes it active, it become visible.
Just select the Textbox in question, run F4 (to access to the properties chart at the right side of VS or SQL), select the HideDuplicates dropdown and Select the Data Set that you are using :)

In SSRS how to conditionally change the colour of a datalabel font on a chart when it appears on the bar

I have created a bar chart that shows values on data labels.
The Data label is placed outside the bar
But in some cases the label appears on the bar where the bar is too long.
In this scenario I would like to conditionally change the font/colour of the data label so that it's more visible.
However I can't see a way to dynamically determine where the label has been placed.
What I can think of is this. You can change the background/font color of all those series labels who's value lies in the range of 95%-100% of the maximum "Value". To be exactly precise as to what should be the threshold to change the bg/font color seems a daunting task, but you could play around with test data.
For writing the expression to change the font color,I would first change the dataset and add a column on the lines of PercOfMax. This column can be calculated easily in the dataset by using basic aggregate functions.
Then you need to go to the Chart Series Label properties-->Color and write the expression on the lines of -
=IIF(Fields!PercOfMax.Value>=95, "YELLOW", "BLACK")
As I said, you might need to do some more research to finalize the value of this threshold(which I am assuming to be 95).
Another solution to this problem is to use fill colour of the label and set its background to a bright colour (e.g. colour), and leave the font colour of the label black. Thus you can always see the label, and there is no difference when it's outside of the bar.