This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Other Java Products and Servers and the fly likes Sending parameter to jasper queryString Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "Sending parameter to jasper queryString" Watch "Sending parameter to jasper queryString" New topic
Author

Sending parameter to jasper queryString

Sagar Deshmukh
Ranch Hand

Joined: Dec 16, 2011
Posts: 37
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

Joined: Nov 09, 2011
Posts: 1012
    
    5

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

Joined: Dec 16, 2011
Posts: 37
Thanks James , God bles you
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Sending parameter to jasper queryString
 
Similar Threads
Jquery-Ajax:- How to pass nested parameters
Accessing child TextView inside ListView
Showing results.getTagValue=0
JasperReport : Dynamic SQL Query to inside <queryString> Tag of jrxml file