Predefined EGL JasperReport handler functions

The JasperReport handler provides the following predefined function names, corresponding to events during report fill. Add your code to these functions to provide additional detail to your reports:
Function When the function operates
beforeReportInit(); Before report initialization
afterReportInit(); After report initialization
beforePageInit(); Entering a page
afterPageInit(); Leaving a page
beforeColumnInit(); Before column initialization
afterColumnInit(); After column initialization
beforeGroupInit (groupName String); Before group initialization, where groupName refers to a <group> tag in the design document
afterGroupInit(groupName String); After group initialization
beforeDetailEval(); Before each row is printed
afterDetailEval(); After each row is printed
Within one of these functions, you can call other functions. For example, you can call setReportVariable(), as in the following example:
function afterGroupInit(groupName String)
	if (groupName == “cat�)
		setReportVariableValue (“NewGroupName�, “dog�);
	else
		setReportVariableValue (“NewGroupName�, groupName);
	end
end

You can also create your own functions. For information about creating custom functions, refer to JasperReports documentation; go to:

http://jasperforge.org/sf/projects/jasperreports

For examples using predefined JasperReport functions, refer to the EGL Programmer's Guide.


Feedback