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

tubamanu

Members
  • Posts

    7
  • Joined

  • Last visited

tubamanu's Achievements

Rookie

Rookie (2/14)

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

Recent Badges

0

Reputation

  1. hi there, currently i'm working on some kind of shipping order and i got a problem, maybe someone can help me: Title Element: In Title Element i how adress of the customer, my firm logo and information about the order. These 3 Parts are displayed only on the first page of the report. I used the title tag and it works fine. If there are too many articles in an orderlist, a new page is created. this also works. Now my problem is, that on the second, third....n page should only be displayed information about the order. There should be no logo and no custmer information to see. Currently i used pageHeader tag, but then, my order information is displayed twice on the first page, one in title the other in the pageHeader.... maybe someone can help me, how to display on the first page only my title and on the following pages only the pageHeader.... thx!
  2. Okay , I've found a solution. I will add Master and Subreport Templates here, and my XML Data Source If someone is interested write PM thx everyone 4 help! Code: Post Edited by Manu Smith at 03/03/09 14:57
  3. thx for your help! i don't know if it is correct to use Fields instead of paramter. I've changed subreport tag ( see Code ) but i get when i try to compile, i get these errors...... i also don't know, how to use a paramter instead of an field....:( EDIT: i've taken an example from jasperreports-3.1.4demosamplesxmldatasource... here is used a field to transfer a key date to the subreport thx 4 help! log4j:WARN No appenders could be found for logger (net.sf.jasperreports.engine.xml.JRXmlDigesterFactory). log4j:WARN Please initialize the log4j system properly. net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression : Source text : ((net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).dataSource("/list/orderarticle/article/[packstnumber = '"+$F{packstnumber}+"']") at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:197) at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:574) at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:542) at net.sf.jasperreports.engine.fill.JRFillElement.evaluateExpression(JRFillElement.java:835) at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluateSubreport(JRFillSubreport.java:341) at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluate(JRFillSubreport.java:261) at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:275) at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:426) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:1380) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:692) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:255) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:113) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:888) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:810) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:89) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:601) at mySubTemplate.main(mySubTemplate.java:37) Caused by: net.sf.jasperreports.engine.JRException: XPath selection failed. Expression: /list/orderarticle/article/[packstnumber = '1'] at net.sf.jasperreports.engine.util.xml.XalanXPathExecuter.selectNodeList(XalanXPathExecuter.java:62) at net.sf.jasperreports.engine.data.JRXmlDataSource.moveFirst(JRXmlDataSource.java:263) at net.sf.jasperreports.engine.data.JRXmlDataSource.<init>(JRXmlDataSource.java:178) at net.sf.jasperreports.engine.data.JRXmlDataSource.dataSource(JRXmlDataSource.java:388) at report32name_1236090252694_94507.evaluate(report32name_1236090252694_94507:206) at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:186) ... 16 more Caused by: javax.xml.transform.TransformerException: Nach dem Token '/' oder '//' wurde ein Positionsschritt erwartet. at org.apache.xpath.compiler.XPathParser.error(XPathParser.java:602) at org.apache.xpath.compiler.XPathParser.RelativeLocationPath(XPathParser.java:1579) at org.apache.xpath.compiler.XPathParser.LocationPath(XPathParser.java:1537) at org.apache.xpath.compiler.XPathParser.PathExpr(XPathParser.java:1259) at org.apache.xpath.compiler.XPathParser.UnionExpr(XPathParser.java:1178) at org.apache.xpath.compiler.XPathParser.UnaryExpr(XPathParser.java:1084) at org.apache.xpath.compiler.XPathParser.MultiplicativeExpr(XPathParser.java:1005) at org.apache.xpath.compiler.XPathParser.AdditiveExpr(XPathParser.java:947) at org.apache.xpath.compiler.XPathParser.RelationalExpr(XPathParser.java:872) at org.apache.xpath.compiler.XPathParser.EqualityExpr(XPathParser.java:812) at org.apache.xpath.compiler.XPathParser.AndExpr(XPathParser.java:776) at org.apache.xpath.compiler.XPathParser.OrExpr(XPathParser.java:749) at org.apache.xpath.compiler.XPathParser.Expr(XPathParser.java:732) at org.apache.xpath.compiler.XPathParser.initXPath(XPathParser.java:125) at org.apache.xpath.XPath.<init>(XPath.java:162) at org.apache.xpath.CachedXPathAPI.eval(CachedXPathAPI.java:276) at org.apache.xpath.CachedXPathAPI.selectNodeList(CachedXPathAPI.java:209) at org.apache.xpath.CachedXPathAPI.selectNodeList(CachedXPathAPI.java:189) at net.sf.jasperreports.engine.util.xml.XalanXPathExecuter.selectNodeList(XalanXPathExecuter.java:60) ... 21 more Code: Post Edited by Manu Smith at 03/03/09 14:37
  4. Hi, i'm using JasperReport and iReport to create an order list out of an XML File. Every order has several articles, sometimes 1 or sometimes more then 5. Acutally my problem is, that my subreport displays for every order item, all artciles listet in the XML File. For example Order1 Article 1 Article 2 Article 3 Order2 Article 1 Article 2 Article 3 but in xml, Order1 has only 2 Artciles an Order2 has only 1 article. I think my problem is that theres a mistake passing the paramter from my masterreport to my subreport. But i dont find my mistake. I will add my java, jrxml and xml source file. maybe someone can have a look..... thx! Code:Java File:import java.io.File;import java.util.HashMap;import net.sf.jasperreports.engine.JRException;import net.sf.jasperreports.engine.JasperCompileManager;import net.sf.jasperreports.engine.JasperExportManager;import net.sf.jasperreports.engine.JasperFillManager;import net.sf.jasperreports.engine.JasperPrint;import net.sf.jasperreports.engine.JasperReport;import net.sf.jasperreports.engine.data.JRXmlDataSource;public class mySubTemplate { public static void main(String[] args) { JasperReport jasperReport; JasperPrint jasperPrint; HashMap<String, String> parameter = new HashMap<String, String>(); try { JasperCompileManager.compileReportToFile("template/reportTemplate.jrxml","template/reportTemplate.jasper"); JasperCompileManager.compileReportToFile("template/reportSubTemplate.jrxml","template/reportSubTemplate.jasper"); } catch (JRException ex) { ex.printStackTrace(); } try { JRXmlDataSource xml = new JRXmlDataSource(new File("data/testData.xml"), "/list/order/packst"); jasperReport = JasperCompileManager.compileReport("template/reportTemplate.jrxml"); jasperPrint = JasperFillManager.fillReport(jasperReport, parameter, xml); // pdf output JasperExportManager.exportReportToPdfFile(jasperPrint, "output_sub.pdf"); } catch (JRException e) { e.printStackTrace(); } }} Post Edited by Manu Smith at 03/03/09 10:46
  5. both master reports have static values, i used ireport to add a static text item. I had no problems creating a PDF out of both Master Reports. But when i add one master report into the other master report ( subreport ) my subreport is empty, i only get the content of the master report, not of the subreport....:( but dont know why... EDIT: Problem solved, problem was that the printed area was out of the displayed range....^^ but thx 4 help! Post Edited by Manu Smith at 03/02/09 09:52
  6. Hi , i'm new on iReport and aktually i'm having 2 masterreports, from which i can create pdf's. both pdf's contain correct data and the content is displayed the right way. Currently i do not use any data source, i'm using only static variables. Now i need to create out of these 2 masterreports 1 masterreport with 1 subreport. For this i used the wizard from iReport. Execution works but the content from subreport is not shown in my masterreport. Does anyone have any ideas why nothing is displayed ? or does anyone have a very simple subreport example with static values ? thx a lot
×
×
  • Create New...