There might be something wrong with the syntax of your datawindow that is causing the painter to choke when saving it. All that happens when you mark an element as starting the detail is that it adds an __pbband=~"detail~" attribute to that element. You can open the datawindow up in source mode and add that manually. It seems to have remained after I did that.