Clear preview control (TfrxPreview)
How do I clear the preview control ?
I have a situation where I am giving the user to switch between reports while a preview is visible. During the switch, the old report is still visible. I would like to clear the old report from the preview before switching to the new report.
I have tried the following, but get access violations:
frxPreview.Clear
frxPreview.Report.Clear
frxPreview.Report.Free
Can anyone help ?
Thanks,
Darren
I have a situation where I am giving the user to switch between reports while a preview is visible. During the switch, the old report is still visible. I would like to clear the old report from the preview before switching to the new report.
I have tried the following, but get access violations:
frxPreview.Clear
frxPreview.Report.Clear
frxPreview.Report.Free
Can anyone help ?
Thanks,
Darren
Comments
frxPreview.Report := Nil;
And when you load a new report:
frxPreview.Report := frxReport;
Btw, I think the access violation you got is because you destroied frxReport, and later, you tried to access it without recreating...
regards.