Jump to content
We've recently updated our Privacy Statement, available here ×

HBK32

Members
  • Posts

    45
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by HBK32

  1. Hi Everyone, I have developed JSP file which generates output in HTML format on web. Application server is WebSphere. its working fine in windows envioronment but when I am trying to run it on UNIX machine its giving following error. SRVE0068E: Could not invoke the service() method on servlet /Process.jsp. Exception thrown : javax.servlet.ServletException: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable. Here I am also attaching JSP(Process.JSP) file which generates report output in HTML format. Basically Process.JSP called by index2.jsp. Means index2.jsp is calling Process.JSP. I am attaching both files with this post. Following is the code for PROCESS.JSP. --------Code(Process.JSP) starts here----------------- <%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %> <jsp:useBean id="db" class="ConnDB.DB" scope="request" > <jsp:setProperty name="db" property="*" /> </jsp:useBean> <html> <head> <title>Process</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#F5F7F0"> <%@ page import="ConnDB.*"%> <%@ page import="java.awt.*"%> <%@ page import="java.sql.Connection"%> <%@ page import="net.sf.jasperreports.engine.*" %> <%@ page import="net.sf.jasperreports.engine.util.*" %> <%@ page import="net.sf.jasperreports.engine.export.*" %> <%@ page import="com.lowagie.text.pdf.PdfWriter" %> <%//@ page import="javax.print.attribute.*"%> <%//@ page import="javax.print.attribute.standard.*" %> <%@ page import="java.util.*" %> <%@ page import="java.io.*" %> <%@ page import="java.io.OutputStream" %> <% String IValue1 = request.getParameter("nameLine1"); Map parameters = new HashMap(); parameters.put("InputValue1",IValue1); File reportFile = new File(application.getRealPath("/WEB-INF/Jasper/SampleDemo.jasper")); JasperReport jasperReport = (JasperReport)JRLoader.loadObject(reportFile.getPath()); //Get Connection object Connection conn=(new DB()).connect("Weblogic","svrabm"); //Filling Report JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport,parameters,conn); // Create Destination File File destFile = new File(reportFile.getParent(), jasperPrint.getName() + ".html"); String Destination = destFile.toString(); //code For HTML View.... JRHtmlExporter exporter = new JRHtmlExporter(); StringBuffer sbuffer = new StringBuffer(); OutputStream out1=null; Hashtable imagesMap = new Hashtable(); session.setAttribute("IMAGES_MAP", imagesMap); exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, out1); exporter.setParameter(JRExporterParameter.OUTPUT_WRITER, out); exporter.setParameter(JRExporterParameter.OUTPUT_FILE, destFile); exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, Destination); // exporter.setParameter(JRHtmlExporterParameter.IS_ENCRYPTED, Boolean.TRUE); //exporter.setParameter(JRHtmlExporterParameter.IS_128_BIT_KEY, Boolean.TRUE); exporter.setParameter(JRHtmlExporterParameter.IMAGES_MAP, imagesMap); exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, "image.jsp?image="); exporter.exportReport(); %> <script language="JavaScript"> window.location("WEB-INF/Jasper/SampleDemo.html"); </script> </body> </html> --------Code(Process.JSP) ends here----------------- I will really appreciate your response. Please reply me ASAP. Thanks in advance. Post edited by: badrishpandya, at: 2008/06/10 03:42 Post edited by: badrishpandya, at: 2008/06/10 03:45
  2. Hi Everyone, Can anybody help me with how to install jasper server on websphere? What are the steps to configure jasper server with websphere? Please reply me ASAP. I will really appreciate your response. Thanks.
  3. Hi Everyone, Recently I have downloaded iReport 2.0.5 & installed it on my PC. When I am trying to running its exe file its giving following error. Java Virtual Machine Launcher Could not find the main class.Program will exit I got J2SDK 1.4.2_05 on my machine. JAVA_HOME=C:j2sdk1.4.2_05bin Can some one help me how to resolve this issue? I will really appreciate the response. Reply ASAP. Thanks.
  4. Hello, I am generating report which gives output in Excel sheet.In that it is missing leading zero when zipcode starts with zero BUT in the PDF it is coming correctly NOT in Excel sheet.Why? Data type for zipcode is String. Now anyone has an idea how to print zipcode with leading zero in Excel sheet??? Thanks in advance, Badrish.
  5. Hello, I am generating report which gives output in Excel sheet.In that it is missing leading zero when zipcode starts with zero BUT in the PDF it is coming correctly NOT in Excel sheet.Why? Data type for zipcode is String. Now anyone has an idea how to print zipcode with leading zero in Excel sheet??? Thanks in advance, Badrish.
  6. Thanks a lot for your kind reply..... Yes it works......I found following way which also works. (new SimpleDateFormat("yyyy-MM-dd")).parse($P{StartDt}) Then in pattern Tab you can define what ever date format you want.....like e.g. MM/dd/yyyy Badrish.:)
  7. Hi, Yes I am using TextField only.....I did the same thing as you mentioned but it is giving this following error....as parameter type is String net.sf.jasperreports.engine.JRException:ÂErrorsÂwereÂencounteredÂwhenÂcompilingÂreportÂexpressionsÂclassÂfile: 1. Cannot cast from String to Date value = (java.util.Date)(((java.lang.String)parameter_StartDt.getValue()));
  8. Thanks a lot for your kind reply..... It works :) Badrish.
  9. Hi, I am passing date parameter as a type string in format i.e. "YYYY-MM-DD", now I want to display in format "MM/dd/yyyy" format. Problem is I am passing date field as String type parameter. How can I convert it to into perticular format("MM/dd/yyyy") in iReports/Jasper internally as I will get date field as a String type!!! Reply as soon as possible. Thanks in advance, Badrish.:)
  10. Hello, I am using iReports & JasperReports 1.3.0 I am able to use Page break which is working fine but when I am trying to use Page/Column break element as a Column break its taking page break by default. I set break type as Column in page/column break properties but it is automatically getting change to break type as Page. Anyone has idea how to use Page/Column break element as column break? Thanks in advance, Badrish.:)
  11. Hello, Is there anyone who has idea how to generate columns dynamically? Means if result set has 10 records/columns than report will create 10 columns. If result set has 5 OR 7 records/columns then it will generate 7 columns. In other way if record returns 7 OR 10 columns then it will generate columns(7 or 10) accordingly for that perticular record. In short number of column is not fixed... Reply as soon as possible.... Thanks in advance :) Badrish.
  12. Hello, Can anyone please tell me in which Jasper version Demo/Samples(jasperreports/trunk/jasperreports/demo/samples/) example I can find use of newly added Page or Column Break element? Means I want to see sample example for the newly added page or column break element. OR anyone tell me how it works as I tried it by placing it in DETAIL band but it didn't work ......Is there anything I need to set in any band/report properties? Can wee use it in all bands?? Thanks in advance :) Badrish.
  13. Hello, Can you please tell me in which Demo/Samples(jasperreports/trunk/jasperreports/demo/samples/) example I can find use of newly added Page or Column Break element? Means I want to see sample example for the newly added page or column break element. Can wee use it in all bands?? Thanks in advance, Badrish.:)
  14. Hello, Can you please tell me in which Demo/Samples(jasperreports/trunk/jasperreports/demo/samples/) example I can find use of newly added Page or Column Break element? Means I want to see sample example for the newly added page or column break element. Can wee use it in all bands?? Thanks in advance, Badrish.:)
  15. Hello, In the newer version of iReports i.e. iReports-1.3.0 onwards there is a page/column break element available. I did put it in the detail,title,header & footer band of the report but it was not working at all.Please advise whats the procedure or is there anyhting i need to set in the reports property or element property? Please reply ASAP. Thanks in advance :) Badrish.
  16. Hello, I am running report which has total 6 pages(PDF format) as output. Now I want to know if 10,000 users run this report at the same time(i.e. 10,000 users * 6 pages = 60,000 pages ) than how much time or how long it will take to execute this report? Also suggest whats the best way to do so?? Thanks in Advance, Badrish.:)
  17. Hello, I am running report which has total 6 pages(PDF format) as output. Now I want to know if 10,000 users run this report at the same time(i.e. 10,000 users * 6 pages = 60,000 pages ) than how much time or how long it will take to execute this report? Also suggest whats the best way to do so?? Thanks in Advance, Badrish.:)
  18. Thanks a lottt.... Its working now. Badrish.:)
  19. I have 8 subreport which is placed in detail part of the Master report i.e. one master report & 8 subreports. Now I want to start perticular subreport on the new page.Can anybody help me on this???Its very urgent..... Thanks in advance... Badrish.:)
  20. I have 8 subreport which is placed in detail part of the Master report i.e. one master report & 8 subreports. Now I want to start perticular subreport on the new page.Can anybody help me on this???Its very urgent..... Thanks in advance... Badrish.:)
×
×
  • Create New...