Hi everyone!, I'm a bit new to Crystal Reports and having a big problem (at least big for me)...I need to get a last record field from the detail section and show it in the header section. I'm using the following two simple formulas:
//------------------------------------------------------
Header section:
//Formula1 (just for showing the variable got from Formula2)
whileprintingrecords;
shared numbervar Saldo;
//------------------------------------------------------
Detail section:
//Formula2
whileprintingrecords;
shared numbervar Saldo;
if onlastrecord = true then Saldo:={spKardex_CodZOFRI.amount};
//------------------------------------------------------
Ex. for a 4 records dataset:
1- 255
2- 122
3- 69
4- 56
I'm always getting the first amount (in this case 255) but I need the last one (56) on my header section.
What am I doing wrong??? thanks in advance
//------------------------------------------------------
Header section:
//Formula1 (just for showing the variable got from Formula2)
whileprintingrecords;
shared numbervar Saldo;
//------------------------------------------------------
Detail section:
//Formula2
whileprintingrecords;
shared numbervar Saldo;
if onlastrecord = true then Saldo:={spKardex_CodZOFRI.amount};
//------------------------------------------------------
Ex. for a 4 records dataset:
1- 255
2- 122
3- 69
4- 56
I'm always getting the first amount (in this case 255) but I need the last one (56) on my header section.
What am I doing wrong??? thanks in advance