Hi Fran,
Better use onafterfetch event of aggregate .create a local variable and assign the value on onafterfetch event and bind that variable to button visible. This will ensure that correct value is bind to the visible property of button.
Best Regards
Devendra