Page 1 of 1
First event BeforePrint for page is not fired anymore
Posted: Thu Jan 28, 2010 4:49 am
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
First event BeforePrint for page is not fired anymore
Posted: Thu Jan 28, 2010 10:08 am
by Edward
Hi Munich,
I could not reproduce this problem.
Could you please show your code?
Thank you.
First event BeforePrint for page is not fired anymore
Posted: Fri Jan 29, 2010 9:26 am
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
First event BeforePrint for page is not fired anymore
Posted: Thu Feb 04, 2010 1:26 am
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
First event BeforePrint for page is not fired anymore
Posted: Thu Feb 04, 2010 3:31 am
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.
First event BeforePrint for page is not fired anymore
Posted: Wed Feb 10, 2010 11:01 am
by munich
Hi Edward,
I sent you the test project and received the Ticket ID: RJI-561950
Yours
munich
First event BeforePrint for page is not fired anymore
Posted: Wed Feb 10, 2010 6:37 pm
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.
First event BeforePrint for page is not fired anymore
Posted: Tue Feb 16, 2010 2:07 am
by munich
Hello,
in prerelease from February 15th it works again as expected.
I thank you very much for your help.
Yours
munich
First event BeforePrint for page is not fired anymore
Posted: Tue Feb 16, 2010 6:14 pm
by Edward
Hi Munich,
Glad to hear that, please let us know if any additional help is required.
Thank you.