This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Cloud Application Architecture Patterns: Designing, Building, and Modernizing for the Cloud and have Kyle Brown, Bobby Woolf and Joseph Yodor on-line!
See this thread for details.
  • 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic