Jump to content

buedenbenderd

Members
  • Posts

    17
  • Joined

  • Last visited

buedenbenderd's Achievements

Apprentice

Apprentice (3/14)

  • First Post Rare
  • Collaborator Rare
  • Conversation Starter Rare
  • Week One Done
  • One Month Later

Recent Badges

0

Reputation

  1. The Error is fixed... the jasperreports_extension.properties was overritten from the same file in the root of the jasperreports lib. so the properties: net.sf.jasperreports.extension.registry.factory.htmlelement=net.sf.jasperreports.extensions.HtmlElementExtensionsRegistryFactory net.sf.jasperreports.extension.registry.factory.htmlcomponent=net.sf.jasperreports.components.html.HtmlComponentExtensionsRegistryFactory was missing. Post Edited by buedenbenderd at 01/19/2012 10:32
  2. Figure out that I only got this error message by starting the Application via 'Java Web Start'. If I start it out of the IDE everything works fine and the feld get filled with the HTML content?! Does anyone have any idea?
  3. Hello, I'm getting an error by fillling (JasperFillManager.fillReport(jasperInputStream, parameters, connection); )my report with html content. Had someone an idea to solve this? I'm using jasperreports-4.1.1 with the jasperreports-htmlcomponent-4.1.1.jar extension. Best regards Daniel ..... <componentElement> <reportElement x="140" y="276" width="395" height="21"/> <hc:html xmlns:hc="http://jasperreports.sourceforge.net/htmlcomponent" xsi:schemaLocation="http://jasperreports.sourceforge.net/htmlcomponent http://jasperreports.sourceforge.net/xsd/htmlcomponent.xsd" scaleType="RetainShape" horizontalAlign="Center" verticalAlign="Middle"> <hc:htmlContentExpression><![CDATA[$F{PROR_PACKING_INFO}]]></hc:htmlContentExpression> </hc:html> </componentElement> ..... net.sf.jasperreports.engine.JRRuntimeException: No components bundle registered for namespace http://jasperreports.sourceforge.net/htmlcomponent at net.sf.jasperreports.engine.component.ComponentsEnvironment.getComponentsBundle(ComponentsEnvironment.java:120) at net.sf.jasperreports.engine.component.ComponentsEnvironment.getComponentManager(ComponentsEnvironment.java:138) at net.sf.jasperreports.engine.fill.JRFillComponentElement.<init>(JRFillComponentElement.java:65) at net.sf.jasperreports.engine.fill.JRFillObjectFactory.visitComponentElement(JRFillObjectFactory.java:1592) at net.sf.jasperreports.engine.base.JRBaseComponentElement.visit(JRBaseComponentElement.java:80)
  4. Hi, is it possible to parametrise the pattern of a textFeld Value? Something like the code in the box? I need to set diffrent decimal numbers on the same report. 1. Print "pattern="###0.0" 2. Print "pattern="###0" and I would like set any paramter to handel this. Any Idea? Please help me. Code: Post Edited by buedenbenderd at 08/24/2010 10:45 Post Edited by buedenbenderd at 08/24/2010 11:17
  5. This code is working after JR 3.0 Code: Post Edited by Daniel at 03/30/09 13:03
  6. I fixed this problem by adding xalan (xalan-j_2_7_0) into my lib. But why is it only needed with Java 6?
  7. I'm getting some problems with XML - datasources and Java 6 with my jre 1.4 and 5 Its working fine, but with Java 6 an exception is thrown. Please help me to fix this issue. Daniel B. ############## jasperreports.properties ############ net.sf.jasperreports.xpath.executer.factory=net.sf.jasperreports.engine.util.xml.JaxenXPathExecuterFactory ############## Libs ################################ commons-beanutils-20070624.jar commons-collections-3.0.jar commons-dbcp-1.1.jar commons-digester-1.8.jar commons-javaflow-20060411.jar commons-logging-1.1.jar commons-logging-api-1.1.jar commons-pool-1.1.jar jasperreports-2.0.1.jar jaxen-1.1.1.jar jcommon-1.0.0.jar jxl-2.6.jar poi-2.0-final-20040126.jar xercesImpl.jar xml-apis.jar ################# Exception ##################### Exception in thread "Thread-2" java.lang.NoClassDefFoundError: org/apache/xpath/ CachedXPathAPI at net.sf.jasperreports.engine.util.xml.XalanXPathExecuter.<init>(XalanX PathExecuter.java:49) at net.sf.jasperreports.engine.util.xml.XalanXPathExecuterFactory.getXPa thExecuter(XalanXPathExecuterFactory.java:43) at net.sf.jasperreports.engine.util.xml.JRXPathExecuterUtils.getXPathExe cuter(JRXPathExecuterUtils.java:89) at net.sf.jasperreports.engine.data.JRXmlDataSource.<init>(JRXmlDataSour ce.java:189) at net.sf.jasperreports.engine.data.JRXmlDataSource.<init>(JRXmlDataSour ce.java:256) at pks.xmlReporter.ReporterFrame$9.run(ReporterFrame.java:327) ###############jasper code###################### recordPath = "/hist_mixer/OREF[OREF_ID=+getOrefIdFromTable() +]/ORDA/BAHD"; InputStream jasperInputStream = this.getClass().getResourceAsStream(c:/file.jasper); JasperPrint jpr = new JasperPrint(); JRXmlDataSource jrxmlds = new JRXmlDataSource(_xmlFile, recordPath); jrxmlds.setNumberPattern("###0.00"); jrxmlds.setDatePattern("yyyy-MM-dd'T'HH:mm:ss"); jrxmlds.setLocale(Locale.US); jrxmlds.setTimeZone(TimeZone.getDefault()); HashMap parameters = new HashMap(); parameters.put(JRParameter.REPORT_RESOURCE_BUNDLE, getLocateResorces()); JasperPrint jpr = new JasperPrint(); jpr = JasperFillManager.fillReport(jasperInputStream, parameters, jrxmlds); JasperViewer jv = new JasperViewer(jpr,false); jv.setVisible(true); #############################################
  8. Hi fabboy, I thing a progress bar is a very good way to visual the loading and filling status. I'm having the same problem with big xml data sources ( >20MB ). For example:[color=#0000FF]FileInputStream fileInputStram = new FileInputStream(_xmlFile);InputStream inStram = new GZIPInputStream(fileInputStram);JRXmlDataSource jrxmlds = new JRXmlDataSource(inStram, "report.jasper"); // takes > 2 minJasperPrint jpr = JasperFillManager.fillReport(jasperInputStream, parameters, jrxmlds);JasperViewer jv = new JasperViewer(jpr,false);jv.show();[/color]Is there any possibility to visual the actual status and the left time to show the jasperViewer?with best regardsDaniel Post edited by: buedenbenderd, at: 2007/08/08 07:28
  9. Thank you for youre help!B) I changed the locate jrxmlds.setLocale(Locale.getDefault()); to jrxmlds.setLocale(Locale.US); and getting the right decimal places. Best Regards, Daniel B.
  10. I update my lib's commons-beanutils-20070624.jar commons-digester-1.8.jar commons-logging-1.1.jar commons-logging-api-1.1.jar The direct casting of BigDecimal Numbers from a XML Value is now working! but... I'm still missing the decimal places. XML: <value>123,456</value> Pattern of the Datasource: jrxmlds = new JRXmlDataSource(_xmlFile, recordPath); jrxmlds.setNumberPattern("###0.000"); Pattern of the Textfeld: <field name="value" class="java.math.BigDecimal"> <fieldDescription><![CDATA[value]]></fieldDescription></field> <textField isStretchWithOverflow="false" pattern="###0.000" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > ... <textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{value}]]></textFieldExpression> Result in the Report: 123,000 How can I get the decimal places from my xml value? Regards, Daniel B.
  11. I changed the pattern and locales to //Set Pattern and Locale jrxmlds.setNumberPattern("###0.00"); jrxmlds.setDatePattern("yyyy-MM-dd'T'HH:mm:ss"); jrxmlds.setLocale(Locale.getDefault()); it's working now with Java 6... :blink: But my main problem is the coverting from XML Strings to a number value. Example: <value>123.45</value> after converting to java.lang.Long my value is 123.00 Is there a posibility to convert my xml values to java.math.BigDecimal ? DEBUG - Convert string 245.4 to class java.lang.Long using de_DE locale and ###0.00 pattern DEBUG -LocaleConverter:org.apache.commons.beanutils.locale.converters.LongLocaleConverter@bdc9b3 Post edited by: buedenbenderd, at: 2007/06/21 13:05
  12. I'm useing JR 1.3.4 and loading the datavalues from a xml source. JRXmlDataSource jrxmlds = new JRXmlDataSource(_xmlFile, "/hist_mixer/OREF/ORDA/BAHD"); jrxmlds.setNumberPattern("###0.00"); jrxmlds.setDatePattern("yyyy-MM-dd'T'HH:mm:ss"); jrxmlds.setLocale(new Locale("de_DE")); InputStream jasperInputStream = this.getClass().getResourceAsStream("report.jasper"); JasperPrint jpr = JasperFillManager.fillReport(jasperInputStream, new HashMap(), jrxmlds); createScreenReport(jpr); In my Report tamplate all numberFelds are set to java.lang.Long I would like to use java.math.BigDecimal , but the default mapping told me that all xml numbers are java.lang.Long is there a way to set this mapping? Best regards! Daniel B.
  13. I think there is a problem to load and map xml data source to an report with java 6. When I start my App. with: C:ProgrammeJavajre1.5.0_10binjava -hotspot -Xmx512M -Djbo.use.pers.coll=false -Djbo.maxpoolsize=0 -jar xmlReporter.jar 2> pks-jba.log it's working fine, but I'm getting an error by starting it with Java 6: C:ProgrammeJavajre1.6.0_01binjava -hotspot -Xmx512M -Djbo.use.pers.coll=false -Djbo.maxpoolsize=0 -jar xmlReporter.jar 2> pks-jba.log ############################################### Error in LOG-File: java.lang.ClassCastException: java.lang.Double cannot be cast to java.lang.Long at HIS_Chargenprotokoll_A4_xml_1182350280484_61986.evaluateEstimated(HIS_Chargenprotokoll_A4_xml_1182350280484_61986.java:1633) at net.sf.jasperreports.engine.fill.JREvaluator.evaluateEstimated(JREvaluator.java:246) 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:1106) ####################################### Is there a possibility to map xml number fields generally to java.math.BigDecimal ? Best regards for your help! Daniel B.
×
×
  • Create New...