aspose file tools*
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
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