Rendering and Exporting a Report Asynchronously
Our sample projects and report templates can help you learn the basics of working with our products.Compiling, rendering and exporting a report through the
Load the report.
How it works. The heavy engine work runs off the UI thread, so the form keeps repainting and stays interactive until the rendered report is shown or saved.
async API keeps the UI thread free, so the window stays responsive during long operations.Load the report.
Report = new StiReport();
Report.Load("MasterDetail.mrt");Render asynchronously. Await each stage instead of blocking the UI:await Report.CompileAsync(); // only if compilation is needed
await Report.RenderAsync();CompileAsync()/RenderAsync()— build the document without blocking;ExportDocumentAsync()writes it the same way.- Because the calls are awaited, status labels and progress can update while the work runs.
How it works. The heavy engine work runs off the UI thread, so the form keeps repainting and stays interactive until the rendered report is shown or saved.