Jump to content
Changes to the Jaspersoft community edition download ×

bkraut

Members
  • Posts

    14
  • Joined

  • Last visited

bkraut's Achievements

Apprentice

Apprentice (3/14)

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

Recent Badges

0

Reputation

  1. Hi, My question relates to subreports. I know that when I build a report I can create subreports, which are in separate files. I would like to know if it is possible to wmbeed subreports into the same file? Best regards, Bojan Post Edited by bkraut at 08/17/2011 09:37
  2. Hi, I tried to create a HQL driven JasperReport. It works with no problems if there are just simple queries like "select o from User o". If I create a simple join like "select o from User o left join o.account" it doesn't work any more and I get following error: net.sf.jasperreports.engine.JRException: Error retrieving field value from bean The query runs with no problems in Eclipse HQL Editor. I've checked a lot of forums and I couldn't find any answers. I'm attaching my JRXML file. Best regards, Bojan Code:<?xml version="1.0" encoding="UTF-8"?><jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="CRM.SI.000002" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20"> <queryString language="hql"> <![CDATA[select o from Opportunity o]]> </queryString> <field name="amount" class="java.math.BigDecimal"> <fieldDescription><![CDATA[amount]]></fieldDescription> </field> <field name="probability" class="java.lang.Integer"> <fieldDescription><![CDATA[probability]]></fieldDescription> </field> <field name="name" class="java.lang.String"> <fieldDescription><![CDATA[name]]></fieldDescription> </field> <field name="description" class="java.lang.String"> <fieldDescription><![CDATA[description]]></fieldDescription> </field> <variable name="totalRecords" class="java.lang.Long" calculation="Count"/> <background> <band splitType="Stretch"/> </background> <title> <band height="32" splitType="Stretch"> <staticText> <reportElement x="0" y="12" width="555" height="20"/> <textElement textAlignment="Center"> <font size="14" isBold="true" pdfEncoding="Cp1250" isPdfEmbedded="false"/> </textElement> <text><![CDATA[List of Opportunities]]></text> </staticText> <staticText> <reportElement x="489" y="0" width="66" height="12"/> <textElement textAlignment="Right"> <font size="8" isBold="false" pdfEncoding="Cp1250" isPdfEmbedded="false"/> </textElement> <text><![CDATA[ERP.SI.000002]]></text> </staticText> </band> </title> <pageHeader> <band splitType="Stretch"/> </pageHeader> <columnHeader> <band height="13" splitType="Stretch"> <staticText> <reportElement x="140" y="0" width="235" height="12"/> <textElement> <font size="9" isBold="true" pdfEncoding="Cp1250" isPdfEmbedded="false"/> </textElement> <text><![CDATA[Description]]></text> </staticText> <staticText> <reportElement x="489" y="1" width="66" height="12"/> <textElement textAlignment="Right"> <font size="9" isBold="true" pdfEncoding="Cp1250" isPdfEmbedded="false"/> </textElement> <text><![CDATA[Amount]]></text> </staticText> <staticText> <reportElement x="0" y="0" width="140" height="12"/> <textElement> <font size="9" isBold="true" pdfEncoding="Cp1250" isPdfEmbedded="false"/> </textElement> <text><![CDATA[Name]]></text> </staticText> <staticText> <reportElement x="375" y="0" width="82" height="12"/> <textElement> <font size="9" isBold="true" pdfEncoding="Cp1250" isPdfEmbedded="false"/> </textElement> <text><![CDATA[Probability]]></text> </staticText> </band> </columnHeader> <detail> <band height="13" splitType="Stretch"> <line> <reportElement x="0" y="-1" width="555" height="1"/> </line> <textField> <reportElement x="2" y="1" width="138" height="12"/> <textElement> <font size="9"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{name}]]></textFieldExpression> </textField> <textField> <reportElement x="140" y="1" width="235" height="12"/> <textElement> <font size="9"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{description}]]></textFieldExpression> </textField> <textField> <reportElement x="376" y="1" width="81" height="12"/> <textElement> <font size="9"/> </textElement> <textFieldExpression class="java.lang.Integer"><![CDATA[$F{probability}]]></textFieldExpression> </textField> <textField pattern="#,##0.00;-#,##0.00"> <reportElement x="458" y="1" width="97" height="12"/> <textElement textAlignment="Right"> <font size="9"/> </textElement> <textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{amount}]]></textFieldExpression> </textField> </band> </detail> <columnFooter> <band splitType="Stretch"/> </columnFooter> <pageFooter> <band height="20" splitType="Stretch"> <textField> <reportElement x="229" y="2" width="100" height="15"/> <textElement textAlignment="Center"> <font pdfEncoding="Cp1250" isPdfEmbedded="false"/> </textElement> <textFieldExpression class="java.lang.Integer"><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression> </textField> </band> </pageFooter> <summary> <band height="42" splitType="Stretch"> <textField pattern="" isBlankWhenNull="false"> <reportElement x="30" y="1" width="68" height="12"/> <textElement rotation="None"> <font size="9" pdfEncoding="Cp1250" isPdfEmbedded="false"/> </textElement> <textFieldExpression class="java.lang.Long"><![CDATA[$V{totalRecords}]]></textFieldExpression> </textField> <staticText> <reportElement x="0" y="1" width="30" height="12"/> <textElement> <font size="9" isBold="true" pdfEncoding="Cp1250" isPdfEmbedded="false"/> </textElement> <text><![CDATA[Count:]]></text> </staticText> <line> <reportElement x="0" y="0" width="555" height="1"/> </line> </band> </summary></jasperReport>
  3. I have to get a return variable back from the subreport. Although I tried several times, I allways retriev null. The subreport displays a table and makes sum over those values. The sum should be returned to the main report. How can I do that? Any help appreciated.
  4. Hi, I'm designing reports with iReport. When I preview report with two subreports in iReport it works perfect. But when I do that in java - subreport does not generate any data. Any help apreciated. Bojan
  5. If you use iReport there is an option in the Properties pane where you can select in When No Data -> All Sections no Detail.
  6. I had the same problem as I wanted to put all the reports into the database. Now I think I'll put them on the file system. What you can do is to retrieve the content of the external file and put it into a local tmp file which is put to jasper as a parameter.
  7. report jrxml describes the structure of the report. If you wanna do something special (I don't know why, do a temporary file and use it as a jasper report definition.) In java it is very easy to make tmp file. Try.
  8. This is quite easy. For each type of reports like RTF, PDF, ... you have to write different method as different reports are prepared different. Then you just offer some trigger (maybe select will do), what kind of report generation user wants. I've done that - works flawles.
  9. Use in set in your mysql select * from something where a in ()
  10. Hi, I'd like to store subreports and resources in database as I do with main reports. What kind of reference can I use? Thanks in advance. Bojan
  11. bkraut

    UTF-8

    We are using Slovenian characters for reports. The application encoding is UTF-8 also the database encoding is UTF-8. When creating report, Å¡Äćšž (special characters) are not displayed correctly. Any help appreciated. Thanks in advance. Bojan
  12. I solved the whole thing. I'm not satisfied but it works. I used subreport and included it into main report.
  13. Hi! I tried for two days now to solve this problem. How can I create some pages on the end of the document with more or less static text??? Let's say I have a page with records from database, but then I'd like to have another page where the author and some text is displayed. How can I do this??? Please help. Best regards, Bojan
  14. I've designed a common offer template. The problem is that I have to have a lot of mainly static text - common conditions. How can I do that? I tried with subreport, but I'd like to have just one template. The problem is spanning the text over several pages. Is this possible? If yes, how? Post edited by: bkraut, at: 2006/10/14 23:20
×
×
  • Create New...