I have a simple SSRS report with a Tablix and various groupings (1 column grouping, row groupings below)
Groupings:
Group 1
-- Group 2
---- Group 3
------ Group 4
-- Adjacent Group 2
---- Adjacent Group 3
I am trying to implement a conditional border and while it works exactly as intended in Dev, after deployment and even exporting to PDF however, when I export to excel (where it needs to be) it does the following:
The first Group1 grouping displays the border in the correct position (between group 4 and Adj Group 3) however, when exported this is the only grouping that appears correctly. The second group of Group1 places a border on the bottom of every row regardless of the condition.
Now I originally had a conditional statement to perform this however, during my debugging exercise I removed this and placed the condition in the query as a returned column in the dataset (so each row will indicate whether the border should be "Solid" or "None") however, this displayed the same problem. I have changed this value to a static "Solid" and "None" in the query and it shows correctly which makes me assume that there is some conflict with changing the borders.
It is sort of like once the border is turned on it remains on.
Here are the settings I am currently using for the border:
I have moved this border value to the cell below it and placed it on Top rather than bottom and it produces:
This is the first Group1 group which seems to further support the idea that "once it is on, it stays on".
I have done some searching and have yet to find any conclusions. I have seen some bizarre responses to similar problems such as "It is because you have an expression in one setting but the rest are static, change the rest to ="Solid"" which sounds like a remedy to hiccups.
Any help would be greatly appreciated; I have run out of ideas on how I can make this border without some crazy workaround like adding a row or rectangles.
Thanks for your time.
I am still interested in a solution to this problem but to meet deadlines I used a workaround.
If anyone has a problem like this what I had to do was to make an adjacent group to group 4 that was a duplicate of this group i.e. group 4 and the new adjacent group had the same grouping expression. Then I set the border to solid on the bottom of this new group and altered the visibility of both groups to hide/show the necessary rows. In other words, make a group solely for the row that required the border.
I faced a similar issue where in I was defining conditional borders as Solid /None and the "None's" were also showing up as solid when exporting to excel. I changed the borders to all Solid (Default = Solid) and instead changed the border color to White where I wanted Border to be None and Black where I wanted it to be Solid and it seemed to work pretty fine, even with excel export ( I didn't check it with other exporting formats though). Let me know if it helps.
来源:https://stackoverflow.com/questions/32972277/exporting-conditional-borders-to-excel-in-ssrs