2007 Dec 12 10:12 AM
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
2007 Dec 12 10:15 AM
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
2007 Dec 12 10:25 AM
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
2007 Dec 12 10:29 AM
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.
2007 Dec 12 10:50 AM
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í