Printing as fast as possible

Stimulsoft Reports.NET discussion
Post Reply
siya_kh1983
Posts: 3
Joined: Tue Dec 16, 2008 7:44 am

Printing as fast as possible

Post by siya_kh1983 »

Hi.
I want to print about 6000 pages with Stimulsoft component in .net windows app. my client computer has 512 MB ram, so before printing, Ram get full and it's get slow... how can I print these 6000 pages Simultaneously. I mean before all pages rending, I want to print completed rended pages...
Is any way that can I do it?
My Code:

Code: Select all

DataSet data = getData();// this Method return more than 6000 Pages in A5
if (!File.Exists(Application.StartupPath + "\\" + compileReportName))
{
   report = new StiReport();
   report.Load(@"c:\temp\" + frmPrg.Info.FileName);
   report.Dictionary.DataStore.Clear();
   report.Dictionary.Databases.Clear();
   report.RegData(data);
   report.Dictionary.Synchronize();
   report.Compile(compileReportName);
}
else
{
   report = StiReport.GetReportFromAssembly(compileReportName, true);
   report.RegData(data);
}
StiConfig.LoadLocalization(Application.StartupPath + "\\fa.xml");
if (data == null)
{
   MessageBox.Show("داده ای یافت نشد", "خطا", MessageBoxButtons.OK, MessageBoxIcon.Error);
   return;
}
report.Render(true);
report.Print();
report.Dispose();
Regards.:brick:
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

Printing as fast as possible

Post by Ivan »

Hello,
siya_kh1983 wrote: how can I print these 6000 pages Simultaneously. I mean before all pages rending, I want to print completed rended pages...
Is any way that can I do it?
Unfortunately, this is impossible.
You can only try to reduce the amount of memory used by report.
To do this, you must enable caching: please set the ReportCacheMode property of report to On in the report designer or from code:

Code: Select all

...
report.ReportCacheMode = StiReportCacheMode.On;
report.Render(true);
report.Print();
report.Dispose();
Thank you.
Post Reply