You can format the pivot grid with a controller in code using a controller. There is a knowledge base article here which shows how to access the pivot grid or pivot chart in code.
Alternatively, you can follow the instructions here which explain how pivot grid customisations are saved to the Analysis object.
The pivot grid's settings are saved to the PivotGridSettingsContent property of the current Analysis object. The settings of the Chart control are saved to the ChartSettingsContent property. So, the next time you invoke a detail View for this Analysis object, the pivot grid and chart are configured in the same way as they were the previous time. Saving and loading settings is performed by the AnalysisEditorWin (AnalysisEditorWeb) editor.
So you can set up the grid correctly and then copy the saved Analysis record and restore it as part of your application startup.
Another option is to look at the eXpand Framework's Pivot Chart module which provides plenty of additional layout options via XAF model extensions.