473,386 Members | 1,773 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Having trouble in generating Jasper report!!!

58
Hi all,
* I am working on jasper reports,I have successfully generated sample pdf report from a java program.

* But i am getting problems when i tend to call that report genarating method from a commandButton of a jsp page.

The java code executed successfully:
*******************************************
getpdf()
{
jasperReport = JasperCompileManager.compileReport( "c:\\Report.jrxml");

jasperPrint = JasperFillManager.fillReport(
jasperReport, new HashMap(), new JREmptyDataSource());

JasperExportManager.exportReportToPdfFile(
jasperPrint, "c:\\sample.pdf");

}

The Report.jrxml file:
************************
<?xml version="1.0"?>
<!DOCTYPE jasperReport
PUBLIC "-//JasperReports//DTD Report Design//EN"
"http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">

<jasperReport name="Simple_Report">
<detail>
<band height="20">
<staticText>
<reportElement x="180" y="0" width="200" height="20"/>
<text><![CDATA[Hello World!]]></text>
</staticText>
</band>
</detail>
</jasperReport>

jsp page code for calling that getpdf() method:
************************************************** **
<h:commandButton styleClass="buttonimg"
image="../../" value=" " action="#{OrderList.getPdf}" />


Exception I got:
******************
package net.sf.jasperreports.engine does not exist
import net.sf.jasperreports.engine.*;

For ur kind attention:
************************
* I can able to generate pdf report successfully when i execute getpdf() as a stand alone java program.

* But i am getting exception, only wen i tend to call that getpdf() method from a jsp as mentioned above.The report was not compiled due to unavailable packages.

Did anyone face this problem,kindly get me a solution for this problem,I am almost stuck wit this crisis,dono know how to proceed further???

Awaiting ur ideas on it.

Thanks In Advance,
Sundar.
Sep 27 '07 #1
0 1565

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Anand | last post by:
Hi i am having trouble adding a recordset into the access database, the code seems to be working fine it passs and parses through all variables just fine without showing any errors and also when i...
0
by: alexz | last post by:
Generating a report Alexander | Posted 11:05am 31. March 2004 Server Time | 3 Tables 1) Titles - The course titles 2) Courses - The schedules Courses 3) Students - Coueses a Student is...
2
by: ed | last post by:
i'm having trouble with a form. I want to be able to type in the address of the form with the data for the form items in the URL (ie: http://somesite.com/formpage.html?field1=data1&field2=data2)....
0
by: Raghavendra | last post by:
hi, we r using forms authetication. problem :- i am using the below code to generate excel report but since we r using forms authetication.. after generating excel report the browser directs...
0
by: Jozef | last post by:
Hello, I'm having trouble with the download links on my web server. The error I'm getting is; CGI Timeout The specified CGI application exceeded the allowed time for processing. The server...
2
by: Stu | last post by:
Hi guys, I've been having trouble getting the clock function to work portably, please could I get some thoughts? <Possibly OT comments> It works fine on my laptop (under WinXP) and on my...
3
by: suryavanshi | last post by:
how i call the jasper report file from the jsp
0
by: techuse | last post by:
how to set no data when no data from db in jasper report? i got no data in report when even there is no data in db.but it displays with static fields.how to display with out static field?
0
by: mdsamiuddin | last post by:
hey am new to jasper report....will u guide me how to get started with it.....i have an application..it is an yearly based application..if i select any year the web page should display...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.