Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sending parameter to jasper queryString

 
Sagar Deshmukh
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey guys i am totally blank about jasper report because i have use iText for my all project but now i want to use jasper and basically i want to learn. so please guid me, please see my below .jrxml file code


insted of 14 i want to send user enter value at runtime using java code so how do i pass value in rn as per user enter.
Waiting for your helpfull reply
 
James Boswell
Bartender
Posts: 1051
5
Chrome Eclipse IDE Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to declare a parameter in your report (jrxml) file:

You also need to replace your hardcoded value of 14 in your query with a placeholder to the 'rn' parameter:

In your Java code, you pass a parameter using a Map when you fill the report:
 
Sagar Deshmukh
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks James , God bles you
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic