This is a migrated thread and some comments may be shown as answers.

Help implementing custom logic with borders and page breaks

2 Answers 36 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 12 Aug 2013, 10:08 PM
Hi all,

I'm hoping someone could tell me how to implement some custom logic around page breaks & borders in a telerik report.

Please see the attached "output screenshot.png". The issue should be obvious - I need to put a bottom border on the top page, and a bottom border on the middle page, at the point that the page has broken.

I wish to be able to tell from a condition (or property on the report) whether the current row in the DetailSection is the final one on any page so I can insert a horizontal line in places like after point 4.2 (top page in screenshot). Using a page footer is not suitable because of situations like after condition 4.5 (middle page in screenshot), where the subsequent item is long so the page breaks further up the page. Unless, there is a way to tell how much of the page has been cleared by the page break, so I would be able to extend the vertical bars down to the bottom?

At the moment, the vertical bar length in each row is bound to a method, which calculates it based on the length of the text, so it appears as one long continuous vertical bar.

Can anyone tell me how to implement this?

2 Answers, 1 is accepted

Sort by
0
Paul
Top achievements
Rank 1
answered on 15 Aug 2013, 08:49 PM
Hi everyone, 

Thought since it had been a couple of days and no one had replied, I'd let you know how I ended up solving the problem.

It was a so called "screw it, I'll cheat" solution; ended up just drawing the lines with a drawing tool, and setting them as the page background image. If anyone else wants to do something similar, that's what you should do.
0
Stef
Telerik team
answered on 16 Aug 2013, 12:28 PM
Hi Paul,

Background image is the right way to go since the vertical line(Shape item) in your original report definition overlaps with other items as far as I can see. Other approach is to use the items borders and add bindings to their Height properties with custom calculations, e.g. if it is the last item in the group and what is the available space. For an example take a look at the attached sample report definition.

I hope this helps.

Regards,
Stef
Telerik

Have you tried the new visualization options in Telerik Reporting Q2 2013? You can get them from your account.

Tags
General Discussions
Asked by
Paul
Top achievements
Rank 1
Answers by
Paul
Top achievements
Rank 1
Stef
Telerik team
Share this question
or