I am having some issues with Report Builder 3.0 and VS2012 in creating a invoice-like report that contains a fixed-sized section where detail rows will display. This section must be of fixed size so that each rendered report page will fit in a specific space regardless of the number of items. Items that would not fit then print on a new report page with the header and footer repeated.

I am not able to accomplish making the detail area a fixed-size. After searching for help and only coming up with some old (and unanswered) MS TechNet questions, I took the advice of this TechNet article which suggests using a rectangle inside of a tablix cell, then placing a detail tablix inside of the rectangle to achieve this effect.

This practice does allow me to add any amount of whitespace to the report, but it does not remain a fixed-size. On rendering the report, the rectangle will increase in size for each detail row (even though the rectangle is already big enough to fit the row), resulting in anything below the rectangle to be pushed onto new and unwanted pages. The rectangle doesn't have a "CanGrow" property to prevent this.

I have tried setting the "CanGrow" property on the detail tablix cells to "false". This only limits the actual cell from applying text wrap and expanding to fit cell contents; it doesn't appear to affect the rectangle. I have also set the "CanGrow" property on the parent tablix cell to "false", but this has no effect. Incidentally, I found that when I add a rectangle inside of the parent tablix cell, the "CanGrow" property will reset to "true".

To rule out an issue with Report Builder, I attempted to create the same report in VS2012 (as a .rdlc). I encountered the same design problems.

I have four questions:

  • Is this the correct way to go about creating the effect I need?
  • If so, what part am I missing?
  • Is there a another solution?
  • Are SSRS reports capable of this at all?

Here's a visual example of what I'm trying to create:

visual example

有帮助吗?

解决方案

To fix your issue you should change the ConsumeContainerWhitespace property of the report to True.

ConsumeContainerWhitespace Link


This will also fix white-space problems with reports created in SSRS 2005 as in this version whitespace was automatically consumed.

See SSRS 2008R2 changes

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top