How to center the report title in RDLC file

rdlrdlcvisual studio 2010

I am trying to center the report title placed within report header on RDLC matrix report – this should have been quite straight-forward but I am struggling to achieve it.

I am using VS 2010 (SP1) report designer to edit the RDLC. The report is quite simple – it contains report header with two text-boxes and body containing matrix (cross-tab) report. Out of two Report Header text-boxes, one is used for display static report title while other is used to display the single report parameter.

The report content is as I want except I am unable to center the report title. The title get centered within the text-box width but I could not find a way to say that text-box should spawn entire page width. I cannot set text-box width to the page width because

  • if text-box width is set more than matrix width by say x inches then when report is rendered, content width gets enlarged by x inches from a rendered matrix resulting in page-width overlap.
  • it will need re-setting the text-box width if margins or page-size is changed

Best Answer

And a year and a half later... I used your solution but then found another one: Clicking on the empty area of the report there is a property called ConsumeContainerWhitespace. It indicates wether white space to the right and below a matrix (or any content that can be resized) should be preserved. Might have other side effects though. When the report gets wider than the page it looks like this in the viewer: Matrix larger than page width This will be printed on two pages and on each one the title will be centered.

Related Topic