2

I wish to include a vertical line on every page of my report, which runs from the top to bottom of the report body. How can I achieve this?

I've tried using RepeatWith, but it doesn't seem to work, the line appears only on the first page.

Thanks

yomayne
  • 111
  • 2
  • 4
  • 11
  • Interesting question. I had never used RepeatWith, and [it seems it's broken for the purpose you want it for](http://connect.microsoft.com/SQLServer/feedback/details/349132/repeatwith-not-working-when-printing). Perhaps someone can provide an alternative, I can't personally think of any (yet). – Jeroen Jun 19 '12 at 18:58
  • Try setting RepeatOnNewPage to true also, that should resolve the issue for you – Michael A Jun 21 '12 at 07:19
  • Michael, the Line control does not have a RepeatOnNewPage property – yomayne Jun 21 '12 at 11:12

2 Answers2

0

Is this for look and feel purposes only?

I would create an image with such line and use it as the body background. Or if you're using a tablix that spans across multiple pages, another idea would be to create an empty column on the tablix with a border on the left side.

And yet another idea would be to use a rectangle with a left/right border and place all your tablixes inside the rectangle as this would make the rectangle to be expanded to multiple pages keeping the border (the vertical line) on your report.

I don't think that you can tell SSRS to automatically repeat lines on multiple pages.

Joao Leal
  • 5,533
  • 1
  • 13
  • 23
  • I need the vertical lines to mark column separations. The empty column on the left side will not work, as the column will only expand with the table. So there will be a gap if the table height is smaller than that of the body. I tried image background, but there are issues. The line width does not match properly with that in Report Builder. There are issues with distances, plus the trouble of using an additional program for managing report background. – yomayne Jun 28 '12 at 16:48
0

I've figured out a way to solve that problem (without using RepeatWith, RepeatOnNewPage or Report Background Image)

I wrote a simple code to add blank rows to the table in the body. The number of rows to be added will be determined by the body height and the height of a row.

For example, if the body height is 6" and height of a row is 0.5" then a total of 12 rows can be fitted into one page. So if your table has 4 rows then add 8 extra black rows so as to make the table height equal to the report body.

If the number of rows is more than 12, say 15, then you'll add [12 - (15 mod 12)] rows , i.e. 9 blank rows.

And you can have side borders on any of the columns as required, resulting in a vertical line running throughout the page.

yomayne
  • 111
  • 2
  • 4
  • 11