Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 339736

Summary: OnStartPage and OnEndPage event handlers missing in Java
Product: z_Archived Reporter: Ghislain Gadbois <ghigad>
Component: BIRTAssignee: Birt-ReportEngine-inbox <Birt-ReportEngine-inbox>
Status: RESOLVED FIXED QA Contact: Xiaoying Gu <bluesoldier>
Severity: enhancement    
Priority: P3 CC: bluesoldier, ghigad, hustlg, jouyang, mindan.xu
Version: 2.6.2   
Target Milestone: 3.7.1   
Hardware: All   
OS: All   
Whiteboard:

Description Ghislain Gadbois CLA 2011-03-11 13:09:13 EST
In BIRT 2.6.2, there is no way of implementing the following event handlers in a Java Class:  they must be implemented in JavaScript.

* Report.OnStartPage
* Report.OnEndPage
* MasterPage.OnStartPage
* MasterPage.OnEndPage

Since all other events may be implemented either in a Java Class or in a JavaScript, these events should also be available, for consistency's sake.

The corresponding methods should be added to org.eclipse.birt.report.engine.api.script.eventhandler.IReportEventHandler and implementing classes.

Also, a new interface (something like org.eclipse.birt.report.engine.api.script.eventhandler.IMasterPageEventHandler) and corresponding adapter class should be created.
Comment 1 Ghislain Gadbois CLA 2011-03-14 11:10:49 EDT
I review the release notes of the previous versions of BIRT.  This feature seems to have been added in BIRT 2.5.  This issue is probably present in all BIRT version greater or equal to 2.5, but I did not verify this any further.  Anyone can confirm?
Comment 2 Jun Ouyang CLA 2011-03-14 21:59:54 EDT
No, it's not available yet. We will implement it in 3.7.0.
Comment 3 Gang Liu CLA 2011-09-07 05:09:00 EDT
fixed.
Add new interface into IReportEventHandler:
	void onPageStart( IPageInstance page, IReportContext reportContext ) throws ScriptException;
	
	void onPageEnd( IPageInstance page, IReportContext reportContext ) throws ScriptException;

Add new interface into IMasterPageEventHandler:
	void onPageStart( IPageInstance page, IReportContext reportContext ) throws ScriptException;
	
	void onPageEnd( IPageInstance page, IReportContext reportContext ) throws ScriptException;
Comment 4 Gang Liu CLA 2011-09-07 05:22:27 EDT
*** Bug 283822 has been marked as a duplicate of this bug. ***