View .fp3 file on remote system

al_nolandal_noland Tulsa, Oklahoma
edited 9:00PM in FastReport 4.0
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.

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 9:00PM
    .fp3 is a file of preview pages
    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


  • al_nolandal_noland Tulsa, Oklahoma
    edited December 2010
    gordk wrote: »
    .fp3 is a file of preview pages
    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.
  • al_nolandal_noland Tulsa, Oklahoma
    edited 9:00PM
    gordk wrote: »
    .fp3 is a file of preview pages
    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'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
  • gpigpi
    edited 9:00PM
    Try
    diadatamodule.AppSrvClientGeneral.Answer.GetStreamField(2,reportdata,fldtype);
    reportdata.Position := 0;
    frxReport1.PreviewPages.Initialize;
    frxReport1.previewpages.LoadFromStream(reportdata);
    frxReport1.ShowPreparedReport;  
    frxReport1.PreviewPages.Finish;
    
  • al_nolandal_noland Tulsa, Oklahoma
    edited 9:00PM
    That worked!

    Thanks.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.