cancel
Showing results for 
Search instead for 
Did you mean: 

Invoice Smartforms

brian_richards
Explorer
0 Kudos

Hello,

I have written a bespoke invoice smartforms. The problem I am having is that sometimes the smartform is generating a 'next page' when it does not need to. There is a Footer detail defined within MAIN. The smartform lists the items and then prints the footer detail and then it sometimes prints the next page but with just the general information (i.e logo, title, invoice number, etc). In some instances there is no item information so there is no secondary window expected to displayed on the next page.

My question is, how do I stop this additional page from being produced when there are no items to be displayed on this page? I thought that the 'next page' is only suppose to be generated when it cannot fit the items all on the first page.

Has anybody experienced the same problem? Any help would be appreciated.

Thanks in advance.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

I had this requirement, where the items should be displayed only on 1 page, as it was an Excise Invoice.

If the Items spill over to the next page, I generate an error Pop-up message, thereby stopping the Print-preview processing.

In your MAIN window, put this code to chk the current page no.

if sfsy-formpages > 1.

message 'Items splilling over to next page' type 'E'.

return.

endif.

0 Kudos

Hi Brian,

I had this problem due to the type/size of the fonts in style section.

If your data is near to the end of the main window, you will have this issue.

Try to enlarge the the main window and to test with the same data.

Regards.