Jump to content
Changes to the Jaspersoft community edition download ×

set variable w/ script

Recommended Posts


set variable w/ script

2003-01-02 16:44

Hi. I know it is easy. But I'm a stupid and do not know how: In my DB the data A is numeric. When data A is 1, I want show "journal". If data A is 2, I want show "letter" and if data A is 3, I want show "nothing". Please, step by step, how a build it?

sorry, :)..






By: Teodor Danciu - teodord

RE: set variable w/ script

2003-01-03 00:04




Let's say your A field is and Integer.



(A.intValue() == 1)?



(A.intValue() == 2)?






Not tested it, but it should work.


Good luck!







By: Chuck Deal - cdeal

RE: set variable w/ script

2003-01-03 05:22

I had to do a similar task. And due to the length of the function I chose to use a Scriptlet over embedding the logic in the XML.


The Scriplet sample was perfect for me to learn what I needed. In the Summary section of that report, you will see a call to a custom function called hello(). This should be all that you need in order to figure out how to use Scriplets.

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