Class Prepared Report not found

edited 8:18AM in FastReport 3.0
I am trying to load a report from file using the following code

frxReport1.Report.LoadFromFile('c:\ttt.fr3');
frxReport1.ShowPreparedReport;
But I got a run time error with the message ("Class Prepared Report not found")

Please Help.

Comments

  • edited 8:18AM
    Try this:
    rxReport1.Report.LoadFromFile('c:\ttt.fr3');
    if frxReport1.PrepareReport then
    frxReport1.ShowPreparedReport;
    
    or
    
    frxReport1.Report.LoadFromFile('c:\ttt.fr3');
    frxReport1.ShowReport();
    
  • edited 8:18AM
    Thank you for your replay.

    I tried the two options but the same error message appeared

    Could not find class preparedreport.
  • edited 8:18AM
    loading report:

    rxReport1.LoadFromFile('c:\ttt.fr3'); <- fr3 - report file
    if frxReport1.PrepareReport then
    frxReport1.ShowPreparedReport;

    Loading prepared Report:

    rxReport1.Report.LoadFromFile('c:\ttt.fp3');<-" load .fp3 file(prepared report)"
    frxReport1.ShowPreparedReport;

  • edited 8:18AM
    wrote:
    Loading prepared Report:

    rxReport1.Report.LoadFromFile('c:\ttt.fp3');<-" load .fp3 file(prepared report)"
    frxReport1.ShowPreparedReport;

    I would like to load it from a stream. I have tried the following:

    frxReport1.Report.LoadFromStream(PreparedReportStream);
    frxReport1.ShowPreparedReport

    But I get the same error:

    Could not find class preparedreport.

    The PreparedReportStream can be showed in a custom preview form, but i need to show it in the default preview form. Please, could you help me?

    Thank you.


  • edited 8:18AM
    frxReport1.PreviewPages.LoadFromStream(PreparedReportStream);
    frxReport1.ShowPreparedReport;
  • edited 8:18AM
    I have same problem except i don't want preview, because i print from a service application.
    I wrote this code:
    MyPrintService.frxReport1.PreviewPages.LoadFromStream(AStream);
    MyPrintService.frxReport1.Print;
    and it is working.
    The questionis: this code is correct?
    I mean: the *.fp3 must load to PreviewPages?

    ps: sorry for my poor english ;)

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.