Renoir,
This is just an idea, I don't know if it will work or not. Have you try to set a variable by running an expression "on exit" of the detail band (or group footer band) I suppose this variable will be available with it's value on header band for the next record, until the next "on exit".
HTH
Diane Robitaille eng.