Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

mysql multiple rows and hashmap

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I have been working japer reports within java. I have developed a report using jdbc in ireport. Now, I want to execute this report within my java programme. I am exporting this report in a .pdf file using,
JasperPrint print = JasperFillManager.fillReport(jasperFileName, map, conn);

Now, here is a little trouble. I have already generated report in ireport including headers like Report generated by (name_from_database_at_the_runtime) process, (STEP_NAME_AT_RUN_TIME) step Profiled (TOTAL_COUNT_AT_RUN_TIME)records in (TABLE_NAME_AT_RUN_TIME) table. This is the header with some dynamic data present in parantheses at the run time. Therefore, I am writing a method to extract only data from the report and export it another method where I am prinitng header of the report. I need to write the query in order to getData() from the database. I would like to know when there are multiple row how should I use the hashmap with respect to connection? How should I map it? I would appreaciate your suggestions and ideas.

code of the method for writing data.


code for the getting data from the record.
 
Rajubhai Kotwal
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
got the solution by passing HashMap and connection through the method.
Topic seized.
 
So there I was, trapped in the jungle. And at the last minute, I was saved by this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic