Launch Crystal Reports Immediately

I have an application that uses Crystal Reports to display information entered in various forms. This application is designed for a variety of laptops working across the spectrum. On some laptops, Crystal Reports can take up to 30 seconds until the first report appears, after which they usually open faster.

How do I pre-launch Crystal Reports when my application starts, so the initial report load time is faster? The way I plan to do this right now is to open an empty report minimized at startup, then synchronize it with closing.

+4
source share
1 answer

Downloading CR in a separate thread at application startup for me.

//preload crystal reports on a seperate thread Task.Factory.StartNew(() => { try { using (ReportDocument preloadCrystalReport = new ReportDocument()) { preloadCrystalReport.Load(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Reports/Report.rpt")); PrintPreview preloadCrystalGUI = new PrintPreview().Init(preloadCrystalReport); preloadCrystalGUI.Dispose(); } } catch (Exception e) { \\log exception } }, TaskCreationOptions.LongRunning); 

The PrintPreview class in my case is a dialog with a CR control built into it. I do not show a dialog at preload.

I found that preloading the .rpt file also helped with the help of the user

+4
source

Source: https://habr.com/ru/post/1385986/


All Articles