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

Sarthak Chaudhary

Jaspersoft Staff
  • Posts

    82
  • 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 Sarthak Chaudhary

  1. The formatting of the actual square cannot easily be formatted. It is SVG generated by HighCharts and would require the injection of CSS such as: g.highcharts-legend-item.highcharts-column-series rect { stroke: black; stroke-width: 0.5; } Please see the attached screenshot as an example.
  2. 'jasperQL' and 'domain' are 2 different languages to query domains from JRS. domain - is the old one, with some limitations. jasperQL - is the new one with more features and ways to run the query. domain uses XML, and jasperQL uses JSON to store the query. We strongly suggest customers use jasperQL because it uses a more modern API which resolves some problems from the domain. In the JSS UI, you see them very similar, because they are doing the same thing (you can do much more with jasperQL)
  3. Requirement: The live dashboard refresh buttons are not working and the results do not update. The current workaround involves clearing the browser cache and logging back into JasperServer. This confuses the user and takes additional time for the user. Recommendation: The reason why the data is not updating is because it did not make a request to the database but instead requested it from the Ad Hoc Cache so flushing the cache would work the first time. The real issue here is that the dashboard has auto-refresh set to 2 mins but this didn't refresh the data from the database. To resolve this kindly follow the below steps: 1. Configure the ad hoc cache to flush it once a time limit has been reached: <cache name="adhocCache" timeToIdleSeconds="300" timeToLiveSeconds="600" timeToIdleSeconds: how long a cache item will stay in the cache if it's not used timeToLiveSeconds: maximum lifetime for a cache item, no matter how much it's used Then wait after 5 minutes to see whether the dashboard reflects the newer data with its auto-refresh enabled. 2. In file ..\WEB-INF\applicationContext-datarator.xml, set allowFlushingCacheOnPush to "true" <bean id="allowFlushingCacheOnPush" class="java.lang.Boolean"> <constructor-arg value="false"/> </bean> and restart the JR Server. But the implication here is that every refresh or report execution will be retrieved from the database which can impact db performance. This is not ideal but can be used as a workaround for the time being if it works. We should at least verify whether it works regardless of whether you want to keep the changes
  4. Requirement: Is it possible to translate the input control validation message and report empty message to Swedish, Please see the attached screenshot. Recommendation: The two messages - 'This field is mandatory so you must enter data' and 'You must apply input values before the report can be displayed' are defined in the jasperserver_messages.properties file - so it should be modifiable easily by language with locales as mentioned above or by just changing that particular file. If after this, you see accented letters: The accented characters should be unicode escaped in the properties file. Otherwise, ä = ä and å = Ã¥ So, I believe that is what is happening. If you refer to the guide: https://community.jaspersoft.com/documentation/jasperreports-server/tibco-jasperreports-server-administration-guide/v8/creating-locale/It is stated as follows: The resource bundles described in this document consist of locale-specific Java properties files. Java properties files use the ISO-8859-1 (Latin-1) encoding that is the same as ASCII for all English non-accented characters. For international characters that are not in ISO-8859-1, use Unicode escape sequences (for example u00e9 is é). Therefore in all the translation properties files, you can look up the unicode escape equivalent and use that instead of the accented characters. You can easily look at other property files such as es, and fr to see how they are done. You can google to find the Unicode sequence for the accented characters and use that instead.
  5. Requirement: We are trying to limit the items that appear in the JRS menu by referring to the following site: https://community.tibco.com/s/article/how-limit-non-admin-users-ability-create-or-view If "testArgs="ROLE_SUPERUSER,ROLE_TEST"" is written, the condition will be matched if the user has either "ROLE_SUPERUSER" or "ROLE_TEST". I want to match a user who has "ROLE_SUPERUSER" but not "ROLE_TEST" to a condition. How do I describe the condition that I do not have "ROLE_TEST"? Recommendation: Below would work. For users with "ROLE_TEST", we will not have a view menu option. <!--context for view option on primary menu--> <context name="main_view_mutton" test="checkAuthenticationRoles" testArgs="ROLE_SUPERUSER"> <condition test="!checkAuthenticationRoles" testArgs="ROLE_TEST"> <selectAction labelKey="menu.repository"> <option labelKey="menu.search" action="primaryNavModule.navigationOption" actionArgs="search"/> <option labelKey="menu.all" action="primaryNavModule.navigationOption" actionArgs="browse"/> <option labelKey="menu.favorites" action="primaryNavModule.navigationOption" actionArgs="favorites"/> <option labelKey="menu.jobs" action="primaryNavModule.navigationOption" actionArgs="jobs"/> <!-- <option labelKey="menu.reports" action="primaryNavModule.navigationOption" actionArgs="report"/> <condition test="isCEVersion"> <option labelKey="menu.olap.views" action="primaryNavModule.navigationOption" actionArgs="olap"/> </condition> <condition test="isProVersion"> <condition test="isAvailableProFeature" testArgs="ANA"> <option labelKey="menu.olap.views" action="primaryNavModule.navigationOption" actionArgs="olap"/> </condition> </condition> --> <option labelKey="menu.events" action="primaryNavModule.navigationOption" actionArgs="event"/> </selectAction> </condition> </context>
  6. Requirement: Is it possible to display text in the background of an HTML5 chart in JasperStudio? Recommendation: It is possible to add any text in the background of an HTML5 chart developed in JasperStudio by using the 'Text Field' element from the Basic Elements. Please see the attached screenshot.
  7. Requirement: Is it okay to remove certain log4j-*.jar files? Will that cause the server to crash? Recommendation: Removing these files can cause failures in Ant and issues with generating jar files. It is not recommended to remove them. If there are certain security vulnerabilities related to these JAR files, Jaspersoft will provide a fix for the same.
  8. Requirement: What should be the value for the 'tomcat_installation_type' parameter while installing with the all-in installer when Tomcat already exists? Recommendation: Setting the parameter to existing prevents the Tomcat software from being installed: tomcat_installation_type=existing
  9. Requirement: While using lambda expressions while creating parameter expressions in JasperServer Studio we get the following error: "The target type of this expression must be a functional interface" Recommendation: Given the way report expressions are compiled, you need to explicitly cast the expression to the expected functional type. As in: <parameter name="Parameter1" class="java.util.function.Function"> <defaultValueExpression><![CDATA[(java.util.function.Function<String, String>) ((test) -> {return test + test;})]]></defaultValueExpression> </parameter>
  10. Requirement: Is it possible to enable Font Ligature in JasperServer? Recommendation: 1. Font ligatures are disabled by default in PDF. 2. Ligatures can work when Apache FOP is present on the classpath and the net.sf.jasperreports.export.pdf.classic.fop.glyph.substitution.enabled property is set to true. 3. So it could work on the server if that property is set to true globally or in the report. 4. But it wouldn't work in Studio because FOP is not present there.
  11. Requirement: A report designed in JasperStudio is uploaded to JasperServer. Is it possible to display the name of the input control with more than one line(as seen in the image)? Recommendation: Unfortunately, it is not possible to achieve this requirement. Technically the parameter name can contain a line break, but it the is responsibility of the consuming application (JRS in this case) to format the label properly. A possible solution may be a JRS theme derived from the default one that applies custom CSS on the parameter labels, but still, it will not be able to translate a new line into a <br> but css white-space: pre-wrap; may help.
  12. Problem Statement: Does Jaspersoft support PDF/X-1a when exporting to PDF? Resolution:Unfortunately, PDF/X-1a is not supported by JasperServer. There is no official documentation of the same. However, if this is something that you are interested in seeing the future versions you can log an enhancement request in the ideas portal (https://community.jaspersoft.com/wiki/you-can-log-ideas-jaspersoft-products-jaspersoft-ideas-portal)
  13. Requirement: Is it possible to change the number of days before expiration via configuration for the expiration warning that comes up 15 days before a license is about to expire? Resolution:This value is hardcoded in the JasperServer LicenseManager code. However, this is not exposed due to its sensitive nature. If you still want to change the value you can contact Jaspersoft support who can assist you with the same.
  14. Error Description: While running a studio report that contains a sub-report and a logo in the subreport. When this report is published to JasperServer and run we get an error - 'contextPath needs to be an absolute path' Solution: One possible reason for this error is, that the standard setup is to keep report resources like subreports and images in the JRS repository and not on the server filesystem. So when resources are kept in the FileSystem and not the repository this error is seen. To resolve this, we would need to add the subreport in the repository instead of the file system.
  15. Problem Statement: The requirement is to validate the date minimum value using dynamic value, for now, we use only constant value. Here the Dynamic value is passed through a parameter/Input control by the user. Is this possible to achieve? Solution:On an input-control level, this would not be possible. This is because the min and max values are pre-determined. However, on a report level, you could create a logic for a parameter that validates this date minimum value.
  16. Problem Statement: Our requirement is to block the upload of JRXML files in the user interface. There existed this setting in the documentation for version 6.0.1: https://community.jaspersoft.com/documentation/tibco-jasperreports-server-administrator-guide/v601/restricting-file-uploads …/WEB-INF/flows/fileResourceBeans.xml file.upload.max.size to 0, also tried 1 byte. But we are still able to upload a JRXML file. We also tried to set a restricted regular expression for a file name and custom message in fileNameRegexp & fileNameValidationMessageKey But still no reaction from Jasper. Can you confirm are that the settings are still in use in version 7.9.2, or have been deprecated? Can you please advise a way to block the upload of JRXML? Solution:You might be able to disable it by excluding all file extensions in the resource.locate.js (see below in the documentation). https://community.jaspersoft.com/documentation/tibco-jasperreports-server-security-guide/v790/restricting-file-uploads (File upload Extensions) Specifically, you can edit the <jasperserver-pro-war>/scripts/resource.locate.js file and modify the ALLOWED_FILE_RESOURCE_EXTENSIONS.
  17. Problem Statement: Is there a maximum number of tables or columns that can be set in a set of domains and items? For example, is it possible to specify a table with 1000 columns per table in a 100-table domain and use it ad hoc? Also, does it depend on the database used (MySQL or Oracle, etc)? Resolution: There is no maximum number of tables-configuration hardcoded as such for domains. This would purely depend on the database and its configurations. However, the more amount of data you have the greater would be the load on your application. And hence, this may cause a performance crunch. The baseline is that you can have as much data as required as long as the database can handle it. Domains are JSON and XML-based, hence, when the XML file is being parsed it may cause a slowdown if the domain file is heavy. This requirement would be more system configuration-specific rather than Jasperserver-specific.
  18. Problem Statement: A report that contains a checkbox and the checkbox is displayed using Unicode in the text field. While exporting the report as Excel, the checkbox is displaying as expected while trying to export the report as PDF the checkbox is not displaying. Resolution:The reason that the checkbox does not get exported in PDF is that the font being used does not have a checkbox symbol. As a workaround for this, you can use for example, DejaVu Sans which includes a built-in font extension to display the checkbox character. However, if you want to use the same font then the below criteria must be met: The font has glyphs for U+2610 and U+2611The font extension uses Identity-H and PDF encoding and PDF embedding is enabled
  19. Problem Statement: Is it possible to create user/role with a negative ID? By editing the JIUserRole table? Resolution: Generally, we do not allow manually executing queries on JIUserRole. Hence, there are no recommendations from our end. You would have to perform tests on this, in a lower environment in order to understand any impacts that might be caused due to this.
  20. Requirement: Can we invoke an Oracle DB procedure where the input parameter or the DB procedure is an array (a table from a DB perspective)? The Class type here is set as Collection. Resolution: Short answer: The use of arrays is not standard and not supported in JasperReports when working with stored procedures input parameters. At this point the user would have two options: 1. Create a custom QueryExecuter extending the JRJdbcQueryExecuter 2. Modify the stored procedure accepting data in a different format other than an array Both options are not trivial. More detailed answer: There is no way today in JasperReports to pass an array as an input parameter of a stored procedure. The java.sql.Array type is designed to be implemented by a specific JDBC driver and used to read data from a ResultSet more than set a stored procedure input parameter. Anyway, this article describes the procedure to set an array of custom table records as input parameters for a stored procedure: https://forums.oracle.com/ords/apexds/post/how-to-pass-a-array-of-object-to-oracle-stored-procedure-9728 The process requires several steps that are very Oracle-specific, like the creation of the array to be passed to the stored procedure, based on the specific array type: StructDescriptor structDescriptor = new StructDescriptor( "APPS.DEPARTMENT_TYPE", connection);e s STRUCT priceStruct = new STRUCT(structDescriptor, connection, dep); STRUCT[] priceArray = { priceStruct }; ArrayDescriptor arrayDescriptor = ArrayDescriptor.createDescriptor( "APPS.DEPT_ARRAY", connection); ARRAY array = new ARRAY(arrayDescriptor, connection, priceArray); and the assignment of the parameter to the OracleCallableStatement: ((OracleCallableStatement) callStatement).setArray(1, array); Please note that there is no setArray() method on standard java.sql.CallableStatement, to confirm that this would work only in Oracle. The plsql query executer today simply adds the ability to use a cursor returned as an output parameter from an Oracle Stored Procedure to read the data for the report. Other databases return this cursor directly without requiring an output parameter, without requiring a specific feature. If the user decides to implement a custom query executer, the user would have to add support for Array type of parameters and implement the code to translate the Collection of objects into the exact STRUCT format required, as per the example provided above.
  21. Requirement: Can the domain selector list size be customized in the ad hoc designer flow? By default it's limited to 100, is it possible to increase this value by editing any configuration file? Resolution:There is no out-of-the-box solution present for this. In order to achieve this the Javascript would have to be edited and the Jasperserver code needs to be rebuilt. (https://community.jaspersoft.com/documentation/v8-v82-v820/jasperreports-server-source-build-guide-822) This would be customization required.
  22. Requirement:How to dynamically change the position of the X-Axis or Y-Axis in an HTML5 Chart. For example, for a spline chart, the requirement is to change the Y-Axis position based on new data added in the database. Solution:You can use the 'yAxis.offset' which moves the y-axis horizontally away or towards the plot area. You would have to use an expression for the chart properties. Please see attached screenshot: This is the jsfiddle example: http://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/yaxis/offset/
  23. Problem Statement: How to change the JasperServer user login password through the UI? Solution: First of all, the system admin needs to configure JasperReports Server (JRS) to allow users to change their passwords in .../WEB-INF/jasperserver-servlet.xml file: allowUserPasswordChange=true Once it is enabled, on the JRS 8.0 login page, users need to enter their username and current password, then click on the "Change password" link to activate the "New Password" entry boxes to enter and confirm the new password. Click on Login to change the password and log into the application with the new password. If the user credential is incorrect, the user will get an "Invalid credentials supplied. Could not log in to JasperReports Server." message and will not be able to log in nor make the password change successful. Please review the TIBCO JasperReports® Server Security Guide document, CHAPTER 5 "USER SECURITY" for other user password configuration options. https://community.jaspersoft.com/documentation/tibco-jasperreports-server-security-guide/v790/configuring-user-password-options
  24. Problem Statement: If the user is unable to connect to JasperServer using Jasperstudio, and if the user is using WebSphere as their Application Server. The below error is seen in JasperStudio: java.lang.NullPointerExceptionat java.base/java.text.SimpleDateFormat.<init>(Unknown Source)at java.base/java.text.SimpleDateFormat.<init>(Unknown Source)at com.jaspersoft.studio.server.protocol.restv2.RestV2ConnectionJersey.getServerInfo(RestV2ConnectionJersey.java:339)at com.jaspersoft.studio.server.protocol.restv2.RestV2ConnectionJersey.connect(RestV2ConnectionJersey.java:225)at com.jaspersoft.studio.server.protocol.ProxyConnection.connect(ProxyConnection.java:118)at com.jaspersoft.studio.server.WSClientHelper.checkConnection(WSClientHelper.java:92)at com.jaspersoft.studio.server.wizard.ServerProfileWizard.connect(ServerProfileWizard.java:91)at com.jaspersoft.studio.server.wizard.ServerProfileWizard.access$1(ServerProfileWizard.java:86)at com.jaspersoft.studio.server.wizard.ServerProfileWizard$2.run(ServerProfileWizard.java:68)at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122) Solution:The below conditions must be met for the suggested solution: 1. Has the user applied a hotfix to their WebSphere server? That is, modified the .ear file. 2. When the user hits <THEIR_SERVER>/jasperserver-pro/rest_v2/serverInfo can they see the relevant serverInfo? If not, kindly follow the below steps: 1) Login to Websphere Admin console, i.e. https://<ipAddress>:9043/ibm/console/ 2) Go to Servers->ServerTypes->Websphere application servers-><server>->Java and Process Management ->Process Definition a. Under Additional Properties->Java Virtual Machine b. Now, Go to Generic JVM arguments and append -Djavax.xml.bind.JAXBContext=com.sun.xml.internal.bind.v2.ContextFactory 3)Go to Applications >application Types>Webspher Enterprie application- ><server> a. Under Detail Properties->Class loading and update detection b. Under Class reloading options-> Check Override class reloading settings for Web and EJB modules and provide max value i.e 2147483647, suggested for Polling interval for updated files c. Under Class loader order ->select Classes loaded with local class loader first (parent last) d. Under WAR class loader policy >select Class loader for each WAR file in the application 4) Save the configuration and restart the Websphere server. The above workaround must be carried out because the provided hot fix ear file deployment is not able to identify the appropriate JAXB XML Marshalling. To fix this we need to modify the class-loader and also need to configure XML marshaling through the Java parameter.
  25. Problem Description: After upgrading from my older JasperStudio version to version 8.1, when I run a report and export it into PDF format I am able to see several spacing inconsistencies in the reports as compared to the earlier version. Resolution:This can be caused if the splitType attribute of all bands in a multi-band section is not honored, not just the first band. That is, the user is required to consistently set splitType=Immediate for all bands.
×
×
  • Create New...