Application Development and Automation 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: 
Read only

end of program

Former Member
0 Likes
866

hi experts,

I have writen a program which is calculating sum of variables.i am passing it to my scripts for printing it.when seeing preview of the report it is coming properly but when i see it for the second time or taking print out the tot variable is adding continuously .so i need a command which should clear the tot variable at the end of the progrm.

how shall i proceed with this.

regards,

manikandan

hi experts,

I have writen a program which is calculating sum of variables.i am passing it to my scripts for printing it.when seeing preview of the report it is coming properly but when i see it for the second time or taking print out the tot variable is adding continuously .so i need a command which should clear the tot variable at the end of the progrm.

how shall i proceed with this.

regards,

manikandan

4 REPLIES 4
Read only

JozsefSzikszai
Active Contributor
0 Likes
754

hi,

"i need a command which should <b>clear</b> the tot variable at the end of the progrm."

you've just found it, it is the CLEAR statement.

CLEAR variable.

hope this helps

ec

Read only

0 Likes
754

hi eric,

i can use this statement but i have three line items .and i need the total of each .i am using it thru perform statement .

if i use the clear statement then i will be getting only the 3rd value .

so i have to clear the variable only after the progarm is completed .is there any event .

like end of program?????

regards,

mani

Read only

0 Likes
754

just place it as the very last statement in your program. as event there is end-of-selection, but can you copy your code here and telling where is the problem, than I can give you better hints.

Read only

narabio
Explorer
0 Likes
754

Hello manikandan,

I think that the CLEAR for the variables, if needed, must be done at the beginning, not at the end of the program.

If the program is adding continuosly, this means that at some point, the program is executing the total calculation again. What I say is that the CLEAR instruction must be placed before this total calculation.

Hope that helps,

Narcí