Absolutely page-bottom alignment on "report footer": Impossible?
Relative newb to SSRS here, but the answer to this question evades me; answers and insightare appreciated. Report in question is an invoice form. It requires an absolutely bottom-of-page aligned footer that has databound elements. This isso that whatever page that footer finally appears on will print in such a way that the address will align in a windowed envelope. Ironically, Books Online gives this exact scenario in explaining headers and footers in SSRS, but they cleverly don't explain how an absolutely bottom-of-page-aligned and data-bound footer can be made to happen. Headers at absolute page top is obviously no problem. Footers at page bottom, not so much. So, this is not a "page footer"--page footers are employed in the body. Also this footer is databound, so a page footer as it's known in SSRS is out the window anyway. Most of the time this will print on a single page, but if it breaks to multiple pages, that footer needs to go all the way to the absolute bottom. I grasp that the "report footer" for SSRS is just what appears at the end of any repeating controls that you've implemented in your body. Because SSRS uses this kind of repeating-control based idiom rather than a section-based idiom as Crystal does, this kind of (what I would consider very basic) positioning control is looking fairly impossible right now. Among whatI've tried: --Page footer (can't; databound) --Specifying a page break after the pre-footer controls, and/or a page break before the controls that make up the footer in their properties. This leads to unpredictable results with blank printed pages (as many as 8 for what previews as a 2-page report, how silly is that?). --Putting in apage-height rectangle as part of the footer (with and without the page breaks mentioned above), with the idea of forcing a basically blank page at the end of the report so that the footerwill go to the bottom.SSRS will go ahead and break the page anyway on long elements like that, which again leads to the "footer" being printed in the middle or top of the final page, or whereever it happens to fall. I may be having to explain to my client that you can't get there from here, and they may have to redesign their report. Does anyone have any insight? Thank you for your time in reading this.
March 21st, 2007 2:11pm

Hi there Matty, I think i got the idea that you want to print out the address of the customer at the bottom of the page (ideally the report page footer) but it won't allow you to have any databound values because the databound values are only for the body right ? If that is the case, there is a common way to get around this. This is what I do and it does work. Make a couple of textboxes (tb1 and tb2) in the Body of the report. Set the Hidden properties to True for the textboxes. Next, dragorcode into the tb1 and tb2 the dataset values; Name or address or whatever. In the report footer or page footer, Set your textboxes and named themtbName and tbAddress.in the expression builder for tbname, put this "=ReportItems!tb1.value" and in tbAddress put "=ReportItems!tb2.value" When yourun the report, tb1 and tb2 will beinvisible (you can even send them to the back,hiding behind the table or something, but always make sure that the Hidden property = true). yet your page footer should have the values assigned to them. I hope this helps and is according to what you are trying to describe. Bernard Ong
Free Windows Admin Tool Kit Click here and download it now
March 21st, 2007 4:14pm

Kind of. The method you describe is pretty much what Books Online says about it. Key to the problem here is that this footer should only appear on the last page, which you get around by examining the page number using hidden fields as you describe, then making it visible as needed. Problem is, though, that SSRS appears to 'reserve' the space for the header or footer whether it's visible or not, or you've specified Print On Last Page/First Page or not. It just doesn't render elements in that region but it does save the space. This particular "footer" is literally 1/3 of a portrait page, so I can't have that kind of blank space being held on pages where it's not in use. I've also noticed issues in preview when you have invisible elements in use; although it'll print OK, the display is wildly off. Very much appreciate your response, though. If you had a workaround up your sleeve for these additional issues with that method, then I'd be golden! :D
March 21st, 2007 5:09pm

As you said,set PrintOnLastPage=true for page footer and then use top padding to print it at the bottom of the page. You can also use expression to set the passing. Shyam
Free Windows Admin Tool Kit Click here and download it now
March 22nd, 2007 1:25am

Thank you, but unfortunately that also does not address the space reservation noted above that is critical to this particular use case. Use of the page footer here as the report footer denies it from a differently-formatted use inthe report body when it spans pages, andit alsocauses the space to be reserved on the body pages; this particular report cannot use just 2/3s of the page on every page besides the last one.
March 22nd, 2007 6:08pm

I too have a business requirement to put 'footers at the bottom'and have found (like a lot of others here) that SSRS doesn't make this easy using the built-in footer section. The real show stopperis that once you declare the size of the footer sectionat design time, that's what you get on each and every page. The breakthrough for me was to recognize that footers as I needed them are really report content. When I took that approach, it became a solvable problem involving three items:the preceding content, the offset, and thenotes (as I call them so as not to be confused with SSRS footers). The offset isimplemented as asubreport that has an invisible, variable length table. The length of the table is determined by aparameter, cleverly called the 'offset'.The invisible tableacts as filler between the preceding content and the notes so that the notesare bottom justified. Thereport gets the offset parameter by calling intobusiness logic thatuses: the data for the preceding content, thedata for the notes content, the page layout, and the starting position of the preceding content to calculate the table length so that the notes arebottom justified.
Free Windows Admin Tool Kit Click here and download it now
September 24th, 2007 12:07pm

@ tnx1, I tried inserting a sub-report with an empty table. But I didn't totally get your point when it comes to passing the "length of the table" as parameter. I defined a parameter for the sub-report, but how exactly do you pass the parameter from a report to a sub-report? I was trying to do all this in preview mode. And how do you get the value of the "length" of the column in the main table? Thanks.
February 12th, 2008 5:09pm

The tricky thing is how to calculate the "table length" since maybe some fields is ntext and the content will be wrapped and take several line space while the report rendering...I use a "can grow" textbox to do the same trick by calculate how many CRLF I need to put in the textbox but I still have no clue... how to calculate the fields with wrapped content.
Free Windows Admin Tool Kit Click here and download it now
October 28th, 2008 1:15pm

I have the same problem here , does anyone have a workable solution?If there is a textbox in the table with Can Grow set to true, how do you calucalate the length of preceding content?
March 7th, 2010 9:03pm

This is just an idea, off the top of my head, but perhaps you can do the following: Make the following code changes Dim HeightSoFar As Decimal Dim LastLoggedPageNo As Integer Public Function LogHeight(NewHeight As Decimal, NewText as String) If Globals!PageNumber <> LastLoggedPageNo Then HeightSoFar = 0 End If HeightSoFar = HeightSoFar + NewHeight Return NewText End Function Then make one textbox in every line on your report use =Code.LogHeight(txbWhatever.Height,MyValue) instead of =MyValue Then HeightSoFar will contain what you can pass to your subreport. Disclaimer: I'm incredibly new at SSRS :) We've gotten to using it as part of NAV 2009 and data-bound page-footers are used and requested often.
Free Windows Admin Tool Kit Click here and download it now
April 14th, 2010 4:18am

October 11th, 2010 12:11pm

Was a solution ever found for this issue. I'm trying to do the same thing. I'm new to SSRS and I need to set my bill stuff at the bottom of the page due to perforated paper being used when printing. I'm grouping and using a group header and footer. Susan Solved my issue: Reference Thread: http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/413bdaa9-a579-4461-8e51-e90233939edb
Free Windows Admin Tool Kit Click here and download it now
February 26th, 2012 3:18pm

So, tnx solution seems fine, but w/o screenshots or steps I"m assuming that it's an idea not proven out. After reading I was perplexed as some of the other readers...sort of consider that a non-solution at this point. What I came up with was something much more palatable - if you read http://technet.microsoft.com/en-us/library/dd239352.aspx they mention the use of rectangles to create artificial borders inside of a report. I took a rectangle and dragged my tablix inside of it; from there I tweaked and hacked a bit until I got the length of it to correctly place a footer regardless of the number of rows returned in the dataset. Also used a nice tip from here for report and body width. From this, I can create a template for use with future reports to keep the ubiquitous floating footer from returning. Look for some screenshots and blogs at my SQL blog located at http://www.texastoo.com in the next few days. Thanks Lee Everest http://www.texastoo.com
May 25th, 2012 2:15pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics