Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: Last Page Footer  (Read 15201 times)
Anderson P.
Posts: 82


« on: February 20, 2014, 07:21:55 pm »

I'm creating a report with many rows, this rows are broke in Groups that contains MiniPages. Every report page contains two MiniPages.

In some cases, the information of one group need to be divided in two MiniPages, when this happens i need to display one footer in the first page (that says "to be continued...") and a different footer in the other page (with totals).

My question is, how do i know if the information will continue on a new mini page or if it's single page?

The following code shows me the current page and the total pages of that mini page group, "MiniPage" is my mini page name:
Code
  1. format(getPageNumber("MiniPage"),ARABIC)+" of "+format(getTotalNumberOfPages("MiniPage"),ARABIC)

The problem is that this comand is "trapped" inside a "PageNoBox", isn't there a way to test the "getPageNumber" and "getTotalNumberOfPages" in the "Visibility Contition"? Or is there something like a Section "Last Page Footer"?
Alex G.
Four Js
Posts: 148


« Reply #1 on: February 21, 2014, 08:50:41 am »

Hi,
can you reformulate the question from the point of view of the structure of the data and the required structure of the layout that should be produced as a result? 
>The problem is that this comand is "trapped" inside a "PageNoBox", isn't there a way to test the "getPageNumber" and "getTotalNumberOfPages" in the "Visibility Contition"? Or is there something like a Section "Last Page Footer"?
No, that is not possible because visibility conditions (And all other RTL expressions) are evaluated before the document is broken into pages.
That however, does not mean that your required layout cannot be achieved. Quite the contrary, I strongly suspect that it is a known pattern but I can't tell by your current description which, I think, describes more the solution than the problem.
Regarding the "Last Page Footer" there is a pattern for that but I can't yet tell whether or not it is applicable in your case. The next version will have a ready made "Last Page Footer" section.
Regards,
Alex
Anderson P.
Posts: 82


« Reply #2 on: February 21, 2014, 01:48:15 pm »

Sure thing... Here follows my form structure, hope to clarify if.

The "Rodapé Continua" box is the Any Page Footer;
The "Rodapé Final" box is the First Page Footer;
The "Cabeçalho" box is the Any Page Header;
The "Extrato" Mini Page is the Body;

So this is how it's supposed to work, the main Mini Page will occupy half of the page height and a list will be printed inside the "Extrato", that has a fixed height of 200.

If the list is too long to fit in the Extrato space, it will break to another page, that will repeat the header. If the list breaks and has two pages, in the first page we must print the "Rodapé continua" and the second page must print the "Rodapé Final", if the list has only one page, then we print only the "Rodapé Final".


* untitled.jpg (110.21 KB, 1250x681 - viewed 2256 times.)
Alex G.
Four Js
Posts: 148


« Reply #3 on: February 21, 2014, 03:35:23 pm »

Hi,
>If the list breaks and has two pages, in the first page we must print the "Rodapé continua" and the second page must print the "Rodapé Final", if the list has only one page, then we print only the "Rodapé Final".
Yes, for this you can apply the "Last page footer" pattern.
It goes as follows (From the top of my head):
- Check the option "Hide last page footer" on the parent "MiniPage"
- Unset the "Section" property on "Rodape Final"
- Move the node "Rodape Final" so it becomes the last child of "MiniPage"
If you run this then all pages but the last will have "Rodape continua" at the bottom and the last page will have "Rodape Final" flush under the data.
If in addition you want "Rodape Final" to display at the bottom of the page (and not right below the last row of data) then you need to additionally:
- Set "AnchorY" to "1" and and "Y" to "max" on "Rodape Final"
- If "Rodape Final" is vertically larger than "Rodape Continua" then data rows may be printed into the footer.
  To fix this insert an empty box before "Rodape Final" that has a height that is larger or equal to the difference in height of "Rodape Continua" and "Rodape Final".
I hope that this made sense,
Alex 
Anderson P.
Posts: 82


« Reply #4 on: February 21, 2014, 05:13:38 pm »

Great! I tried out and this solved my problem, never minded the hide footer on last page option before, very useful!

Thank you very much!
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines