views:

223

answers:

1

Hi,

My SSRS report is using groups to devide the data in group. I would like to have a line seperator at the last row of the group. I did hide the group footer and header since it gives me an extra row when render the report to excel, So the bordering of group header or footer for this is not working. I wanted to avoid the extra rows in excel.Is there any other way i can try to get this done.

Your help would appreciated.

Thanks in advance Brijit

A: 

Probably the most powerful thing about Reporting Services is the ability to use expressions for any object property. Couple this with the out-of-the-box Previous function which allows you to access the previous value of a field and you have a solution.

Select the entire Detail row. Expand the BorderStyle property and enter the following code for the Top property (assuming we want a line separating all the departments):

=IIF(Previous(Fields!Department.Value) <> Fields!Department.Value, "Solid", "None")

This compares the previous value of the Department field with the current value and if they are different, it makes the Top border of this detail row to be Solid.

While this puts a line at the top row of next group rather than the bottom row of the previous group, it is visually and functionally equivalent to what you are after with the benefit of being really easy to implement.

Chris Latta