Jump to content
Changes to the Jaspersoft community edition download ×

javier.ggi90

Members
  • Posts

    74
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by javier.ggi90

  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.
  16. What you can do is the following: Create a report and get value1 into a variable using the process you listedCreate a subreport and pass variable1 as a parameter into a subreport.Use the parameter as a condition in the subreport's query and obtain value2.Use value2 in whatever way you need it.
  17. Make use of String.format() function. String: String.format("%10s", field) will pad spaces at the left of the string. To pad them to the right use String.format("%-10s", field). The amount of spaces to be added will be {10 - field length} Integer: String.format("%06d", field) will pad {6 - field length} zeros to the left, in this case. It is important to note that the field HAS to be an Integer of any type. Without the zero, the output will be with padded spaces
  18. JasperSoft Studio can only be used in its Pro version if you have the corresponding Pro version for JasperReports Server. You get the corresponding licence file with the purchase.
  19. I agree with @hozawa. But also, you should set up a development database and back it up if you are worried about it. This also prevents the developer from looking at sensitive information, if there is any.
  20. I have not used iReport in a long time so I do not remember the exact user interface but it should be something like this: 1) click on the subreport 2) On the properties window (usually on the right bottom space) at the very end you should have the connection properties 3) In "Connection Type" select the option "Use a datasource expression" 4) Another property should activate called called something like "Datasource Expression" and there you should input $P{REPORT_DATA_SOURCE}.subDataSource() In Jaspersoft Studio you should click on the subreport element and fill the option marked in the image: If you have any other doubts just ask. Javier
  21. Select "Use a datasource expression" in Connection Type for the subreport Use the following expression: $P{REPORT_DATA_SOURCE}.subDataSource()
  22. That way of passing parameters has given me some trouble in the past, what I started doing instead is the following: In the SQL query, write something like this: SELECT * FROM table WHERE (gr.MERCHANT_ID = $P{MerchantID} or $P{MerchantID} is null); What this does is, if the Parameter has a value it compares it against the field you specify, otherwise it defaults as true. Sorry if this doesn't repond your question, its what I understood of it.
  23. You can use the following property to adjust the zoom of the report: <property name="net.sf.jasperreports.viewer.zoom" value="1.2"/> This equals a zoom level of 120%, you can use Integers, Decimals and other porperties such as FitWidth, ActualSize, FitHeight, FitPage.
  24. Hi all, I am integrating JasperReports into my web app via Visualize.js and encountered an error that I cannot seem to solve. I have a main page (I will call it home) which loads a report correctly whenever I want. I included 4 extra buttons that I use to load different reports each in a new tab and those also work correctly but loading them is giving me trouble. Lets suppose I am at home and click one of the buttons to see the new report. After that I come back to home and when I try to change pages or export the first report I get the error: xdm.remote.page.js:5 POST http://host/jasperserver-pro/rest_v2/reportExecutions/3bba7441-cd91-482c-b4b7-195f06eb7100/exports 404 (Not Found) send @ xdm.remote.page.js:5 ie.extend.ajax @ xdm.remote.page.js:5 n.Rpc.local.request @ xdm.remote.page.js:8 i @ xdm.remote.page.js:8s.incoming @ xdm.remote.page.js:8 n @ xdm.remote.page.js:7 15:38:16.766 [bi/report/Report] [ERROR] - resource.not.found : Resource 3bba7441-cd91-482c-b4b7-195f06eb7100 not found. Any idea on why this is happening and how can I solve it? Javier
×
×
  • Create New...