Print header template in grid only once

Hi all, I have a grid with GROUP BY and a header template that shows in the app on the top of the grid. When I export to pdf or print the grid the header template shows up after every GROUP BY group. How can this be done that the header shows up only once on top of the grid?