Win a copy of Java Persistence with Spring Data and Hibernate this week in the Spring forum!
  • 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
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

How to run iReport jrxml from a jsp page

 
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi i'm a newbie trying to learn something. I downloaded ireport and have designed my report. It connects to the database and retrives the value with no problems. When i build the report i'm able to see it as a Pdf and it works.

My question is how do i link this to a jsp page. Lets say when i click a button the pdf report appears. The only file i seem to have in the folder is classic.jrxml Thank you for your help...
 
vanan saravanan
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I downloaded jasperreports-1.2.7-project. Trying out the webapp sample. It required me to download an "ant" tool. Then i did this step

"Once you have ANT installed, launch "ant -p" from the command line in this directory
to learn more about what tasks you could run to build and test the sample."

clean
javac
prepare
viewDesign
viewDesignxml
war

No other instructions were given after this. How do i carry on..
 
vanan saravanan
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok managed to figure out how to use the ant tool. I have done until "ant prepare"

When i try running the jsp file i get the following error. Why is it so..

C rogram FilesApache Tomcat 4.0workStandalonelocalhost_webappjspcompile$jsp.java:3: Package net.sf.jasperreports.engine not found in import.
import net.sf.jasperreports.engine.*;
^

C rogram FilesApache Tomcat 4.0workStandalonelocalhost_webappjspcompile$jsp.java:4: Class net.sf.jasperreports.engine.util.JRProperties not found in import.
import net.sf.jasperreports.engine.util.JRProperties;
 
vanan saravanan
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok managed to solve the problem. Did all the steps accordingly.

Until fill report. "The compiled report design was successfully filled with data."

Then the last step, export report. It gives me an error saying

The requested resource (/webapp/servlets/pdf) is not available.

Why is that so.
 
vanan saravanan
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Managed to solve the problem, Will post back again if i face any difficulties
 
Without deviation from the norm, progress is not possible - Zappa. Tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic