Skip to main content Skip to footer

Extending Borders/Vertical Lines of SubReport in MainReport

Adding vertical lines in C1Report was one of the implementation that was many a times queried/asked by our customers and has already been discussed in the following blog : http://our.componentone.com/2012/01/20/adding-vertical-and-horizontal-lines-in-c1report/ In continuation to it, this blog deals with a different scenario. There might be certain situations when we have more than one report. The MainReport is just the layout and the actual content along with the vertical lines are present in the SubReport. And, the requirement is to extend these lines (down) of SubReport to meet with the Page Footer in it's MainReport. Similar to adding lines in report, there isn't any direct method to achieve the same. Discussed in this blog is the workaround to add borders around the SubReport that extends till the PageFooter of the MainReport and also extending vertical lines of SubReport till the end of the page.

Adding Borders around the Subreport in MainReport:

  1. Add the Subreport in the MainReport
  2. Draw a rectangle around the subreport field in the MainReport.
  3. Set the left and right (ie the width) co-ordinates of the rectangle in sync with the co-ordiantes of the subreport.
    1. Left of rectangle = Left of Subreport in MainReport
    2. Right of rectangle = Actual width of Subreport
  4. Also set the following properties of the rectangle :
    1. CanGrow : True
    2. Anchor : Bottom
  5. Preview the report

Extending Vertical Lines of SubReport in MainReport:

  1. Add the Subreport in the MainReport
  2. Draw a vertical line over the subreport field in the MainReport
  3. Set it's left co-ordinates in sync with the left co-ordinate of the line present in the subreport. ie.
    1. Left of line in MainReport = Left of line in SubReport
    2. Height of line in MainReport = Height of SubReport field in MainReport
  4. Also set the following properties of the line :
    1. CanGrow : True
    2. Anchor : Bottom
  5. Preview the report

The SubReport with borders and extended vertical lines will appear as shown below in the MainReport : a. The borders, ie. the rectangle is in red colour b. The extended vertical line is in blue colour You may download the sample report definition file. Download Sample

MESCIUS inc.

comments powered by Disqus