cancel
Showing results for 
Search instead for 
Did you mean: 

I want a footer only after the end of MAIN

Former Member
0 Kudos

I want the footer to be dynamic - if the details flow to another page (and there could be many overflow pages) I only want the footer to be printed when the MAIN is completed.

setting the output options to "only after the end of main" does not work.

can someone tell me how to set this?

please i have debugged for days and tried many things

the main section has a table - and wont let me place a conditional logic within it.

please and thanks,

Julia

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Julia,

Add a footer window and add condition as SFSY-PAGE = SFSY-FORMPAGES.

This will check that its last page and will print the footer.

Hope this will help.

Dhiraj.

Former Member
0 Kudos

Dhiraj,

Your approach worked best for my form.

But i added some extra - for my form i have a constant last page with my company terms and conditions.

I want the footer to be printed at the end of main - on the last page prior to the company terms and conditions page.

I added program lines at the end of MAIN window to set my page counter to be

IF sfsy-formpages > 1

z_page_cnt = ( sfsy-formpages - 1 )

else

z_page_cnt = sfsy-formpages

endif.

and then on my footer window i check to see if the current page is equal to my page number.

.

thanks again to all who helped - and BTW you can't add a text window inside of the MAIN table area - at least that purposed solution sounded good to me and i tried it - but could never get it to work.

Thanks !

Julia

Answers (5)

Answers (5)

0 Kudos

Please close the thread if your problem is resolved.

Former Member
0 Kudos

HI,

Create the text element which should be last in the main window.

Example:

Main Window

- Table Element

- Footer (Text Element)

in this case after printing everything Footer Text element is printed, logically at end of the main window.

0 Kudos

Hi,

When u check the option 'Only after end of main window'.

Check whether u have followed this:

1. The Footer Window should be drawn after the Main window.

2. The Name for the Footer Window should be displayed below the main window

Ex: Title Window

Main Window

Footer Window

Regards,

Sathish

Former Member
0 Kudos

hi,

1.I think take the footer in a window under it a template and text.

2.Window type of that window shud be main window.

3. Check height of the main window and template which u have created.

regards,

sri

former_member186741
Active Contributor
0 Kudos

Set up two different pages, FIRST and NEXT. The two pages can be identical apart from NEXT not having the footer window.

oops, Sorry, I've just realised that you only want the footer on the very last page. I'm not sure how you can detect when the last page has been reached.

There is a system varaible called &nextpage&. The help says "Note that on the last page of the output, in each window that is not of type MAIN, &NEXTPAGE& has the value 0."

I think that this means that if you have a window called footer that tests this value you can get your logic to kick-in when &nextpage& = 0!