Jump to content

masdar

Members
  • Posts

    10
  • Joined

  • Last visited

 Content Type 

Forum

Downloads

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Events

Profiles

Everything posted by masdar

  1. I found what the problem was i had to set the selectExpression in my java code Code:JasperPrint1 = JasperFillManager.fillReport("reports/tempXML.jasper", parameters, new JRXmlDataSource(XMLfile,"/table/result"));
  2. when i export my report ( to a pdf file ) i get null in all my fields ,, i try to run the report in IReport (i pass parameters manulay and use the same xml file ) and it works fine and shows results. the xml file has the following structure: <?xml version="1.0" encoding="ISO-8859-7" ?> <table> <result> <state>ΑΤΤΙΚΗΣ</nomos> <count>9205</count> <percent>73.335 %</percent> </result> <result> <state>ΘΕΣΣΑΛΟΝΙΚΗΣ</nomos> <count>790</count> <percent>6.294 %</percent> </result> <result> <state>ΛΑΡΙΣΗΣ</nomos> <count>343</count> <percent>2.733 %</percent> </result> </table> -------------------------------------------------ISO-8859-7" is encoding for greek Code: String XMLfile="reports/xml/report.xml";parameters.put("recordCounter",count ); parameters.put("sum", sum); createXMLfile(count); JasperPrint JasperPrint1; String pdfOutFileName = "pdf/MyPdf.pdf";JRExporter exporter = new JRPdfExporter(); JasperPrint1 = JasperFillManager.fillReport("reports/tempXML.jasper", parameters, new JRXmlDataSource(XMLfile)); exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, pdfOutFileName); exporter.setParameter(JRExporterParameter.JASPER_PRINT, JasperPrint1); exporter.exportReport();
  3. i use iReport 3.5.2 in my report i have the query: SELECT BTCS.OTA AS OTA, count(*) AS counter FROM BTCS GROUP BY BTCS.OTA which executed successfully this query return 2 values OTA java.lang.String COUNTER Java.lang.BigDecimal i inserted a pie chart in Summary section the chart has the follows values Dataset-> Reset type : Report Increment type:None Details-> Section value-> Key expression: $F{OTA} Value expression: $F{COUNTER} Label expression: $F{OTA} --------------------------------------------------------------------------------------- in compiling there is not problem but when i preview the report i get an error Error filling print... Key is null in pie dataset. net.sf.jasperreports.engine.JRRuntimeException: Key is null in pie dataset. at net.sf.jasperreports.charts.fill.JRFillPieDataset.customIncrement(JRFillPieDataset.java:263) at net.sf.jasperreports.engine.fill.JRFillElementDataset.increment(JRFillElementDataset.java:179) at net.sf.jasperreports.engine.fill.JRCalculator.calculateVariables(JRCalculator.java:152) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:716) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportContent(JRVerticalFiller.java:276) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:118) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:911) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:814) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:63) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:421) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:251) at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:898) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986) Post Edited by masdar at 09/08/2009 12:47
  4. i have a table (1 row 9 columns) as you see in attachment file.. and i wanna fill them using 1 Value,, so how can i make the value strech inside the text field?
  5. i have the field AREA which is a STRING i wanna convert it to a Bigdecimal what i can use instead of (new BigDecimal($F{AREA})==null) in the condition to check if the value is numeric or not???? coz when it is not a numeric i have an error evaluating expression Code:( new BigDecimal($F{AREA})==null? null : new BigDecimal($F{AREA}).divide(new BigDecimal(1000)))
  6. AREADOC is String and now its work creat a BigDecimal from a String using new BigDecimal("MyString") But i have to check the MyString if it is numeric or not
  7. THANK YOU VERY MUCH ,, THE PROBLEM NOW TO CONVERT $F{AREADOC} TO BigDecimali created a new variable new BigDecimal($F{AREADOC}) but it returns NULL
  8. I need to put a double variable in my Report where i must calculate (X/1000) in the Variable Wxpression i didn't find any example to help me to do it,, Generaly i would like to know how to do mathimatical praxeis in my Variable. Thanks in Advanced Code:($F{PROBCID}.equals("3") ? $F{AREADOC}/1000 : "" )// HOW I CAN MAKE THIS CALCULATION $F{AREADOC}/1000 Post Edited by masdar at 07/13/2009 10:02
×
×
  • Create New...