First event BeforePrint for page is not fired anymore

Stimulsoft Reports.NET discussion
Post Reply
munich
Posts: 82
Joined: Wed May 06, 2009 7:57 am

First event BeforePrint for page is not fired anymore

Post by munich »

Hello,

I use StiViewerControl and do some page margin manipulation when the event StiOptions.Engine.GlobalEvents.BeforPrint is fired and the sender is a StiPage object. Since pre-release of 25th January the event BeforePrint for the first (rendered) page is not fired anymore.

What am I doing wrong?

Yours
munich
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

First event BeforePrint for page is not fired anymore

Post by Edward »

Hi Munich,

I could not reproduce this problem.

Could you please show your code?

Thank you.
munich
Posts: 82
Joined: Wed May 06, 2009 7:57 am

First event BeforePrint for page is not fired anymore

Post by munich »

Dear Edward,

now I found out the problem is a little bit different.

This is how I create the event handler:

Code: Select all

Stimulsoft.Report.StiOptions.Engine.GlobalEvents.BeforePrint += new EventHandler(GlobalEvents_BeforePrint);
This is how I check for pages being printed:

Code: Select all

private void GlobalEvents_BeforePrint(object sender, EventArgs e)
{
  StiPage currentCompAsStiPage = sender as StiPage;
  if (currentCompAsStiPage != null)
  {
    if(currentCompAsStiPage == comp.Report.Engine.TemplatePage)
    {
      // Now do the important job for a page really being rendered as page and not as sub report.
    }
  }
}
What really is going wrong: First time the event is fired for a page the property "Report.Engine.TemplatePage" is null. In the releases before January 25th the property "Report.Engine.TemplatePage" was the same as "currentCompAsStiPage". For the following pages being rendered the property "Report.Engine.TemplatePage" has the correct value.

For me the property "Report.Engine.TemplatePage" is important to distinguish between template pages being rendered as 'real' pages and the ones being used in sub reports.

Now I hope my problem is clear. If not, please let me know.

Thanks in advance for your help.

Yours
munich
munich
Posts: 82
Joined: Wed May 06, 2009 7:57 am

First event BeforePrint for page is not fired anymore

Post by munich »

Dear Stimul-Team,

Did you see my concern? My problem still exists. I would be very glad if someone can help further.

Yours
munich
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

First event BeforePrint for page is not fired anymore

Post by Edward »

Hi Munich,

I checked the problem and everything worked as it should to.

Could you please send a simple test project to support[at]stimulsoft.com?

Sorry for the delay.

Thank you.
munich
Posts: 82
Joined: Wed May 06, 2009 7:57 am

First event BeforePrint for page is not fired anymore

Post by munich »

Hi Edward,

I sent you the test project and received the Ticket ID: RJI-561950

Yours
munich
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

First event BeforePrint for page is not fired anymore

Post by Edward »

Hi Munich,

We are checking the problem now, thank you for your data which you provided, we will inform you about our progress.

Thank you.
munich
Posts: 82
Joined: Wed May 06, 2009 7:57 am

First event BeforePrint for page is not fired anymore

Post by munich »

Hello,

in prerelease from February 15th it works again as expected.

I thank you very much for your help.

Yours
munich
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

First event BeforePrint for page is not fired anymore

Post by Edward »

Hi Munich,

Glad to hear that, please let us know if any additional help is required.

Thank you.
Post Reply