Jump to content
Changes to the Jaspersoft community edition download ×

angopal

Members
  • Posts

    5
  • Joined

  • Last visited

angopal's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. hi I am having problem in compiling my JSP code with Jasper reports in eclipse , I get general exception . But as simple JSP the below code works fine in tomcat. I think i need some help in how to compile and also the path and where to put the JRXML file in eclipse Pls check the attached code. <%@ page language="java"%> <%@ page import="java.io.*" %> <%@ page import="java.sql.*" %> <%@ page import="java.lang.*" %> <%@ page import="java.util.*" %> <%@ page import="java.lang.ClassLoader"%> <%@ page import="javax.sql.DataSource" %> <%@ page import="javax.naming.InitialContext" %> <%@ page import="net.sf.jasperreports.engine.*" %> <%@ page import="net.sf.jasperreports.engine.xml.JRXmlLoader" %> <%@ page import="net.sf.jasperreports.engine.design.JasperDesign" %> <%@page session="true" %> <% JasperReport jasperReport; JasperPrint jasperPrint; Map parameters = new HashMap(); Statement st; JRResultSetDataSource obj; ResultSet rs; try { String customername=session.getValue("cname").toString(); Class.forName("com.mysql.jdbc.Driver").newInstance(); Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/pentagon","root",""); JasperDesign design = JRXmlLoader.load(application.getRealPath("/WEB-INF/reports/sample.jrxml")); jasperReport = JasperCompileManager.compileReport(design); byte[] bytes = JasperRunManager.runReportToPdf(jasperReport,parameters,conn); response.setContentType("application/pdf"); response.setContentLength(bytes.length); ServletOutputStream ouputStream = response.getOutputStream(); ouputStream.write(bytes, 0, bytes.length); ouputStream.close(); } catch(JRException e) { } %>
  2. Hi, Actually I am having jrxml file taken from ireports, and now i want to integrate with my jsp code that to take a print with one click submit button, can u pls assist me how to do this, thanks in advance,
  3. Hi, Can u pls explain how to integrate the jasper file with jsp page, i have taken output from ireports and i am having the jasper file, can u pls help me out. thanks Gopal
  4. Hi, Actually we are developing a project with PHP and MySQL, and for reporting we surfed, we got jasper reports it should be used with ireports to generate. We have configured ireports and the output is taken, what i need is i want to give link to my php button that it has to show the reports using the jrxml file, how to do this. please help me, I am new to this. Thanks
  5. Hi, I have taken output from ireports and i am having jrxml file, I am using apache web server, is it possible to integrate the jrxml file with php or javascript with apache server or we need tomcat server. Thanks in advance.
×
×
  • Create New...