C# Reporting anchor to bottom

anchor, c#, rdlc, reporting

Solution

My answer is a year late, but maybe this will help someone

Had a similar problem while printing an envelope cover with a title at the bottom. I found questions like yours, but no answers. After banging my head for a couple of hours, i've got it.

Keep the controls with variable heights in a rectangle & make the rectangle as lengthy as you wish and keep the other controls (which you wish to print after a variable gap) below the rectangle - Check the image below

Now, if the 'CanGrow' controls inside the rectangle grows, it does so without pushing the controls outside the rectangle. But beware, if the controls grow beyond the size of the rectangle, then the rectangle will grow & push the rest down.

That's it. But Wait!!! I moved this report from VS 2008 to ReportBuilder 2 (& 3) and this did not work. After pulling my hair for another 2 hours - here's the issue

Select the Report (not the body) and set the 'ConsumeContainerWhitespace' property to True for this to work. Whitespaces are consumed both to the right & bottom within a container - I guess this is the default & only behavior in VS 2008 & VS 2005's report runtime.

-I've been developing on the .Net platform for the past 6 years, comfortable with almost everything, but this damned fine reporting component never fails to annoy me!

Problem

Here's something I've not been able to solve. We've moved over from FONET to Reporting to provide decent PDF exporting and printing. There's no (free) way to print generated PDF's we could find without using an outdated version of Adobe Reader, and we can't install a third party program everywhere. We are making invoices this way, with a variable numbers of invoice lines (which are variable in height too), and an optional remark. This in a subreport. At the bottom of the last page, we want the totals without VAT, the total VAT and the totals including VAT. When there is no VAT in this invoice, these lines are hidden. However, there is no way we found to anchor these totals to the bottom of the last page. We are already using the footer to show something on each page, and abusing the header to show the column headers for the invoice lines, as the row headers are not repeated on the next page. What we've tried: - We've tried adding a footer to the invoice lines subreport to show this, but this can't contain a Tablix and doesn't show. - Adding whitespace between the invoice lines and totals only works with a few invoice lines. When more than 4, it places the totals on the beginning of the next page. Removing the whitespace places the totals right after the invoice lines, while we want it at the bottom of the last page. - We could work around this in FONET, by using an absolute table, but we have not seen this possibility in Reporting. - We would use another system if it's simply not possible. We need something which supports designing, tables which can be populated with DataSets or IEnumerables, anchoring, embedded images, direct printing and exporting to PDF. Localization (strings based on language using default resource files) support would be a huge plus. Thanks in advance, Nick

Original source