View .fp3 file on remote system
al_noland
Tulsa, Oklahoma
Is it possible to generate an .FP3 file on a server, send it to the client as a stream, load and display it?
I'm trying to do this but receive a 'Class DATAPACKET Not found"
On the remote system I just have a fastreport control with a preview control.
reportdata.Position := 0;
>> frxReport1.LoadFromStream(reportdata);
frxreport1.ShowReport(true);
I get the error on the LoadFromStream method.
I'm trying to do this but receive a 'Class DATAPACKET Not found"
On the remote system I just have a fastreport control with a preview control.
reportdata.Position := 0;
>> frxReport1.LoadFromStream(reportdata);
frxreport1.ShowReport(true);
I get the error on the LoadFromStream method.
Comments
frxReport1.LoadFromStream(reportdata); this would be fine for a report design .fr3
.fp3 is the preview pages produced by design.
try instead
frxReport1.previewpages.LoadFromStream(reportdata);
frxreport1.showpreparedreport
I don't get the error anymore, but it also doesn't display the report in the preview panel. And the "ShowPreparedReport" opens a blank report.
I also changed the server side to frxreport1.previewpages.savetostream(reportdata)
And just to clarify my goal.
I am trying to generate a report on the server, export it as a stream, then display it in a preview control on the client application.
I'm trying to load a stream containing a prepared report into a trxpreview control on a form. The code following code results in an empty preview. If I save the previewpages to file I can view the report with the standalone fast report, so I'm sure the stream is valid.
diadatamodule.AppSrvClientGeneral.Answer.GetStreamField(2,reportdata,fldtype);
reportdata.Position := 0;
frxReport1.previewpages.LoadFromStream(reportdata);
frxreport1.PreviewPages.SaveToFile('c:\temp\test.fp3');
frxreport1.showpreparedreport;
Why would the preview not display the report? What can I do to get the preview to show the report?
Thanks
Allen
Thanks.