Class Prepared Report not found

edited 6:57AM 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 6:57AM
    Try this:
    rxReport1.Report.LoadFromFile('c:\ttt.fr3');
    if frxReport1.PrepareReport then
    frxReport1.ShowPreparedReport;
    
    or
    
    frxReport1.Report.LoadFromFile('c:\ttt.fr3');
    frxReport1.ShowReport();
    
  • edited 6:57AM
    Thank you for your replay.

    I tried the two options but the same error message appeared

    Could not find class preparedreport.
  • edited 6:57AM
    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 6:57AM
    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 6:57AM
    frxReport1.PreviewPages.LoadFromStream(PreparedReportStream);
    frxReport1.ShowPreparedReport;
  • edited 6:57AM
    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