This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Handle Map in I report from java

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using java and I Report and new to Ireport. Values to I report are passed through java.

I handled only single values not array or group of values .


Now I want to create a chart. with month on x-axis and running(auto increment) values on y-axis. Data are in Map in java , so i can pass Map to Ireport through parameters.How can use this to chart.

I saw example are for SQ L query .

My java code


Usually i retrieve values like this in Ireport



sample output is
Month: 1
Key: Actual_Cost
Value: 910.00
Key: Actual_Sale
Value: 0.00
Key: Cost
Value: 87300.00
Key: Sale
Value: 97991.25
.....
Month: 17
Key: Actual_Cost
Value: 910.00
Key: Actual_Sale
Value: 0.00
Key: Cost
Value: 92740.00
Key: Sale
Value: 104095.75



Please anybody help me how to retrieve data from map? or If map can not handle in ireport any other way to handle this.

My x-axis is for month should like this M 1, M 2, M 3 ....
and y-axis 100,200,300 etc.

what should i use for Series expression, X Value expression and Y value expression in i report chart properties?

Using graph for four keys so X Y map is OK right?

Please give me suggestions...


Note: data are from two sources, that is why i am using parameter and data source.
 
Acetylsalicylic acid is aspirin. This could be handy too:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!