Search Results for

    Show / Hide Table of Contents

    Multithreading

    FastReport can operate independently in different threads, but there are some features:

    • You can not create TfrxDBDataSet even in different threads, because "global list" is used for search and access will always take place to the first created TfrxDBDataSet (you can switch off the use of global list, it is active by default);

    • If during report execution there are some changes in object characteristics (for example,Memo1.Left := Memo1.Left + 10 in script), than you need to remember that during the next operation if the property TfrxReport.EngineOptions.DestroyForms := False report template will already be modified and it will need to be reloaded or to use TfrxReport.EngineOptions.DestroyForms := True. During renewal you can't use interactive reports from the thread, because script's objects are deleted after renewal, that's why in some cases it is efficiently to use TfrxReport.EngineOptions.DestroyForms := False and to renew the template on your own during the next building cycle.

    If necessary the global list due to which you can search the needed copies of TfrxDBDataSet can be switched off.

    { DestroyForms can be switched off, if every time you renew a report from a file or from a current }
    FReport.EngineOptions.DestroyForms := False;
    FReport.EngineOptions.SilentMode := True;
    
    { This property switches off the search through global list }
    FReport.EngineOptions.UseGlobalDataSetList := False; 
    
    { EnabledDataSets plays local list role, you should install it before the template is loaded }
    FReport.EnabledDataSets.Add(FfrxDataSet);
    FReport.LoadFromFile(ReportName);
    FReport.PrepareReport;
    
    Back to top © Copyright Fast Reports Inc.