How to improve printing efficiency
How to improve printing efficiency
Hi Edward .
1.I need to print multiple data using a same template ,in this case,How to improve printing efficiency?
My code:
for( int i = 0 ;i<n ;i++)
{
Report1.Reports.DataSources.Clear();
Report1.Reports.RegData( d1);
Report1.Reports.RegData(d2);
Report1.Reports.Load("1.mrt");
Stimulsoft.Report.Print.StiPrinterSettings p = new Stimulsoft.Report.Print.StiPrinterSettings();
p.ShowDialog = false;
Report1.Reports.PrinterSettings = p;
Report1.Reports.Print();
}
2.In the first printing,why is printing, the program will have no response to ,and process CSC.exe did not respond .
Thank you !
1.I need to print multiple data using a same template ,in this case,How to improve printing efficiency?
My code:
for( int i = 0 ;i<n ;i++)
{
Report1.Reports.DataSources.Clear();
Report1.Reports.RegData( d1);
Report1.Reports.RegData(d2);
Report1.Reports.Load("1.mrt");
Stimulsoft.Report.Print.StiPrinterSettings p = new Stimulsoft.Report.Print.StiPrinterSettings();
p.ShowDialog = false;
Report1.Reports.PrinterSettings = p;
Report1.Reports.Print();
}
2.In the first printing,why is printing, the program will have no response to ,and process CSC.exe did not respond .
Thank you !
How to improve printing efficiency
Hello,
Please try to use way:
Thank you.
Please try to use way:
Code: Select all
Report1.Reports.Load("1.mrt");
Report1.Reports.Compile();
for( int i = 0 ;i<n ;i++)
{
Report1.Reports.CompiledReport.DataSources.Clear();
Report1.Reports.CompiledReport.RegData( d1[i]);
Report1.Reports.CompiledReport.RegData(d2[i]);
Stimulsoft.Report.Print.StiPrinterSettings p = new Stimulsoft.Report.Print.StiPrinterSettings();
p.ShowDialog = false;
Report1.Reports.CompiledReport.PrinterSettings = p;
Report1.Reports.CompiledReport.Render();
Report1.Reports.CompiledReport.Print();
}
How to improve printing efficiency
I will try it .
thank you very much !:biggrin:
thank you very much !:biggrin:
How to improve printing efficiency
Hello ,
Can help check the code where there are problems do
1.mrt :
view
QT1,System.String
view
view
EngineV2
None;Black;2;Solid;False;4;Black
Transparent
All;[105:105:105];1;Solid;False;4;[105:105:105]
White
7.8,3.2,7,1.6
Arial,30,Bold
0,0,0,0
Text1
{view.QT1}
Black
All;[105:105:105];1;Solid;False;4;[105:105:105]
White
5.4,3.2,2.4,1.6
Arial,30,Bold
0,0,0,0
Text2
QT1
Black
6f421fc5fa0a4375aeb55d3964a8fa86
1,1,1,1
Page1
29.7
21
Arial,100
[50:0:0:0]
System.Dll
System.Drawing.Dll
System.Windows.Forms.Dll
System.Data.Dll
System.Xml.Dll
Stimulsoft.Controls.Dll
Stimulsoft.Base.Dll
Stimulsoft.Report.Dll
ReportsTest
3/15/2010 9:43:54 AM
3/15/2010 9:43:12 AM
4df0d70400ab4c499ace6e7a276f3975
ReportsTest
Centimeters
2009.3.600
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Data;
using Stimulsoft.Controls;
using Stimulsoft.Base.Drawing;
using Stimulsoft.Report;
using Stimulsoft.Report.Dialogs;
using Stimulsoft.Report.Components;
namespace Reports
{
public class ReportsTest : Stimulsoft.Report.StiReport
{
public ReportsTest()
{
this.InitializeComponent();
}
#region StiReport Designer generated code - do not modify#endregion StiReport Designer generated code - do not modify
}
}
CSharp
Can help check the code where there are problems do
Code: Select all
stiReport1.Load(@"\1.mrt");
stiReport1.Compile();
stiReport1.CompiledReport.DataSources.Clear();
DataTable dt1 = new DataTable();
dt1 = GetTable(@"select 'abc' as qt1 from dual ");
stiReport1.CompiledReport.RegData(dt1.DefaultView);
stiReport1.CompiledReport.Print();
view
QT1,System.String
view
view
EngineV2
None;Black;2;Solid;False;4;Black
Transparent
All;[105:105:105];1;Solid;False;4;[105:105:105]
White
7.8,3.2,7,1.6
Arial,30,Bold
0,0,0,0
Text1
{view.QT1}
Black
All;[105:105:105];1;Solid;False;4;[105:105:105]
White
5.4,3.2,2.4,1.6
Arial,30,Bold
0,0,0,0
Text2
QT1
Black
6f421fc5fa0a4375aeb55d3964a8fa86
1,1,1,1
Page1
29.7
21
Arial,100
[50:0:0:0]
System.Dll
System.Drawing.Dll
System.Windows.Forms.Dll
System.Data.Dll
System.Xml.Dll
Stimulsoft.Controls.Dll
Stimulsoft.Base.Dll
Stimulsoft.Report.Dll
ReportsTest
3/15/2010 9:43:54 AM
3/15/2010 9:43:12 AM
4df0d70400ab4c499ace6e7a276f3975
ReportsTest
Centimeters
2009.3.600
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Data;
using Stimulsoft.Controls;
using Stimulsoft.Base.Drawing;
using Stimulsoft.Report;
using Stimulsoft.Report.Dialogs;
using Stimulsoft.Report.Components;
namespace Reports
{
public class ReportsTest : Stimulsoft.Report.StiReport
{
public ReportsTest()
{
this.InitializeComponent();
}
#region StiReport Designer generated code - do not modify#endregion StiReport Designer generated code - do not modify
}
}
CSharp
How to improve printing efficiency
Hello,
Please replace following line of code:
by
Thank you.
Please replace following line of code:
Code: Select all
stiReport1.CompiledReport.DataSources.Clear();
Code: Select all
stiReport1.CompiledReport.DataStore.Clear();
How to improve printing efficiency
Hello,
There are still problems , only the static field has the value ,dynamic binding no value , very strange .
There is another problem : sometimes, at compile reports, csc.exe program will die。。。
Thank you .
There are still problems , only the static field has the value ,dynamic binding no value , very strange .
There is another problem : sometimes, at compile reports, csc.exe program will die。。。
Thank you .