Jump to content
Changes to the Jaspersoft community edition download ×

javier.ggi90

Members
  • Posts

    74
  • Joined

  • Last visited

javier.ggi90's Achievements

  1. Hi guys, I got a report template that is supposed to work correctly in iReport, Jasper Studio and integrated with JasperReports Java library. Everything works fine except for this element: <image> <reportElement x="4" y="1" width="146" height="149"/> <imageExpression><![CDATA[new com.onbarcode.barcode.jasper.JasperRenderer(com.onbarcode.barcode.jasper.BarcodeGenerator.draw(102, “123456789”, "", "X=4"))]]></imageExpression> </image> I tried adding barcode.jar and barcode4j-2.1.jar into my classpath, both on Jasper Studio and my Eclipse project and I get the same error on both: unable to resolve class com.onbarcode.barcode.jasper.JasperRenderer Any idea what am I doing wrong or what do I have to do to make this work? Thanks a lot, Javier
  2. Solved it using jasperreports-6.3.1 and adding the following code (supposed to be deprecated according to a post I saw before): JRProperties.setProperty("net.sf.jasperreports.xpath.executer.factory" ,"net.sf.jasperreports.engine.util.xml.JaxenXPathExecuterFactory");[/code]
  3. Mazen, did you get it to work? If so, how? I am having the same exact behavior. Thanks for your time.
  4. Tried adding the JAR file "zxing.jar". Still have the same issue.
  5. Hi guys, I am having a problem compiling a report directly from the JasperReports library in Java code. The Java code is: xmlDatasource = new JRXmlDataSource(doc, xmlDataSource);JasperReport jasperReport = JasperCompileManager.compileReport(FileConfXML);JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, jasperParameter, xmlDatasource);JasperExportManager.exportReportToPdfFile(jasperPrint, FileNameOut);[/code]FileConfXML is my JRXML file. Everything works fine and I get my PDF file, except that I need a QR code in the report, so I added it using JasperSoft Studio 6.3.1, the extra code generated by adding it is: <componentElement> <reportElement x="6" y="6" width="139" height="139"/> <jr:QRCode xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd"> <jr:codeExpression><![CDATA[$P{BARCODEFILE}]]></jr:codeExpression> </jr:QRCode></componentElement> Now, when I try to run the program I get the following: ERROR org.apache.commons.digester.Digester - Parse Error at line 1034 column 228: cvc-complex-type.2.4.a: Invalid content was found starting with element 'jr:QRCode'. One of '{"http://jasperreports.sourceforge.net/jasperreports":component}' is expected.org.xml.sax.SAXParseException; lineNumber: 1034; columnNumber: 228; cvc-complex-type.2.4.a: Invalid content was found starting with element 'jr:QRCode'. One of '{"http://jasperreports.sourceforge.net/jasperreports":component}' is expected.at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)at org.apache.commons.digester.Digester.parse(Digester.java:1647)at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:243)at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:230)at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:218)at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:172)at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:156)at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:143)at com.intelisis.JReport.IntelisisJReport.main(IntelisisJReport.java:146)2017-03-03 13:28:32,457 [main] ERROR com.intelisis.JReport.IntelisisJReport - org.xml.sax.SAXParseException; lineNumber: 1034; columnNumber: 228; cvc-complex-type.2.4.a: Invalid content was found starting with element 'jr:QRCode'. One of '{"http://jasperreports.sourceforge.net/jasperreports":component}' is expected.2017-03-03 13:28:32,457 [main] ERROR com.intelisis.JReport.IntelisisJReport - com.intelisis.JReport.IntelisisJReport:net.sf.jasperreports.engine.JRException: org.xml.sax.SAXParseException; lineNumber: 1034; columnNumber: 228; cvc-complex-type.2.4.a: Invalid content was found starting with element 'jr:QRCode'. One of '{"http://jasperreports.sourceforge.net/jasperreports":component}' is expected.net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:247)net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:230)net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:218)net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:172)net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:156)net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:143)com.intelisis.JReport.IntelisisJReport.main(IntelisisJReport.java:146) Searching for similar problems I have been adding a lot of JAR files. These are what I have added by now: Anyone has any idea of what can I do to solve this? I appreciate any comments or possible solutions. Thanks a lot, Javier Guzmán
  6. Did you guys ever solve this? I am having the exact same problem.
  7. Reports should execute at the same speed (maybe slightly slower) than it does on the JasperServer homepage. I do not have a lot of experience with visualize but when I tried it I did not configure anything other that the connection. If your report runs slow in the JasperServer homepage try to improve performance on the database.
  8. Hi guys, I am using some custom functions in my JasperServer for authenticating users using a self-made JAR file. My result is always the result I use if there is an exception so I want to debug this (with the server's implementation) so I want to know how to track or see the "System.out.println" lines of code I use in my functions. Is there a specific log or another file I have to configure for this? Thanks for your time, Javier Guzmán
  9. Already tried by encrypting/decrypting each property (e.g.: u=Javier, r=admin, etc) and doing the same but only for the value of the properties (Javier, admin, etc) and neither worked.
  10. Just wanted to add that I am encrypting the whole token. By that I mean I am encrypting everything that comes after "pp=". Maybe there is another way I should do that?
  11. Hi all, I am trying to implement token based authentication into my JasperServer instance. Following the cookbook (https://docs.tibco.com/pub/js-rptsrvr-amxbpm/6.2.0/doc/TIB_js-rptsrvr-amxbpm_6.2.0_auth.pdf) I modified the applicationContext-externalAuth-preAuth-mt.xml file. My application is constructed on Javascript so I encrypted the token there and tested it in a custom java class implementing CipherI. The class is as below: public class MyCipher implements CipherI{ @Override public String decrypt(String arg0) { AesUtil aesUtil; try { aesUtil = new AesUtil(); String DECRYPTED_TEXT = aesUtil.decrypt(arg0); return DECRYPTED_TEXT; } catch (SQLException | ClassNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); return null; } } @Override public String encrypt(String arg0) { // TODO Auto-generated method stub return null; } }[/code] The class AesUtil works as intended and I did several tests and the encryption/decryption process works correctly. My quiestion is, what do I have to do to implement this into my Server. I modified the xml file so that is uses my class: com.myPackage.MyCipher. And exported everything as a JAR file and put it on WEB-INF/lib/ After some testing it seems that this is not working as expected (I get sent to the login screen). Anyone has any ideas or recommendations? Javier Guzmán
  12. Try looking into this other question: http://community.jaspersoft.com//questions/1007446/csv-subreport-does-not-work That solution is what I do everytime I use consumable datasources. Javier
  13. Probably not needed anymore but I had the same issue. I found out that for the community editions of JasperServer the sample file is different than the one in the commercial editions. If you watch the log carefully you will see this error: "orgId must be mapped in tokenFormatMapping". So I added this line into the file <entry key="orgId" value="o" /> at the bean where you configure the token structure. Apparently this key is mandatory even though the sample file does not use it.
  14. There should be no problem doing this. Make sure you are mapping the parameter correctly by: Creating an input control in the serverName the input control exactly the same as the parameter, eg: assuming you named a parameter as youR_pArameter the input control should have the same upper and lower case lettersMake sure the data type of the input control is the same as the data type of the parameter.
  15. You need to ask for a parameter, this should be your "value0". Let us assume your parameter is called Parameter1. With this you can obtain "value1" as you said. If this is a field you can create a new variable (Variable1) with the expression $P{value1}. Make sure you create the variable correctly assigning data type accordingly. After this you should create a subreport element and map it to your second report. In the subreport's properties (as you mention, in the right bottom part) there is an option to map parameters (refer to the answer in this question: http://community.jaspersoft.com/questions/816003/how-pass-main-reports-parameter-subreport). An example would be something like this: Create a parameter in your second report called Parameter2, map the variable "Variable1" to this new parameter clicking in new and assigning the values. You need to make sure you use the exact same names otherwise it will not work. Finally you can use Parameter2 in your subreport in the new query to retrieve value2 and do whatever you need with it.
×
×
  • Create New...