Adobe Forms: Fancy Footwork – Footer floating at the bottom of the page
Sometimes a simple concept is not so simple to implement. This is what I found out when looking at doing floating footers in an Adobe Form (SAP IFbA).
The problem:
To display a footer that is always shown at the bottom of the last page on a dynamic form.
Figure 1: Conceptual examples of floating footer
Like I said, it sounds simple enough. On first thought I went straight to master pages and created a master page with the footer on it – but wait, If I make a ‘normal’ master page and a ‘last’ page with the footer, how do I tell LiveCycle Designer to use the ‘last’ page on the last page? And what if the first page is the last page as well (i.e. only 1 page)? Of course the little devil on my shoulder is saying “just script it”, but surely there is a better way. Googling this I found some Adobe blogs giving a solution that involves a spacer element, but this also requires scripting to determine it’s height at runtime. Once again I am thinking, surely not...
The solution:
I did end up finding a solution that involved no scripting. Essentially using a separate content area on a single master page to hold the footer where I wanted it to go. And just a little trick to make sure that the body of the output doesn’t end up going underneath it. In the method section below I will go through an example that will give you the details.
The benefits are the fact that we have zero scripting (helps with performance and reduces overall complexity of the solution by reducing development components – especially for output (non-interactive) scenarios where we can generally get away without scripting (usually).
The method:
For the sake of expediency I will use the standard test Adobe Form scenario FP_TEST_03:
- Go to transaction SFP and create a copy of Form FP_TEST_03_TABLE to ZFP_TEST_03_FOOTER
- Select edit for the new form and go to the Layout tab.
- Go to the Master Pages tab of the Designer
- Delete the ‘Page2’ Master Page Set – this will just complicate things (see considerations section below)
- Drag and create a new Content Area from the Standard Object Library
- Change the name of the content area you created to ‘footer’, and position it at the bottom of the page. You must also make sure the height and width are big enough to include the Greeting subform. 2.5cm height and 17cm width should do it.
- Go to the Design View tab
- Select ‘Greetings’ in the hierarchy
- (optional) change formatting of StaticText7 – I did this just to make the change more obvious
- Select the Object palette and the Pagination tab within it
- On the ‘Place:’ attribute select ‘In content area’ -> ‘footer’ which is the content area we just created
- Select ‘Main’ page subform in the hierarchy
- In the Object palette choose the Pagination tab and set the ‘If Dataset Must Be Paginated: Overflow:’ to ‘Go to Content area “Titelseite”’. This will make sure that the main content doesn’t flow into the footer content area.
- Add a subform that is the same height as the footer content area. In this case 2.5cm. This will make sure that the main flowed content does not go behind the footer content area.
- Activate the form
- Test the form (These tests require the flight data set up in your system. You can use report SAPBC_DATA_GENERATOR for that)
- Execute standard ABAP report FP_TEST_03 with the following parameters:
Considerations:
The main limitation of this solution is if you need more than one master page. In this case it is easier to concede to using a simple script that will show your footer only on the last page.
Conclusion
Hopefully this solution may be useful to you in your dealings with Adobe Forms. In the end it should also help to improve your understanding of working with flowed layout and Master Pages in LiveCycle Designer.