Issues with master/detail form

I have several problems with a master/detail form. The master form is a form with multiple fields to create a SQL for the containment of the data in the grid (detail form).

  1. how can I export the grid as pdf? I can insert this option in the master form, but then the formatting is bad. Normally the grid has a good PDF export function. How can I use this in the master/detail form?

  2. how can I use the ‘fixed labels’ in the grid in this constellation? Since the grid is embedded in the page as an iFrame, this setting does not work properly, probably because the scrollbar is outside this iFrame by default. What changes do I need to make to keep the headings pinned at the top?

I hope someone knows a solution. Many thanks in advance!