Jump to content
JasperReports Library 7.0 is now available ×

beforeDetailEval: setVariableValue for image?


Recommended Posts

By: Greg - gregor92

beforeDetailEval: setVariableValue for image?

2003-04-08 09:55

Can I use setVariableValue to set an image for the beforeDetailEval event?

 

I would like to use a scriplet to set the image variable in my detail to different colors depending on the value of the data.

 

Greg

 

 

 

 

By: Teodor Danciu - teodord

RE: beforeDetailEval: setVariableValue for image?

2003-04-08 12:08

 

Hi,

 

Yes you can.

If you have troubles with it, let me know.

 

Thank you,

Teodor

 

 

 

 

 

By: Greg - gregor92

RE: beforeDetailEval: setVariableValue for image?

2003-04-08 14:22

None of my listeners are firing

 

 

 

 

By: Greg - gregor92

RE: beforeDetailEval: setVariableValue for image?

2003-04-08 14:13

I'm passing my scrptlet as follows:

 

MyScriptlet scriptlet = new MyScriptlet();

parameters.put("REPORT_SCRIPTLET", scriptlet);

 

Do I need to do anything in my report to have the afterDetailEval listener get triggered.

 

I have a variable which I use in the detail of my report:

<variable name="myImage" class="java.awt.Image" calculation="System" />

 

<imageExpression class="java.awt.Image"><![CDATA[$V{myImage}]]></imageExpression></image>

 

 

 

 

By: Teodor Danciu - teodord

RE: beforeDetailEval: setVariableValue for image?

2003-04-08 20:42

 

Hi,

 

Unfortunately, you cannot pass the scriptlet object

as a parameter, like in the code you posted.

This object is instantiated always by the engine

from the specified "scriptletClass" attribute.

 

This is why it does not work for you.

 

I have to dig into this issue to see if we can allow

passing the scriptlet object like this in future versions.

 

Thank you,

Teodor

 

 

 

 

 

By: Greg - gregor92

RE: beforeDetailEval: setVariableValue for image?

2003-04-09 10:14

I continue to get the following error:

 

dori.jasper.engine.JRException: Error creating scriptlet class instance : MyScriptlet

 

I've also tried the following, but it seems the class is not found. Do you know how this should be specified?

 

com.transgenomic.navigator.reports.MyScriptlet

 

 

 

 

By: Teodor Danciu - teodord

RE: beforeDetailEval: setVariableValue for image?

2003-04-10 12:55

 

Hi,

 

We need the entire class name like in your

last line.

Make sure the scriptlet class is in the classpath

when you fill your reports and that it has an empty

constructor.

 

I hope this helps.

Teodor

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