Value zero is reset to Null when PrintChildIfNotVisible option is set in band
Original Reporter info from Mantis: luizamerico
-
Reporter name: Luiz Americo
Original Reporter info from Mantis: luizamerico
- Reporter name: Luiz Americo
Description:
When a field/param returns 0 in a band script and PrintChildIfNotVisible option is set in this band, the field/param is reset to null
It occurs because a conflict between flBandPrintChildIfNotVisible and flHideZeros, both set to $80.
At the end of TfrReport.GetVariableValue, there's a check to flHideZeros. If this flag is set, it returns the null as value.
When a field/param is referenced in a band script, CurView is a TFrBandView and if this band has the flBandPrintChildIfNotVisible flag set, that check will evaluate to true
Attached example. In the master band there's a script that set the band Visible if the field is zero. It will always evaluate to false because of the bug.
A patch is attached. But due to the way the flag is stored, to get rid of the bug is necessary to clear the PrintChildIfNotVisible with the previous version than reset after the fixed version is applied
Mantis conversion info:
- Mantis ID: 29313
- Fixed in version: 1.7 (SVN)
- Fixed in revision: 51791 (#26d94464)
- Monitored by: » nicolagorlandi (nicola gorlandi)
- Target version: 1.6.2