frReport1.LoadFromFile(ExtractFilePath(Application.ExeName) + 'Untitled.frf');
if StrGrid.RowCount = 6 then
frReport1.Pages[0].pgHeight := 1000
else
frReport1.Pages[0].pgHeight := 2000;
frReport1.SaveToFile(ExtractFilePath(Application.ExeName) + 'Untitled.frf');
frReport1.LoadFromFile(ExtractFilePath(Application.ExeName) + 'Untitled.frf');
frReport1.PrepareReport;
frReport1.ShowPreparedReport;
记得Save一次,然后再Load.