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

ianlong

Members
  • Posts

    10
  • Joined

  • Last visited

ianlong's Achievements

Rookie

Rookie (2/14)

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

Recent Badges

0

Reputation

  1. ianlong wrote: Hi All, I'm running into a MYSQL bug that returns the wrong JDBC type for DATE column in CASE statements, where it returns a VARBINARY type instead of a DATE type. Thus, I'm getting a class cast exception when trying to create a field like so: <field name="posted_date" class="java.sql.Date"/> I have tried to use a String and an IoStream as the class of the field, but all return cast exceptions. What's the best way to handle these columns when I define fields? Thanks in advance, Ian Here is the relevant part of the stack trace: Caused by: net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression : Source text : $F{completed_date} at net.sf.jasperreports.engine.fill.JREvaluator.evaluateEstimated(JREvaluator.java:257) at net.sf.jasperreports.engine.fill.JRCalculator.evaluateEstimated(JRCalculator.java:528) at net.sf.jasperreports.engine.fill.JRCalculator.estimateVariables(JRCalculator.java:173) at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:779) at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:1412) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:111) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:891) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:814) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:89) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:601) at com.opterus.opscenter.common.reports.JasperReportsUtils.renderAsHtml(JasperReportsUtils.java:189) at com.opterus.opscenter.common.reports.JasperReports.execute(JasperReports.java:180) ... 132 more Caused by: java.lang.ClassCastException: [b at TaskStatus_1213044528228_398787.evaluateEstimated(TaskStatus_1213044528228_398787.java:1296) at net.sf.jasperreports.engine.fill.JREvaluator.evaluateEstimated(JREvaluator.java:246) ... 143 more Post edited by: ianlong, at: 2008/06/09 23:27
  2. Hi All, I'm running into a MYSQL bug that returns the wrong JDBC type for DATE column in CASE statements, where it returns a VARBINARY type instead of a DATE type. Thus, I'm getting a class cast exception when trying to create a field like so: <field name="posted_date" class="java.sql.Date"/> I have tried to use a String and an IoStream as the class of the field, but all return cast exceptions. What's the best way to handle these columns when I define fields? Thanks in advance, Ian Post edited by: ianlong, at: 2008/06/09 23:26
  3. itchytoes wrote: Hi -- I've had blank lines appear when my font size is just a tad too big for the allocated height. I notice you have font size="13" and height="15". Perhaps you could try a smaller font size or bigger height to see if it makes a difference? I'm not sure why the machine would matter though. Betty Hi All, Problem solved! Your suspicion was indeed correct. The font was too big for the allocated height. Lucian's tip was also crucial, because the Arial font was not installed, as he suspected. I think the production system substituted a font which was too big, whereas the specified arial font fit locally. Thanks! Ian
  4. itchytoes wrote: Hi -- I've had blank lines appear when my font size is just a tad too big for the allocated height. I notice you have font size="13" and height="15". Perhaps you could try a smaller font size or bigger height to see if it makes a difference? I'm not sure why the machine would matter though. Betty I'm wondering if some kind of font substitution is happening, and on that machine the font is larger than the area available? I'll give it a try, thanks for the suggestion. Cheers, Ian
  5. lucianc wrote: It's not clear what the problem is, but you might want to check whether the Arial font is available in the Java VM of the machine where you have the problem. Regards, Lucian Thanks for the response, but I don't think that's the issue, all of the other text fields with that font render correctly. In the following: <band height="17" isSplitAllowed="true" > <printWhenExpression><![CDATA[boolean.valueOf($P{ShowDetail}.equals( Boolean.TRUE ))]]></printWhenExpression> <textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Group" evaluationGroup="location" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="25" y="2" width="243" height="15" key="textField-1" isPrintWhenDetailOverflows="true"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement textAlignment="Left"> <font fontName="Arial" pdfFontName="Helvetica-Bold" size="13" isBold="true"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{location} + " - " + $F{location_name}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="322" y="2" width="112" height="15" forecolor="#000000" key="textField-5" isPrintWhenDetailOverflows="true"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement textAlignment="Center"> <font fontName="Arial" pdfFontName="Helvetica-Bold" size="13" isBold="true"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$R{text.percentcomplete}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="435" y="2" width="101" height="15" key="textField"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" leftPadding="2" rightBorder="None" rightBorderColor="#000000" rightPadding="2" bottomBorder="None" bottomBorderColor="#000000"/> <textElement textAlignment="Center"> <font fontName="Arial" pdfFontName="Helvetica-Bold" size="13" isBold="true"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$R{text.duedate}]]></textFieldExpression> </textField> <line direction="TopDown"> <reportElement x="0" y="0" width="648" height="1" forecolor="#CCCCCC" key="line-6"/> <graphicElement stretchType="NoStretch"/> </line> </band> All the text fields are rendered except this one: <textFieldExpression class="java.lang.String"><![CDATA[$F{location} + " - " + $F{location_name}]]></textFieldExpression> Where nothing at all gets rendered, just a blank ( empty column ) in the report. Ian
  6. ianlong wrote: Hi All, I'm using jasper reports 1.3.2, and I have an issue that is only reproducible on my production server. I have a report that doesn't fully render on the production server, but that renders fine on all other machine ( Windows XP, Max OS X). Basicaly an empty line gets printed instead of what is supposed to be. I know the query returns the correct information, so that isn't the problem. This makes it very hard to debug! I have tried turning on logging, and the stack trace, although not very comprehensive, is the same for both my local machine and the production server. I know I haven't given many details, but I've attached the report, and I can attach screenshots of the differences, but I don't know what else to provide. My guess was that an exception was being thrown and swalled internally in jasper, and that this accounted for the missing text, but I can't see where. Has anyone run across things like this before? Does anybody have any suggestions? Thanks in advance, Ian [file name=TaskStatus_1.jrxml size=26380]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/TaskStatus_1.jrxml[/file] Update: I have updated my jasper reports library to 2.0.2 and the problem still persists! Anyone have any suggestions? TIA, Ian
  7. Hi All, I'm using jasper reports 1.3.2, and I have an issue that is only reproducible on my production server. I have a report that doesn't fully render on the production server, but that renders fine on all other machine ( Windows XP, Max OS X). Basicaly an empty line gets printed instead of what is supposed to be. I know the query returns the correct information, so that isn't the problem. This makes it very hard to debug! I have tried turning on logging, and the stack trace, although not very comprehensive, is the same for both my local machine and the production server. I know I haven't given many details, but I've attached the report, and I can attach screenshots of the differences, but I don't know what else to provide. My guess was that an exception was being thrown and swalled internally in jasper, and that this accounted for the missing text, but I can't see where. Has anyone run across things like this before? Does anybody have any suggestions? Thanks in advance, Ian [file name=TaskStatus_1.jrxml size=26380]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/TaskStatus_1.jrxml[/file]
  8. Hi, Thanks for the reply. Maybe I don't understand something, how would I reference them if they are not stored on disk? I'm not sure I understand what my alternative would be? Thanks, Ian
  9. Hi All, No, it's not the typical question :) I have jasper reports integrated into my jsf/facelets application to generate reports. Some of my reports contain charts, and I have jasper reports configured to save the images so that I can reference them externally. Since jasper reports always seems to use img_0_0_2 for the filename, I have been using the session id as a directory name so that it works correctly for multiple users who may generate different reports at the same time. Are there any rules of thumb for doing this kind of thing? Ie, configuring jasper reports to generate a random filename? Other suggestions? I should mention I'm just using jasper to generate raw html which I then include in my pages generated with facelets; I'm not using servlets, etc. Any help/comments would be appreciated. Thanks, Ian
×
×
  • Create New...