简体   繁体   中英

Using an Expression for Border Style in a Tablix in SSRS report

I have an interesting dilemma with an SSRS report that the powers that be have decided needs some extra styling.

I basically have a column group that I need to have a bold border around. In the picture below, I need to have the lines I've drawn in red be larger (so setting their width to 3pt font):

示例截图

The second pictures shows the construct of the tablix that makes up the graph. The column groups are broken down into ClassroomMeasure (the lowest level) and ClassroomMeasureType (the header above the ClassroomMeasure and the group on which I need to have a thicker border). I tried setting the border expression to:

IIF(Fields!ClassroomMeasureType.Value = Previous(Fields!ClassroomMeasureType.Value), "1pt", "3pt")

But this gave an error:

"The use of a Previous aggregrate function in a TablixCell is not supported."

Now I suppose I could work around this by checking for each ClassroomMeasure (the lower group) that is ordered at the end of each group and setting its border but there are about 200 of these across every version of this report and that would be a huge headache.

Any ideas on how I could achieve this programatically?

This could be done by adding a column inside the ClassroomMeasureType group adjacent to the ClassroomMeasure group, splitting the header cell and then making that column 2pts wide and black.

To do this, you would right click on the <<expr>> cell for the ClassroomMeasure group and select 'insert column - inside group', then right click on the ClassroomMeasureType header and split cell. Then there would be a new column that would appear in the places you want a thick border, so make it very narrow (ie 1pt) with a thick right border.

This would, however, come out as an empty or hidden column if you export to excel, which might be undesirable.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM