Hello,
I'm having a problem with my report, the problem is:
I have two months for each records in my "Saldo" field, 1 and 4, the "Saldo" for month 1 is null, but the "Saldo" for month 4 isn't.
I need to retrieve each value of "Saldo" according to my group.
What I'm trying to do is:
(Formula names in bold)
====================================== REPORT HEADER ===============================
@Start (this one is supposed to declare the variable)
WhilePrintingRecords;
numberVar saldoTipo2_1Quad;
@Increment (this is supposed to increment only if the month is 4)
WhilePrintingRecords;
numberVar saldoTipo2_1Quad;
if (IsNull({Resultado_Primário.Assunto: LRF\Relatório Principal\Dcl V03\Mes Referencia})) then saldoTipo2_1Quad
else
if ({Resultado_Primário.Assunto: LRF\Relatório Principal\Dcl V03\Mes Referencia} = 4) then saldoTipo2_1Quad := saldoTipo2_1Quad + {Resultado_Primário.Assunto: LRF\Relatório Principal\Dcl V03\Saldo}
else saldoTipo2_1Quad;
===================================== REPORT FOOTER =================================
@Reset (This one resets the variable to 0)
WhilePrintingRecords;
numberVar saldoTipo2_1Quad := 0;
//////////////////////////////
Or either I get non-sense values (A sum of all values for that group) or I get a 0 or the first group gets a 0 and the second comes with the value which was supposed to be in the first group.
Thanks in advance, I hope you can understand my problem.