Event that fire when report has finished

Stimulsoft Reports.NET discussion
Post Reply
Martin Hart Turner
Posts: 66
Joined: Wed Apr 04, 2007 3:32 am
Location: Spain

Event that fire when report has finished

Post by Martin Hart Turner »

Hi:

I'm looking for an event that I can create a hander for (in code) that fires when the report has completely finished it's task. This may be after the preview window has closed, after the printing to a printer has finished or after the report has finished exporting.

Is there an event for this?

I want to destroy some resources (data source) that I have created specifically for the report, so when the report no longer needs it, I want to destroy it, releasing it's resources.

TIA,
MartinH.
EDV Gradl
Posts: 228
Joined: Sat Jun 17, 2006 9:50 am
Location: Germany

Event that fire when report has finished

Post by EDV Gradl »

Report.EndRender() ?
Martin Hart Turner
Posts: 66
Joined: Wed Apr 04, 2007 3:32 am
Location: Spain

Event that fire when report has finished

Post by Martin Hart Turner »

EDV wrote:Report.EndRender() ?
If I destroy the DataSoure in the EndRender event, and the report is still visible in a preview window, wouldn't it complain?

I use report.Render() and then report.Show() when using preview, so when would the event fire? After the Render() statement or after the Show() is closed?

TIA,
Martin.
Brendan
Posts: 309
Joined: Sun Jul 16, 2006 12:42 pm
Location: Ireland

Event that fire when report has finished

Post by Brendan »

There are a number of static global events for different tasks like When a Report finishes rendering, Report Export, Report Save, load etc.
To view a list of them they are available in

Code: Select all

Stimulsoft.Report.StiOptions.Engine.GlobalEvents
A number of other static events are available that are more specific to the Designer or Preview control which can be found in:

Code: Select all

Stimulsoft.Report.Design.StiDesigner
Stimulsoft.Report.Render.StiPreviewControl
If you are using the static events you only need to register for the event once within your application.
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Event that fire when report has finished

Post by Vital »

MartinH wrote:
EDV wrote:Report.EndRender() ?
If I destroy the DataSoure in the EndRender event, and the report is still visible in a preview window, wouldn't it complain?

I use report.Render() and then report.Show() when using preview, so when would the event fire? After the Render() statement or after the Show() is closed?

TIA,
Martin.
Event EndRender occurs when report rendering is finished. After then you can clear report template or do something also because rendered report stored in collection - RenderedPages. Method "Show" work with collection "RenderedPages" only.

Thank you.
Martin Hart Turner
Posts: 66
Joined: Wed Apr 04, 2007 3:32 am
Location: Spain

Event that fire when report has finished

Post by Martin Hart Turner »

Brendan wrote:There are a number of static global events for different tasks like When a Report finishes rendering, Report Export, Report Save, load etc.
To view a list of them they are available in

Code: Select all

Stimulsoft.Report.StiOptions.Engine.GlobalEvents
A number of other static events are available that are more specific to the Designer or Preview control which can be found in:

Code: Select all

Stimulsoft.Report.Design.StiDesigner
Stimulsoft.Report.Render.StiPreviewControl
If you are using the static events you only need to register for the event once within your application.
Brendan:

Once again you have helped jog my memory and reminded me of the static event handlers. I'll certainly check them out, I think this may resolve my problem.

Regards,
MartinH.
Martin Hart Turner
Posts: 66
Joined: Wed Apr 04, 2007 3:32 am
Location: Spain

Event that fire when report has finished

Post by Martin Hart Turner »

Vital wrote:
MartinH wrote:
EDV wrote:Report.EndRender() ?
If I destroy the DataSoure in the EndRender event, and the report is still visible in a preview window, wouldn't it complain?

I use report.Render() and then report.Show() when using preview, so when would the event fire? After the Render() statement or after the Show() is closed?

TIA,
Martin.
Event EndRender occurs when report rendering is finished. After then you can clear report template or do something also because rendered report stored in collection - RenderedPages. Method "Show" work with collection "RenderedPages" only.

Thank you.
Vital:

Thanks for the clarification, it makes sense when you think about it. I'm still learning the philosophy of the product, but every step opens a whole new range os possibilities.

Thanks,
MartinH.
Post Reply