Using Designer Component in app and Print Preview

edited March 2016 in FastReport 4.0
I have the designer in my application and it is place on a TPanel.

myfrxPreview := TfrxPreview.Create(Panel12);
myfrxPreview.Name := 'myfrxPreview_' + DMOptions.LetterTemplates.FieldByName('lrCode').AsString;
myfrxPreview.Parent := Panel12;
myfrxPreview.Align := alClient;
DMOptions.frxPROLetter.EngineOptions.DestroyForms := false;
DMOptions.frxPROLetter.Preview := myfrxPreview;
DMOptions.frxPROLetter.DesignReportInPanel(Panel12);

My problem is after I do a print preview from the toolbar and close the preview screen I am getting an access violation and the application needs to be terminated.

When I print from the app, it works fine
DMOptions.frxPROLetter.PrintOptions.Printer := Printer.Printers[Printer.PrinterIndex];
DMOptions.LoadFRXReport(DMOptions.frxPROLetter, scode, slang); // This loads frxPROLetter
frxPROLetter.PrepareReport(true);
frxPROLetter.PrintOptions.ShowDialog := False;
frxPROLetter.Print;

Is there a way to issue a print preview. I've tried Show and ShowPreparedReport but nothing happens.
The call stack is attached.

Thanks

Leave a Comment