Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Page total

Former Member
0 Kudos

Hi Friends,

I have created a form using Smartforms. The main window is having Header, Main Area and Footer. In the footer, i am printing the page total. The problem I am getting is that, in the subsequent pages, it is printing the total of all the pages. I want to print only the current page total in all the pages. Kindly guide me to do this.

To get the total, i have declared a variable in Global Definitions and in the table part under the calculation tab I am assigning the value of the required field to the variable declared in the Global Definitions and finally, I am calling the variable (declared for total) in the footer part.

Second thing I want to know is that, how to create an additional row in the main window table like Header, Footer. I want to create similar one for getting the grand total.

Kindly guide me to do the above.

TIA.

Regards,

Mark K

5 REPLIES 5

Former Member
0 Kudos

hi,

Create a Template for Grand total and display the total in that.

Insert Program lines and check if the page number SFSY-PAGE is changing, if it changes, then reset the page total field, otherwise continue to add the amount figures.

Regards

Subramanian

Former Member
0 Kudos

use system field to get the page number instead of calculating manually.

&SFSY-PAGE& - current page

&SFSY-FORMPAGES& - total number of pages.

In footer select create table line & give ur line type

Former Member
0 Kudos

HI mark,

You need to clear that Variable when the new page is triggers, so at the last in the Footer of the table, CLEAR that field.

If you want the Grand Total, craete a template there and write the code for that one in the program lines

Regards

Sudheer

Former Member
0 Kudos

Refer this

SF_EXAMPLE_01

Simple example; invoice with table output of flight booking for one customer

SF_EXAMPLE_02

Similar to SF_EXAMPLE_01 but with subtotals

SF_EXAMPLE_03

Similar to SF_EXAMPLE_02, whereby several customers are selected in the application program; the form is called for each customer and all form outputs are included in an output request

Message was edited by:

Judith Jessie Selvi

Former Member
0 Kudos

Hi,

Your first and your second problem are actually realted.

I think all you need is you write your Grand Total in the BOTTOM and ENDBOTTOM of your Main Window.

Ex:

/: BOTTOM

/: BOX XPOS 2 CM YPOS '58.2' LN WIDTH '17' CM HEIGHT 0 CM FRAME 35 TW

  • &G_Total&

/: ENDBOTTOM

I think this will be helpful.

Use it in the Main Window.

Award Points if you find it helpful.

Ishaq.