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
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Dynamic Jasper Report on jsp

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Hello experts
I am working on jasper reports to generaete reports and also i have downloaded ireports latest version for working with jasper reports and creating reports .. its all working fine ... but now my requirement currently is something different

1. User will have a page where he would input the parameters like From Date - To Date and will select one another parameter

2. Depending on the parameter the search would be executed on the db and all the records matching the same criterial are required to be shown would be saved into the array list or what ever..

3. Now a report shall be generated for the same.. means a ".html" will be generated and given to the same jsp..

4.Only one jsp is responsible for taking the parameters and displaying the Reports...

5.I am perfectly generating the jasper reports depending upon the parameters from jsp(user)...but the problem is how to display that dynamically...(Using Iframe i am getting report but that is static not dynamic)...
Pliz help me out
give me code
 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
divide your jsp on two independent parts, depending form parameter.

For example introduce parameter "showReport" = pass it by POST or GET. For instance if your one *.jsp page is report.jsp - to see form, use http://.../report.jsp?showReport=false, to see the result - use http://.../report.jsp?showReport=true.

Then this parameter can be considered to separate form rendering from results rendering. Use JSTL tags or easy scriplets to control the flow of jsp execution.

Use redirect or forward directive to output result from jasper.

The described solution does not imply any iframes. With frames - it is easier. Create two jsp pages first (one for form and one for result). show them in separate iframes of one html document. Use javascript to build url and point this url to access the result page, refresh it if there is a signal form form.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Duplicate of:
https://coderanch.com/forums/
 
Put the moon back where you found it! We need it for tides and poetry and stuff. Like this tiny ad:
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
    Bookmark Topic Watch Topic
  • New Topic