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

joseng62

Members
  • Posts

    196
  • 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 joseng62

  1. Hi siddhi_doshi, This is a trick one, you need to do a couple of things. So when the report is generated in the jaserpserver it is generated in an html doc. So you could add a text box on the report that is a place holder for the button. Then assign these properies with values to the text box. net.sf.jasperreports.export.html.class net.sf.jasperreports.export.html.id Now you have an id and a class name you may make use of. So you can then add css to it, i.e hover over change color or something. You can add an function to it etc. So now the question of scripts. You can make use of net.sf.jasperreports.export.html.footer or net.sf.jasperreports.export.html.header to inset html, which in this case you can make use of a script tag. Another option would be to make use of custom jsp for a report. So when you upload a report in the jasperserver or edit a existing one. The last vertial tab option. You will need to read up on implementation of it in their official documentation. Customization Locate a custom report view. User Inputs : Name and DescriptionJSP Location:(within /WEB-INF/jsp) Hope this all help. Good luck
  2. Hi heavensinformatica Based on that thread, they are refering to the jasperserver proffesional version. It is where you can do ad hoc reporting and create you own calculation/formulas. https://community.jaspersoft.com/documentation/jasperreports-server-user-guide/v56/creating-calculated-field This is not available in the jasperstudio. In the studio there are mutiple ways of doing this, depending on where you want to do it. You can do it in the sql, you can sort the data etc. You can also write you own java class and include the jar to your studio as a external jar. Then you can call you class almost anywhere, pass the list to be sorted and return a sorted list. Hope it clears up the confusion. Good luck.
  3. You have mutiple option. Best is the go through the document 'JasperReports-Server-REST-API-Reference.pdf' and decide which one you want to implement. CHAPTER 3 AUTHENTICATION METHODS • Overview of REST Authentication • HTTP Basic Authentication • The login Service • Login Encryption • The Security Check • Using an SSO Token • Using a Pre-Authentication Token • Logout
  4. Hi victor.jonathan. When in the jasperstudio. Look for the 'Repository' tab. If yo ucannot find it, in the studio top menu, select 'Window', look for 'Show View' amd then other. In the pop up, look for Repository Explorer. Ok so now you should have the 'Repository' tab. Select it and right click on Servers and select the 'create jasperreports server connection' Now you should be familiar with the normal stuff. i.e. URL etc. Not on Organization textbox : for community edition leave it blank for pro I cannot remember excatly, but it might be 'organization' and if you have other organization it might be 'organization/other_org_name' Hope this all helps. Good luck.
  5. So you exported a FONTNAME.jar from jasperstudio and then you deployed the jar into webappsjasperserverWEB-INFlib and restarted the apache server ? Then in the jrxml you have the font set for each element to correct font? You can also decompile that jar via jd-gui to see what is the logic inside the jar. Also when creating the jar in jasperstudio, set the PDF Encoding to "Identity-H (Unicode with horizontal writing)" Hope this all helps, good luck!
  6. I have not implemented this myself yet, but the questions has been asked before. Yes you can. There is a guide on this "jasperreportsserver-auth-cookbook_5.pdf" it is more a straight forward implementation, you will most likely have to make some changes to make it all work with your envirnoment and ldap structure.
  7. Quick and straight answer, no. You will have to write your own implementaiton of this. visualize.js is for commercial only and close source. You could reverse engineer it, but licensing would become and issue. Best is to make use of the REST api, which is well diverse and set out. I am not 100%, but I believe visualize.js, just makes use of the rest api in anyways, it is just an easier developer layer to make it easier for app integration from an enteprise point of view. You can if you have the time and resource get the same done.
  8. You want to do it via the jaspestudio only ? You can log into the jasperserver via admin and set a new datasource up or you can make use of the jasperserver rest services to register a datasource. Most of the time drives are the issues, cause they are not loaded onto jasperserver yet. So maybe try to do a manual registeration via admin first, test the conneciton from jasperserver and then just try and recreate new one via jasperstudio. Also remember that jasperstudio versions and jasperserver version also play apart. If different libs being used, could also cause an issues.
  9. I am not 100% on what exactly you want. So I am assuming you want to update the a hyper link - url referenc point for each resp api call to create the report. So if registering the report for the first time with jasperserver via rest, then add parameters in the jrxml and just update those parameters in the jrxml via regex replace of someting and the inject the update jrxml into your rest request payload with the relevant attribute tag. Or is the report already created and you want to call the report and want update the hyperlink values reference. Best would be to also just have a parameter created where you can pass the requested values to the payload before you do the GET request. You could update the url and append the parameters and the values or you can make use of the input controls attirbute/property in the payload and update to relevant values.
  10. Here we go, much better I believe. StackOverflowExample.jrxml: <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 6.4.0.final using JasperReports Library version 6.4.1 --> <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="StackOverflowExample" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="749cd048-9a0d-4a00-89bf-1a75a4565943"> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="Sample DB"/> <property name="com.jaspersoft.studio.data.sql.tables" value=""/> <queryString> <![CDATA[sELECT DISTINCT "ORDERS"."SHIPCOUNTRY" FROM "ORDERS"]]> </queryString> <field name="SHIPCOUNTRY" class="java.lang.String"> <property name="com.jaspersoft.studio.field.label" value="SHIPCOUNTRY"/> <property name="com.jaspersoft.studio.field.tree.path" value="ORDERS"/> </field> <background> <band splitType="Stretch"/> </background> <detail> <band height="40"> <subreport> <reportElement x="0" y="0" width="556" height="40" isRemoveLineWhenBlank="true" uuid="4b89b974-f838-4bb7-85b6-1b0f1079c1e6"/> <subreportParameter name="country"> <subreportParameterExpression><![CDATA[$F{SHIPCOUNTRY}]]></subreportParameterExpression> </subreportParameter> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> <subreportExpression><![CDATA["StackOverflowExampleSubReport.jasper"]]></subreportExpression> </subreport> </band> </detail> </jasperReport> StackOverflowExampleSubReport.jrxml: <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 6.4.0.final using JasperReports Library version 6.4.1 --> <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="StackOverflowExample" columnCount="2" printOrder="Horizontal" pageWidth="595" pageHeight="842" columnWidth="277" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="749cd048-9a0d-4a00-89bf-1a75a4565943"> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="Sample DB"/> <property name="com.jaspersoft.studio.data.sql.tables" value=""/> <parameter name="country" class="java.lang.String"> <defaultValueExpression><![CDATA["France"]]></defaultValueExpression> </parameter> <queryString> <![CDATA[sELECT "ORDERS"."ORDERDATE", "ORDERS"."FREIGHT" FROM "ORDERS" WHERE "ORDERS"."SHIPCOUNTRY" = $P{country}]]> </queryString> <field name="ORDERDATE" class="java.sql.Timestamp"> <property name="com.jaspersoft.studio.field.label" value="ORDERDATE"/> <property name="com.jaspersoft.studio.field.tree.path" value="ORDERS"/> </field> <field name="FREIGHT" class="java.math.BigDecimal"> <property name="com.jaspersoft.studio.field.label" value="FREIGHT"/> <property name="com.jaspersoft.studio.field.tree.path" value="ORDERS"/> </field> <background> <band splitType="Stretch"/> </background> <summary> <band height="155"> <lineChart> <chart evaluationTime="Report"> <reportElement x="0" y="0" width="255" height="155" isRemoveLineWhenBlank="true" uuid="3b5f7d89-490b-468f-9112-f606f4eda437"/> <chartTitle/> <chartSubtitle/> <chartLegend/> </chart> <categoryDataset> <categorySeries> <seriesExpression><![CDATA[$P{country}]]></seriesExpression> <categoryExpression><![CDATA[$F{ORDERDATE}]]></categoryExpression> <valueExpression><![CDATA[$F{FREIGHT}]]></valueExpression> </categorySeries> </categoryDataset> <linePlot> <plot/> <categoryAxisFormat> <axisFormat labelColor="#000000" tickLabelColor="#000000" axisLineColor="#000000"/> </categoryAxisFormat> <valueAxisFormat> <axisFormat labelColor="#000000" tickLabelColor="#000000" axisLineColor="#000000"/> </valueAxisFormat> </linePlot> </lineChart> </band> </summary> </jasperReport> This will produce 6 pages, 4 charts on each page execpt one on the last page.
  11. Your best bet is to utilized the RESPv2 API Wont give you all folders at once, but you can write program to do multiple requests for you and store the payloads received. Document : JasperReports-Server-REST-API-Reference.pdf Look at section 9.2 Viewing Multiple Permissions You can use a GET request with given url http://<host>:<port>/jasperserver[-pro]/rest_v2/permissions/path/to/resource/?<arguments> Set argument resolveAll to ture - so you can see all Then make use of recipientType, first use 'user' and then do second request as 'role'. I would have done it this why. First run is to create program to collect all returned request in a catagorical, input would be the resource path locations and iterate through them, But still good idea maybe to add something like this as a visual represetative to jasperserver, maybe log a feature request.
  12. Hi vergnon, So need some more info on this one, maybe the log file or stacktrace issues. You tag says studio, so I assume this is happening on studio side ? So regards to WHERE A = 'class' 'class' is a parameter right. If you expect a list, then change this parameter class type to be java.util.Collection In your expression section add following new ArrayList(Arrays.asList()) You can hardcode values if you wish to test filter scenarios on jasperstudio side. i.e. ArrayList(Arrays.asList('value1','value2')) On the sql side you need to use a IN keyword for jasper $X{IN, fieldtofilteragainst, yourparametername} i.e. $X{IN, gender, genderlist} I hope this is what you having issues with. Otherwise just post errors please.
  13. The response you are getting is correct. Best would be to rather use a ArrayList and then .get(YouIndexNumber) to get the value. Then just increment your YouIndexNumber. Collection are not guaranteed to have fixed indices...
  14. You might be authenicated already. You using the plugin to the browser ? If you have another tab open in same browser instance where you are already sign into jasper your request will work. Try to sign out of jasperserver and then request again. I made use of my postman app and I simulated put request with same setup as yours and it failed. If sign into jasper in browser or not. If I use plug in, then it works. Same with R client.
  15. Well you could play around with the size of the report and the of all elements size stays consistant you can figure it out that way. Or just add a page break and in the print when expression, let the page break print when REPORT_COUNT is > 15... Should work. Good Luck
  16. In the pro version there is a option to run refresh in the dashboard section. You can see if pro by a couple of ways. The url should have jasperserver-pro defined in the address. Having a look at the license on the linux server where jasper is installed, would also indicate such. The folder name deployed on your web application server under webapps (if not customized) would be jasperserver-pro. In the jasperserver gui you have option to create ad hoc reporting or dashboards and create domains.... then pro If you design in jasperstudio, and you have jasperserver pro, then use license for jasperstudio to enable html 5 charts. Hi, I would just write a small program just to do a REST API call to the jasperserver every given period of time. Or do as hozawa recommended, use schedule, deploy in html format to specific location on a periodic interval. Hope this helps
  17. Check the jasperstudio guide how to add 3 party chart libraries, you most likely are going to make use of the same thing. Making use of the custom visualization component. You could add unique html id or class to the elements and load your own jsp file with custom javascript file. net.sf.jasperreports.export.html.id net.sf.jasperreports.export.html.class There are other properties yo ucould also make use of for html. net.sf.jasperreports.export.html.header http://jasperreports.sourceforge.net/config.reference.html ...load your own jsp file with.... Bascially when you edit the report in the jasper server under the Customization tab the is a "JSP Location:" You could also manipulate the css with custom theme in jasper. So if you get the jsp file maybe to add or remove a class tag with you can then manipulate with the css. Hope this helps, you gone have to do a lot of try and test here.
  18. When you are refering to passed to database, i assume you mean the SQL query ? You situations is a standalone report designed in jasperstudio and deployed to jasper server or you making use of jasper pro ad hoc reports ? Different approach for both. If you own designed report, which library for the dates are you utilizing. Are you making use of jasper relative date ranges ? Example class : net.sf.jasperreports.types.date.DateRange At the end you date parameter that links to Jasper server input control need to be the same. If the SQL date format is different then you need to handle this and parse it. So after your date parameter, you need to have another parameter and maybe make use of DATEFORMAT method to change the date format to the format you want. Example DATEFORMAT(mydateobject, mydateformat) Now you date will always be the same format. So on your sql query you can make use of TO_DATE to parse the date so you database can understand. Example TO_DATE($P{myformateddate},'M/D/YY HH:MI:aaaa') Hope this helps.
  19. Could you clarify your questions please ? When you say "Subject name" are you refering to the name of the schedule, like resource name of Job name. It seems quite hard to set this from jasper server gui side. Maybe try to create this via rest api call, you have more flexibility, you can add label and job descriptions. Refer to jasper rest api doc for more info on this. If you are refering to the output file name , then just tick attribute "Sequential File Names by TimestampTimestamp Pattern". If you are refering to a label in the report itself, then you can make use of a parameter in a clever way. Add parameter as boolean or something to identify on report side and then if true then set the add today's date to label. Something like that. Hope this helps, need more clarity on question.
  20. In the applicationContext-externalAuth-preAuth.xml file I had to add <entry key="orgId" value="o" /> under tag <bean id="preAuthenticatedManager" class="com.jaspersoft.jasperserver.api.security.externalAuth.wrappers.spring.JSProviderManager"> <property name="providers"> along with the <entry key="username" value="u" /> and other entries. So as I understand it that orgId should not be rquired for the Community Edition of Jasper, but i looked into one of the classes <bean class="com.jaspersoft.jasperserver.api.security.externalAuth.preauth.JSPreAuthenticatedUserDetailsService"> and in the code there is an assert test for orgId, so it seem this is required. public void afterPropertiesSet() throws Exception { Assert.isTrue(this.tokenFormatMapping.containsKey("username"), "username must be mapped in tokenFormatMapping"); Assert.isTrue(this.tokenFormatMapping.containsKey("roles"), "roles must be mapped in tokenFormatMapping"); Assert.isTrue(this.tokenFormatMapping.containsKey("orgId"), "orgId must be mapped in tokenFormatMapping"); } So after adding the above entry into the given .xml file, jasper server started up without any issues. No i need to test the string token, hope it works as orgId might cause issues as it should not be required for Jasper Communiy Edition
  21. Different issues after above applied : Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.jaspersoft.jasperserver.api.security.externalAuth.wrappers.spring.preauth.JSPreAuthenticatedAuthenticationProvider#4266ed52' defined in ServletContext resource [/WEB-INF/applicationContext-externalAuth-preAuth.xml]: Cannot create inner bean 'com.jaspersoft.jasperserver.api.security.externalAuth.preauth.JSPreAuthenticatedUserDetailsService#12eeb363' of type [com.jaspersoft.jasperserver.api.security.externalAuth.preauth.JSPreAuthenticatedUserDetailsService] while setting bean property 'preAuthenticatedUserDetailsService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.jaspersoft.jasperserver.api.security.externalAuth.preauth.JSPreAuthenticatedUserDetailsService#12eeb363' defined in ServletContext resource [/WEB-INF/applicationContext-externalAuth-preAuth.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: orgId must be mapped in tokenFormatMapping at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:287) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:122) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1419) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1160) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:276) ... 68 more Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.jaspersoft.jasperserver.api.security.externalAuth.preauth.JSPreAuthenticatedUserDetailsService#12eeb363' defined in ServletContext resource [/WEB-INF/applicationContext-externalAuth-preAuth.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: orgId must be mapped in tokenFormatMapping at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1514) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:276) ... 74 more Caused by: java.lang.IllegalArgumentException: orgId must be mapped in tokenFormatMapping at org.springframework.util.Assert.isTrue(Assert.java:65) at com.jaspersoft.jasperserver.api.security.externalAuth.preauth.JSPreAuthenticatedUserDetailsService.afterPropertiesSet(JSPreAuthenticatedUserDetailsService.java:85) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1573) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1511) ... 77 more
  22. Hi, need more info here please. What space ? You could try the print when expression in one of the bands. Do you have other bands beteen the detial band and the footer, maybe group bands.. Also there could be an element that you need to hide aswell. We gone need more info on this.
  23. You need to give the whole stack trace please. Go look into the jasperserver logs. You will find it at YOURWEBSERVER_INSTALL_PATH/webapps/jasperserver/logs/jasperserver.log
  24. Anything WARNS or ERRORS in the log files ? The webserver logs or jasperserver/WEB-INF/logs ? Maybe the jdbc drive being utilized is not the correct one ? Also is there any custom files deployed to your jasperserver, you might need to check these out. Also maybe set logging to debug mode. You add log4j properties and set to debug when signing into jasperserver as admin, under the Manage tab, under Server Settings, under Log Settings. Did try and remove te above property and check if same issues occurs : -Doracle.jdbc.defaultNChar=true Does the leak start immediately after your restart of is the a custom jar that is being initialized or maybe a report that is being run. This could help to pin point the issues. Also could be garbage collecting that is not happening as it should, maybe try another GB java method. Also bump -Xss2m up to 20m, as sometime the memory to handel the threads are is not enought and causes a jam at some point. Happend to me in the past.
×
×
  • Create New...