How do you create a boarder in an SSRS Report? - reporting-services

I've gotten the hang of creating charts/colors and grouping data but I can't seem to figure out how to outline each grouping in my report.
I've got data built for my chart - what I would like to have it appear as -- is like this:
I'm not picky on the color, but that's the least of my worries. I can't figure out how to create the outline, but by group rather then by line.

For your TOP Border Style, use the expression:
=IIF(Fields!TourDate.Value = PREVIOUS(Fields!TourDate.Value), "None", "Solid")
This just checks to see if your TourDate field is different from the Previous row.
The default would need to be solid. You can use it with the border color (black) instead if you want the grey border normally.

Related

Why can't I add border around Group in Report

I have spent hours trying to add a border between the groups in my report and I am obviously missing something very simple.
My Report:
I have set it up with a parent group, child group, and details.
I need a darker or thicker line between each parent group instance (Every time the Company Name Changes).
At the moment it Renders like this:
with all the borders the same around every cell.
I have tried the suggestion from https://stackoverflow.com/questions/12617953/border-formatting-of-ssrs-row-group/12619892#12619892
(post with suggestion to add extra row outside of group with a border and remove
borders from details) but ended up with thick borders around all cells.
I Tried selecting the Row Group and adding the following into the Border
IIf(Fields!Name.Value=First(Fields!Name.Value,"Tablix6"),"Solid","Nothing")
(added to BorderStyle Top)
IIf(Fields!Name.Value=Last(Fields!Name.Value,"Tablix6"),"Solid","Nothing")
(added to BorderStyle Bottom)
This generated an error message that the Iif statement could not do that many Options.
I tried the codes with different colours in the BorderColour just in case I was unable to see the difference in the rendering and with different thicknesses by altering the "Solid" to a colour/pt.
I also tried with Previous instead of Last but that also generated an error message around 'Previous not being supported'.
There are a lot of posts that suggest adding a group footer and adding the border to that and then minimizing the size of the group footer but I just cant seem to find how to add a group footer. I cannot seem to get that as an option in the drop down menus.
I have looked at so many different posts on different sites that I now cannot see the wood for the trees and really don't know what to try next. Please could anyone suggest where I have gone wrong.

SSRS border lines with different colors not overlapping properly

I have a user-designed report that I am trying to replicate in SSRS, the report has a table with a default border color (Gray).
I need to draw a black line through one column, this adds the effect of separating the columns that lead up to the final column.
The problem I have is that the black line is not consistent but looks "split up" by the grey border of the table(and its cells).
The control used is a Tablix.
The workaround we have is to make the whole report color black or gray, but I'm just asking this to see if there is a way to implement different colors in an aesthetic way.
You can fix it by removing thick border and adding a BLANK column where you want the thick line.
Make the width of the column as per your requirement and make the borders to none for these cells (of blank column added). You may play with your left and right cells (it can be done). also, You should make the Can grow and Can shrik to False and True respectively.
If you want complete dark line (as shown), you may get an exception on the last row of the border for this particular added column. You can create a Report variable and keep the totalRecordCount and use it in expression of down border. Hope it helps!

How to set fixed colors for series legend?

I am using Telerik Reporting and creating reports with Report Designer.
What I want to do is set fixed colors for specific series elements.
For instance, in a monthly financial bar chart, if the series is Company, I want to set ElectricityCost as red and WaterCost as Blue all the time. The problem is that not every bar has all types of the cost, and for a specified time range, not all types will be included, which causes that the color legend varies.
I've tried some approaches but failed.
Is there anyone who knows how can I achieve this goal?
Finally I find how to set the color for specific series.
The data points' color can be set by using the Graph.Series.BarSeries.DataPointConditionalFormatting property.
The legend markers' color can be set by using the Graph.Series.BarSeries.LegendItem.MarkConditionalFormatting property.
Besides the color, other styles can also be set so that for a certain series, the style will not change even no data is displayed after the filtering.

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.