• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Using LinkedHashMap in JASPER

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have a question regarding how to fill the report with map datasource.
As known the fillreport uses the JRDatasource. The datasource could be JRBeanArrayDataSource , JRMapArrayDataSource , JRMapCollectionDataSource and many more other types.


My requirement is to use a LinkedHashMap<String,Integer> because of same insertion order i have to display on the report with key/value pairs. I am thinking to send this
as datasource to fillReport. The questions are :
1) Which datasources i have to use to send linkedhashmap ?
2) Is it possible to send the map as datasource in Jasper ?
3) I dont have any sub-reports in my Jasper report so , how do i get the key and value from datasource and display on the report itself.

I would really appreciate if someone could guide me on this.
 
If you believe you can tell me what to think, I believe I can tell you where to go. Go read this tiny ad!
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic