Search
Monday, January 05, 2009 ..:: Forum ::.. Register  Login
 
  Forum  Templates  Tags & Template...   Different Footer for the Last page?
Previous Previous
 
Next Next
New Post 1/23/2008 5:48 PM
  rfligg
43 posts
7th Level Poster


Different Footer for the Last page?  

 Hi,

I need to generate a template which can be a multi page document and the footer in the last page needs to be different from the rest of the pages. So what I did is
1. I have created an RTF and imported that RTF as a footer.
2. In the Footer RTF I have written
<wr:if test='Page == NumPages'>
Last Page Footer
<wr:else/>
Other Pages Footer
</wr:if>
codition, where Page and NumPages are RTF Fields inserted from Insert -> Field.

It throws as excpetion. How can I do this?

Thanks

 
New Post 1/23/2008 5:49 PM
  rfligg
43 posts
7th Level Poster


Re: Different Footer for the Last page?  

The text 'Page == NumPages' does not mean anything to WR. You can have '${Page} == ${NumPages}' but in that case both Page and NumPages must be a variable set either with <wr:set .../>, <wr:forEach ... var=...> or using datasource.setMap().

There is no way to test if you are on the last page. Part of the reason why is because inside your if you could have enough text to add another page.

And you cannot have logic like this in your footer because the footer is created once and then is placed on each page. In formats such as rtf and WordML there is not a footer for each page, the footer exists in one place and is displayed on each page.

To have a different footer, you need to have a section break and then for that new section have a new footer.

 
New Post 1/23/2008 5:49 PM
  rfligg
43 posts
7th Level Poster


Re: Different Footer for the Last page?  

 Hi,

I have created a section break after the last line in RTF and for the new section I have created a different footer. When I run the RTF it does show different footer for the last page but in a "BLANK PAGE". How do I supress the blank page so that it displays different footer for the last page?

 
Previous Previous
 
Next Next
  Forum  Templates  Tags & Template...   Different Footer for the Last page?
Membership Membership:
Latest New User Latest: GrahamA
New Today New Today: 0
New Yesterday New Yesterday: 0
User Count Overall: 56

People Online People Online:
Visitors Visitors: 1
Members Members: 0
Total Total: 1

Online Now Online Now:
All contents copyright (c) 2002 - 2008 by Windward Studios, Inc. All Rights Reserved.   Terms Of Use  Privacy Statement