Jump to content
Changes to the Jaspersoft community edition download ×

Scriptlet event fire order ?


Recommended Posts

By: Mohamed Kreifeur - moh2100

Scriptlet event fire order ?

2003-10-09 08:14

Hi every one

I have a report with 2 groups (service, department)

I am trying to do somme calculations on the group department fields so I am scriptlet events.

 

public void beforeGroupInit(String groupName) throws JRScriptletException

{ if (groupName.equals("service"))

System.out.println("befor service: " + this.getFieldValue("srvDesc"));

else if (groupName.equals("Types"))

System.out.println("befor depart: " + this.getFieldValue("dptDesc"));

}

 

public void afterGroupInit(String groupName) throws JRScriptletException

{ if (groupName.equals("service"))

System.out.println("after service: " +this.getFieldValue("srvDesc"));

else if (groupName.equals("department"))

System.out.println("after depart: " + this.getFieldValue("dptDesc"));

}

 

So what I got (that I can't understand) is :

before service

before depart

after depart

after service

before depart

after departbefore depart

after depart

.

.

.

before depart

after depart

before service

before depart

after depart

after service

....

 

What I waiting for as result :

before service

before depart

after depart

before depart

after depart

before depart

after depart

...

after service

 

The "after service" must fire after all "depart" records has finiched and not after the first "depart" record...

 

Is this strange ? or I have done some wrong in my report

 

 

Thanks

Moh

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...