Jump to content

How to add objects to java.util.list in IREPORT


srikanth1229

Recommended Posts

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Hi matt

   Thanks for Replying.. :-)

        Actually, I want to draw the bargraph. for that,  category expression is required.

 

   Suppose

     In the table i have the data like this

                Assets              Liabilites                        Networth

                5000                     3000                                2000

 

  I want to pass the category expression as   Assets , Liabilites,Networth. but these are column names.

  Please find the attached image for clear description.

 

 

 

Link to comment
Share on other sites

  • 8 months later...

I know this is an old topic and the question maybe solved or the topicposter may have past away already, but i just found this topic while i had the same problem.

10 minutes after reading this i found a shortcut to the solution, which i like to share.

 

If you have a query that gives you values and some unwanted items that you can't or won't use in your graph and you want other category "words" than you can do the following (at least if you know what the unwanted words are.)

Lets say you have query that returns data for three bargraphs, something like this array

Array = { ["Milk","200"],["Lemonade", "300"], [ "Cola", "100"] }

we don't want the words Milk, lemonade and Cola to be seen by our collegues, so we need to change them to "beer", "wiskey", "Wodka".

just add the following to the categories expression:

$F{type}.equals("Milk") ? "Beer" : ( $F{type}.equals("Lemonade") ? "Wiskey" : ( $F{type}.equals("Cola") ? "Wodka":""))

this will render the graph with you favorite drinks and words.

(of course the 3 words milk, lemonade and cola need to be in this sequence otherwise the comparence will not start...)

 

Link to comment
Share on other sites

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