Question on printing progress

Stimulsoft Reports.NET discussion
Post Reply
Sacha
Posts: 19
Joined: Tue Mar 27, 2007 11:21 am
Location: Montréal

Question on printing progress

Post by Sacha »

Hi, I need to make a printing progress dialog that will show the printing progress and provide the ability to cancel the printing.

What can I use as events / methods to do this ?

I know your report engine provide a progress bar but i don't know how to interface with it.

Any suggestions ?
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Question on printing progress

Post by Vital »

You can use event Rendering of report. For example:

Code: Select all

report.Rendering += new EventHandler(OnRendering);
//or if you don't load report from assembly or from source code
report.Compile();
report.CompiledReport.Rendering += new EventHandler(OnRendering);
report.Render(false);

private void OnRendering(object sender, EventArgs e)
		{
			lbStatus.Text = string.Format("Rendering page {0}", (((StiReport)sender).PageNumber - 1));
		}
For also you can use property StatusString. This property contains status of report rendering.

To stop report rendering you can use property Stop of report. Assign to this property value true to stop rendering.

Thank you.
Post Reply