FastReport.Prepare() VERY slow

We are using FastReports to email out invoices in PDF format.

When the code hits the FastReport.Prepare() line, it takes about 15 seconds to return.
Is this normal? Is there some way to speed this up?
String together 100 invoices being emailed out, and it causes our webpage to time out before it finishes.

We are using FR 2015.3.1 and VS2010.

Thanks

Comments

  • edited 8:24AM
    if you're using dotnet 4.5, use async await for long running task
    private async void createPDFandEmail()
    {
        await Task.Run(() =>
        {
             //FASTREPORT CODE
        });
    }
    
  • edited 8:24AM
    No, we're using .Net 4.0.

    We're finding that upgrading our app to 4.5 is proving rather difficult.
  • edited October 2016
    in .net 4.0 : you can use Tasks Factory

    in .net 2.0/3.5 : you can use threadpool
    public void RunInBackground()
    {
        System.Threading.ThreadPool.QueueUserWorkItem(DoSomething);
    }
    
    private void DoSomething(object stateInfo)
    {
        //running in background thread
    }
    
  • I am facing the same problem.

    When I tried to generate a particular report ,the fast report.prepare() gets timeout and making service down.

    I removed a property in datasource which was not part of api response ,then the solution is up and able to generate report fastly.

    I am not sure what is the exact issue behind it. Can someone help to find the root cause?

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.