PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → Problems initialization of vars in Report Editor
Problems initialization of vars in Report Editor
Iniciado por David, 06,ene. 2004 16:54 - No hay respuesta
Publicado el 06,enero 2004 - 16:54
I'm trying to count the number of lines in a report, so i'm using a var to
count each time data is read. In the first page it works ok but on the start
of a new page the var isn't reseted, why? Because the first time it doesn't
pass trough "pre-print of BODY" and still got the value of the last line
printed. I've tried to initializate the var in every possible event and i
come up with the same result. After the first page the number of the first
line is the number of the last line of the last page plus one.
Here is some code:

GLOBAL
nOrdem is int

Data Read of Report
nOrdem ++
Itm_Ordem = nOrdem //this is the item wich displays the line number

Initialization of PAGE_HEADER
nOrdem = 0

Pre-Print of PAGE_FOOTER
nOrdem = 0


Does anyone know how to figure this out??!!