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

developer

Members
  • Posts

    19
  • Joined

  • Last visited

developer's Achievements

Explorer

Explorer (4/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Collaborator Rare

Recent Badges

0

Reputation

  1. Hi , All I want to print text field in BOLD depending on value that is passed from Java. Could anybody tell me how I can do that. Is it real? Thanks.
  2. Hi, I have the similar problem to described in http://jasperforge.org/projects/jasperreports/bugtracking/view.php?id=2834 I have an image in my subreport. I set an image heigh to 1 and a ScaleType to "RealSize". But when I generate my report the Image doesn't stretch. Could anybody tell me what is wrong? Thanks.
  3. Hi, I have the similar problem to described in http://jasperforge.org/projects/jasperreports/bugtracking/view.php?id=2834 I have an image in my subreport. I set an image heigh to 1 and a ScaleType to "RealSize". But when I generate my report the Image doesn't stretch. Could anybody tell me what is wrong? Thanks.
  4. developer

    Align

    Hi , All I have a report with a next structure: Label_1 : Value1 Label_2 : Value2 The task is : when we type very long value to the Value1-Field -> Lable2 and Value2 must positionate down. I use "frame" element for grouping Label_2 : Value2 - I set the positionType of Frame to Float , but they are not displayed. Can anyone help me? Thanks
  5. Hi, I attach the log file: I don't understand what libs I must to add. If I add all libs from jasper libs then in my web app under linux there are a bug described in attached file. If I don't add some libraries the then there are : Error retrive from bean... :blink: Big thanks [file name=login-518e2855ccf083cee982d4c9ce79f1e2.html size=8132]
  6. Can somebody tell me is there are some campatibility issue with jasper libs and other libs?After adding jasper libs my web app have been broken:(
  7. Hi All, I add jasper libs to my web App on Windows - everything works OK. But when I do the same steps on Linux there are some errors. What can be the reason of this strange behaviour and how to fix that? P.S.net.sf.jasperreports.engine.JRException: Error retrieving field value from bean : tailNum Post edited by: developer, at: 2008/05/26 13:56
  8. Hi, I have next report: Code: <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd"> <jasperReport name="PieChartDemoReport"> <field name="tailNum" class="java.lang.String" /> <field name="aircraftSerial" class="java.lang.Integer"/> <variable name="totalAircraft" class="java.lang.Integer" calculation="Sum" resetType="Group" resetGroup="modelGroup"> <variableExpression> <![CDATA[$F{aircraftSerial}]]> </variableExpression> <initialValueExpression> <![CDATA[new java.lang.Integer(0)]]> </initialValueExpression> </variable> <group name="modelGroup"> <groupExpression> <![CDATA[$F{tailNum}]]> </groupExpression> </group> <summary> <band height="700" isSplitAllowed="true" > <pie3DChart> <chart hyperlinkTarget="Self" > <reportElement x="120" y="0" width="400" height="400" key="element-1"/> <box></box> <chartLegend textColor="#000000" backgroundColor="#FFFFFF" > </chartLegend> </chart> <pieDataset> <dataset > </dataset> <keyExpression><![CDATA[$F{tailNum}]]></keyExpression> <valueExpression><![CDATA[$V{totalAircraft}]]></valueExpression> <sectionHyperlink > </sectionHyperlink> </pieDataset> <pie3DPlot > <plot /> </pie3DPlot> </pie3DChart> </band> </summary> </jasperReport> The filling Servlet is: Code:[code] public class MyServlet extends HttpServlet { private JRDataSource createReportDataSource() { JRBeanArrayDataSource dataSource; AircraftData[] reportRows = initializeBeanArray(); dataSource = new JRBeanArrayDataSource(reportRows); return dataSource; } private AircraftData[] initializeBeanArray() { AircraftData[] reportRows = new AircraftData[11]; reportRows[0] = new AircraftData("N1",10); reportRows[1] = new AircraftData("N1",10); reportRows[2] = new AircraftData("N1",10); reportRows[3] = new AircraftData("N1",10); reportRows[4] = new AircraftData("N1",1); reportRows[5] = new AircraftData("N1",1); reportRows[6] = new AircraftData("N1",1); reportRows[7] = new AircraftData("N2",1); reportRows[8] = new AircraftData("N2",1); reportRows[9] = new AircraftData("N2",1); reportRows[10] = new AircraftData("N2",1); return reportRows; } /** Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods. * @param request servlet request * @param response servlet response */ protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out = response.getWriter(); try { JasperReport jasperReport = JasperCompileManager.compileReport(getServletConfig().getServletContext().getRealPath("/reports/test.jrxml"«»)); Map parameters = new HashMap(); JRDataSource dataSource = createReportDataSource(); JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport,parameters, /*new JREmptyDataSource()*/dataSource); JRHtmlExporter exporter = new JRHtmlExporter(); exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); exporter.setParameter(JRExporterParameter.OUTPUT_WRITER, out); exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI,"image?image="«»); request.getSession().setAttribute(ImageServlet.DEFAULT_JASPER_PRINT_SESSION_ATTRIBUTE, jasperPrint); exporter.exportReport(); } catch (JRException ex) { StringWriter stringWriter = new StringWriter(); PrintWriter printWriter = new PrintWriter(stringWriter); ex.printStackTrace(printWriter); out.println(ex.toString()); out.println(ex.getMessage()); } } .... But I have : net.sf.jasperreports.engine.JRException: Error retrieving field value from bean : tailNum Error retrieving field value from bean : tailNum :blink: Thanks P.S. Bean: Code:[code] public class AircraftData { public AircraftData(String tail, int serial) { setTailNum(tail); setAircraftSerial(serial); } public AircraftData() { } private String tailNum; private int aircraftSerial; public int getAircraftSerial() { return aircraftSerial; } public void setAircraftSerial(int aircraftSerial) { this.aircraftSerial = aircraftSerial; } public String getTailNum() { return tailNum; } public void setTailNum(String tailNum) { this.tailNum = tailNum; } } Post edited by: developer, at: 2008/05/25 12:42
  9. Hi All, I add to my web - app next libraries: Code: commons-collections-2.1.jar, commons-digester-1.7.jar, jasperreports-2.0.4.jar, jasperreports-2.0.4-applet.jar, jasperreports-2.0.4-javaflow.jar, jcommon-1.0.0.jar, jfreechart-1.0.0.jar, xalan.jar, xercesImpl.jar, xml-apis.jar. Compilation is OK. But when I run my project the next exception displays: Code:[code] net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file: /opt/netbeans-5.5/enterprise3/apache-tomcat-5.5.17/bin/PieChartDemoReport_1211714423569_535946.java:4: package net.sf.jasperreports.engine does not exist import net.sf.jasperreports.engine.*; ^ /opt/netbeans-5.5/enterprise3/apache-tomcat-5.5.17/bin/PieChartDemoReport_1211714423569_535946.java:5: package net.sf.jasperreports.engine.fill does not exist import net.sf.jasperreports.engine.fill.*; ^ /opt/netbeans-5.5/enterprise3/apache-tomcat-5.5.17/bin/PieChartDemoReport_1211714423569_535946.java:18: cannot find symbol symbol: class JREvaluator public class PieChartDemoReport_1211714423569_535946 extends JREvaluator ^ /opt/netbeans-5.5/enterprise3/apache-tomcat-5.5.17/bin/PieChartDemoReport_1211714423569_535946.java:25: cannot find symbol symbol : class JRFillParameter location: class PieChartDemoReport_1211714423569_535946 private JRFillParameter parameter_REPORT_RESOURCE_BUNDLE = null; ^ /opt/netbeans-5.5/enterprise3/apache-tomcat-5.5.17/bin/PieChartDemoReport_1211714423569_535946.java:26: cannot find symbol symbol : class JRFillParameter location: class PieChartDemoReport_1211714423569_535946 private JRFillParameter parameter_REPORT_CLASS_LOADER = null; How to fix this problem?May be I must to add some additional library? Big Thanks!
  10. Hi, thanks for response. I have a JR version 2.0.4 In Windows netbens version 5.0 everything works OK but on Linux(Debian) after adding libs my web app fails. I make reports with one JR 2.0.4(in my app I use libs of JR for creation and displaying) When I said about compatibility I mean compatibility with maybe jstl :blink: or other netbeans tomcat libs??? Is there some solution?May be in netbeans there are some specific way how to add libs to classpath :blink: or may be some lib from JR I need't to add??? Thanks! Post edited by: developer, at: 2008/05/16 16:39
  11. Hi All, after adding Jasper's lib my WebApp doesn't want compile. I attach the log file : Is there some compatibility issue may be? I use : netbeans,Tomcat, mysqlconnector,jstl libs. Thanks. [file name=login.html size=8132] Post edited by: developer, at: 2008/05/16 10:08
  12. Hi, a have the next report Code: <jasperReport name="PieChartDemoReport"> <field name="tailNum" class="java.lang.String" /> <field name="aircraftSerial" class="java.lang.Integer"/> <variable name="totalAircraft" class="java.lang.Integer" calculation="Count" resetType="Group" resetGroup="modelGroup"> <variableExpression> <![CDATA[$F{aircraftSerial}]]> </variableExpression> <initialValueExpression> <![CDATA[new java.lang.Integer(0)]]> </initialValueExpression> </variable> <group name="modelGroup"> <groupExpression> <![CDATA[$F{tailNum}]]> </groupExpression> </group> <summary> <band height="750"> <pieChart> <chart evaluationTime="Report"> <reportElement x="135" y="0" width="270" height="350" /> </chart> <pieDataset> <dataset incrementType="None" /> <keyExpression> <![CDATA[$F{tailNum}]]> </keyExpression> <valueExpression> <![CDATA[$V{totalAircraft}]]> </valueExpression> </pieDataset> <piePlot> <plot/> </piePlot> </pieChart> </band> </summary> </jasperReport> But in my browser insted one chart there several.When I fill a report the data is: tailNum="A" aircarftSerial=10 tailNum="A" aircarftSerial=1 tailNum="B" aircarftSerial=2 tailNum="A" aircarftSerial=20 But in chart it displays on 2 equals part.It seems that aircarftSerial doesn't calculated?? P.S. How to set aggregation functions on iReport? Thanks
  13. Hi , big THANKS I undertand my bug It's working :). Now Image successfuly displays in my browser but instead one image there are several charts and there no aggregation functions on chart.:blink: However Thanks!!! Post edited by: developer, at: 2008/05/10 07:19
  14. Ishannon , Thank You very much for response. I set classpath successfuly(set path to jar file instead C:).But iReport generate me the same report that I did manualy (I began to use iReport because i thought that in my manualy report was a bug).I have a simple Bean which contains String and int field.I want to grup by String field. Code: <jasperReport name="PieChartDemoReport"> <field name="tailNum" class="java.lang.String" /> <field name="aircraftSerial" class="java.lang.Integer"/> <variable name="totalAircraft" class="java.lang.Integer" calculation="Count" resetType="Group" resetGroup="modelGroup"> <variableExpression> <![CDATA[$F{aircraftSerial}]]> </variableExpression> <initialValueExpression> <![CDATA[new java.lang.Integer(0)]]> </initialValueExpression> </variable> <group name="modelGroup"> <groupExpression> <![CDATA[$F{tailNum}]]> </groupExpression> </group> <summary> <band height="750"> <pieChart> <chart evaluationTime="Report"> <reportElement x="135" y="0" width="270" height="350" /> </chart> <pieDataset> <dataset incrementType="None" /> <keyExpression> <![CDATA[$F{tailNum}]]> </keyExpression> <valueExpression> <![CDATA[$V{totalAircraft}]]> </valueExpression> </pieDataset> <piePlot> <plot/> </piePlot> </pieChart> </band> </summary> </jasperReport>As I understand the group field set in KeyExpression- right? But when I try to generate report from Servlet no data displayed but only missing images in my browser :( So I can't undestand is it's bug in my report?and how to set aggregation functions in iReport for charts - is it possible P.S. In my console app the same report show me the : Code:[code] net.sf.jasperreports.engine.JRException: Error retrieving field value from bean : aircraft at net.sf.jasperreports.engine.data.JRAbstractBeanDataSource.getBeanProperty(JRAbstractBeanDataSource.java:127) at net.sf.jasperreports.engine.data.JRAbstractBeanDataSource.getFieldValue(JRAbstractBeanDataSource.java:100) at net.sf.jasperreports.engine.data.JRBeanArrayDataSource.getFieldValue(JRBeanArrayDataSource.java:90) at net.sf.jasperreports.engine.fill.JRFillDataset.setOldValues(JRFillDataset.java:814) at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:778) Thank You very much for reading this long text and sorry for my English it's not my native language.
  15. Hi, Ishannon I am new in iReport and JasperReports. When I go to Data -> Report Query -> JavaBean DataSource the dialog shows me Class not fount exception.Check class path. In Options->CLASSPATH i set value for example C: but exception appear again. Could You help me?
×
×
  • Create New...