Jump to content

Scriptlet with void method


Recommended Posts

Hello everyone,

Is there any way to call void methods in scriptlet classes?

for example, in my subreport I need to call a void method every time an item is printed in the PDF, so I can increase my app's steps using the method below in scriptlet class in java:

public void incrementStep() throws JRScriptletException { 	      getBean(ProcessCommand.class).incrementStep(this.getFieldValue(PROCESS_ID).toString()); 
}

When the method is called I get this error:

Type mismatch: cannot convert from void to Object\n                value = ((com.test.Scriptlet)parameter_REPORT_SCRIPTLET.getValue()).incrementStep()
Edited by caio_merotti
Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

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...