Jump to content

Help with Jasper Report in a web project


jesus_jfri

Recommended Posts

Hey people, i want to display my empty report( only with a tittle made in jasper studio) in my web broswer, using my jsp like i always do . because I am learning how to use it, the thing is I used this piece of code in my jsp:
 

<%@ page contentType="application/pdf" %>
<%@ page trimDirectiveWhitespaces="true" %>
<%@ page import="net.sf.jasperreports.engine.*" %>
<%@ page import="net.sf.jasperreports.engine.export.*" %>
<%@ page import="java.util.*" %>
<%
 
  JasperPrint print = JasperFillManager.fillReport("/resources/Reports/reportjasper", new HashMap(),new JREmptyDataSource());
 
  JasperExportManager.exportReportToPdfStream(print,response.getOutputStream());
 
%>
 
but when i try to charge the web page , i saw an error and it does not charge my pdf report,           the jar what I include were jasperreports-6.1.0.jar, jasperreports-fonts-6.1.0.jar and 
jasperreports-functions-6.1.0.
 
 
Any idea people? I will be gratefull with you all! 
Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...