What's the best way to customize the header and footer for printing/print preview?

You can change the header through

GetParam()->GetProperties()->GetDataHeader().StoreStyleRowCol(1, 1, "left aligned text"); 
GetParam()->GetProperties()->GetDataHeader().StoreStyleRowCol(1, 2, "centered text"); 
GetParam()->GetProperties()->GetDataHeader().StoreStyleRowCol(1, 3, "right aligned text"); 

...

footers with ...->GetDataFooter().StoreStyleRowCol