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

Anuja Vilas Bhujbal

Jaspersoft Staff
  • Posts

    36
  • 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 Anuja Vilas Bhujbal

  1. Hello, Please try setting the textAdjust property of the textField to StretchHeight in the properties tab.
  2. Hello, It is not possible to import resources from a higher JRS version to a lower JRS version as there can be differences between the modules. It is always recommended to import resources from the same versions or from a lower version to a higher version of JRS.
  3. Problem: Customers have a requirement where they want to display columns in a column chart in different colors according to a threshold in the ad-hoc view. Solution: You can use the plotOptions.series.zones property to set different colors to define separate zones of your y-axis value. For example, if you have value from 1-100 for your columns and you have a condition to display the columns with values above 99 to be displayed in red color, in the ad-hoc view chart properties, please add an advanced property with the name as below - plotOptions.series.zones And add its value as below - [{"value":99,"color":"blue"},{"value":100,"color":"red"} ] With the above example, the columns with values <99 will appear in blue color, and the columns with values >99 will appear in red color.
  4. Hello Julian, As of JasperReports Server 6.1, you can use non-authentication parameters before or after the hash sign (#). However, if you place general parameters after the hash sign, then on Dashboard Viewer load, the parameters are moved before the hash sign and the page is redirected to the resulting URL. The authentication parameters j_username and j_password cannot be redirected; they must appear before the hash sign. Please refer section "Passing Dashboard Execution Parameters" from below Ultimate Guide for more details - https://community.jaspersoft.com/documentation/tibco-jasperreports-server-ultimate-guide/v80/repository-http-api
  5. Hello Sai, You can try to check the "Remove line when blank" property of the page break in your report and see if it works.
  6. Problem: How to apply hotfix/service pack on AWS instances in the Jasperserver cluster created using CFT? Solution: Note: These steps were tested on 8.1.0 JRS created on AWS using the Jaspersoft BYOL Cluster and applied the 8.1.1 service pack to it. The steps were not explicitly tested on JRS 8.0 or 7.9, but they should work without any issue on those as well. To apply the hotfix/service pack on the AWS instances that use the CFT and S3 bucket, follow the below steps - 1). Download the hotfix(from https://support.tibco.com/s/hotfixes) or Service Pack(from https://edelivery.tibco.com/) 2). Download the aws_service_pack.sh script attached in the article below to delete the files from the deleted section of the readme.txt of the hotfix/service pack 3). Modify the aws_service_pack.sh file and add the files to be deleted from the “Deleted files:” section of the readme.txt. Note: The attached scripts contain file names to be removed for the 8.1.1 Service Pack. 4). Go to the S3 bucket of your cluster, and create a folder ‘webapps’ if not already present in the S3 bucket. Unpack the service pack zip on your local machine and upload the entire jasperserver-pro from the service pack into the webapps folder in the S3 bucket. Also, upload the aws_service_pack.sh under the webapp/jasperserver-pro/WEB-INF directory in the S3 bucket. 5). Download the CFT used by your JRS and make the below changes in the CFT. I). Locate "AWS::CloudFormation::Init" in the CFT and add the below code after the last command in the list of commands. "4-servicepack": { "cwd" : "/var/lib/tomcat/webapps/jasperserver-pro/WEB-INF/", "command" : { "Fn::Join" : [" ", ["sudo systemctl stop tomcat && chmod +x aws_service_pack.sh && ./aws_service_pack.sh && systemctl start tomcat"] ] }, "failOnError" : "true" }[/code]II). Locate "Restart" in the file and add the 4th command for the service pack as below - "commands": [ "1-pullLicense", "2-pullCustomizations", "3-enableCluster", "4-servicepack" ][/code] III). Save the CFT. Note: Please find attached below a sample CFT template with the above changes for the 8.1 cluster. 6). Now, update your Cloud Formation stack and upload the saved updated CFT. 7). Reboot your EC2 instances under your cluster to apply the service pack.
  7. Problem: Whenever we try to open a PDF report from the Jasperserver repository in the recent versions of the JRS, it downloads the file directly instead of showing a preview in a new tab in the browser regardless of the browser PDF settings. Solution: The change in behavior was made on purpose because of a security aspect and there are no plans to change this behavior. To force the browser to do download the following code was added to applicationContext-webapp.xml file: <bean p:method="GET" p:urlPattern="/fileview/fileview/.*" class="com.jaspersoft.jasperserver.war.httpheaders.HeadersRule"> <property name="headers"> <list> <bean class="org.apache.http.message.BasicHeader"> <constructor-arg value="Content-Disposition"/> <constructor-arg value="attachment"/> </bean> </list> </property> </bean> If there is use case where you need to preview the report instead of downloading it, changing "attachment" to "inline" will force the browser to open the content in the same window (not a new tab) when the Open option is selected (Open in new tab option is not available anymore). But this is not recommended from a security perspective.
  8. Problem: The bundled tomcat that comes along with the binary installation of the JRS takes more time to shut down and startup. Solution: This has always been the case with the tomcat startup and shutdown. The start and stop icons for the JRS perform a start and stop of all the services. If you need to start and stop Tomcat many times for your JRS, you can always stop the Tomcat service only and start and stop Tomcat manually from the bin folder(using the startup/shutdown script) or from the Windows services.
  9. Problem: Getting "Failed to load resource: the server responded with a status of 500 error" in the browser developer tool console while accessing reports from the jasperserver using visualize.js and observing "Internal server error java.lang.IllegalStateException: Cannot call sendError() after the response has been committed" error in the log file. Solution: We have seen the above error while accessing Jasperserver using visulaize.js which was caused when the files blank.htm, errorPage.htm, index.htm were missing in the jasperserver-pro war. These files are required for a normal servlet routing path (web.xml, jasperserver-servlet.xml) to function. Hence, if such an issue is encountered, check if all the default files are present in the application server war.
  10. Problem:Using the week of the year in the date format function in reports, for example like (new SimpleDateFormat("ww/YYYY")).format(new Date()) may give incorrect week value i.e an increased week value by 1. Solution: The week of the year depends on the locale to format the date. Please refer to the below link for more details - https://docs.oracle.com/javase/8/docs/api/java/util/GregorianCalendar.html#week_and_year The getFirstDayOfWeek() and getMinimalDaysInFirstWeek() values are initialized using locale-dependent resources when constructing a GregorianCalendar. The week determination is compatible with the ISO 8601 standard when getFirstDayOfWeek() is MONDAY and getMinimalDaysInFirstWeek() is 4, which values are used in locales where the standard is preferred. In Java the values for Locale.US do not match the ISO 8601 standard as the first day of the week is Sunday and getMinimalDaysInFirstWeek is 1. Therefore with Locale.US the first week of 2022 is Dec 27 2021 - Jan 2 2022. . If you want to use ISO 8601 week number, you would need to use a locale that's compatible with ISO 8601. For E.g. (new SimpleDateFormat("ww/YYYY", Locale.UK)).format(new Date())
  11. Problem:The domain presentation tab by default has a dollar($) currency symbol for the numeric field patterns. There can be a requirement to change the currency symbol to something other than the dollar. Solution:This can be achieved by making changes in the WEB-INFbundlesjasperserver_config.properties file. To change the currency symbol in the presentation tab you have to change jasperserver_config.properties file, namely client.currency.symbol property. For example, to set the currency symbol to pound(£), you need to change the currency symbol from $ to u00A3 in the mentioned file as below - client.currency.symbol = \u00A3
  12. Problem:In the Output option of the schedule editor, when we try to create a new schedule we can the output locale is seen as the default. Sometimes, it can be confusing to users and you might want the output locale to be seen same as that used when you log in to the Jasperserver. Solution: To achieve this requirement, you will need to make changes in the <tomcat>jasperserver-proscriptsruntime_dependenciesjrs-uisrcschedulertemplateeditoroutputTabTemplate.htm file. Please locate the below line in the file and remove it or comment it out. <option value="" selected="">({{- i18n["report.scheduling.job.edit.output.locale.default"] }})</option> Below is the screenshot of the default output options tab of the Jasperserver schedule editor: After making the changes, the output locale will be seen as below as I had logged in to the jasperserver with en_GB locale: Also, as we are making changes in the javascripts folder, you will need to optimize the folder by referring to the below link if your jasperserver uses optimization. https://community.jaspersoft.com/documentation/tibco-jasperreports-server-ultimate-guide/v790/customizing-javascript-files For testing purpose, you can turn off the optimization by making the setting javascript.optimize=false in the <js-webapp>/WEB-INF/js.config.properties file or by adding _opt=false to your Jasperserver URL. If the test works for you, you can optimize files altogether later using the documentation.
  13. Problem:If you want to delete all the schedules under a user in a single attempt directly from the database, the below workaround can be helpful. Solution:The jobs can be deleted from the backed using database but this is not an officially 'supported' solution. However, based on my tests the following set of DELETE commands should remove the jobs from the database completely: DELETE FROM jireportjoboutputformat WHERE report_job_id IN (SELECT id FROM jireportjob j WHERE j.owner = 1) DELETE FROM jireportjobmailrecipient WHERE destination_id IN (SELECT mail_notification FROM jireportjob j WHERE j.owner = 1); DELETE FROM jireportjobmail WHERE id IN (SELECT mail_notification FROM jireportjob j WHERE j.owner = 1); DELETE FROM jireportjobcalendartrigger WHERE id IN (SELECT job_trigger FROM jireportjob j WHERE j.owner = 1); DELETE FROM jireportjobparameter WHERE job_id IN (SELECT id FROM jireportjob j WHERE j.owner = 1); DELETE FROM jireportjob WHERE owner = 1 Please keep in mind that this is not one of the supported solutions and you will be running it at your own risk. It is highly recommended that you create a backup of your database before making any changes to it. You can replace the owner id by the id of the user for which you want to delete the jobs. You can refer to the user id from the jiuser table from the jasperserver database.
  14. Problem: It is seen in 7.5 and above versions that if you use UTF8 special characters in the output file name which is sent as an attachment in the email notification while scheduling a report, might lead to the file getting corrupted. The file gets stored correctly in the JRS repository. For example - When I set my output file name as “このファイルはテスト用です”(which is a Japanese sentence for “This file is for testing”), I received a corrupted file with name “=_UTF-8_B_44GT44Gu44OV44Kh44Kk44Or44Gv44OG44K544OI55So44Gn44___ ___filename_1=__GZLnBkZg==_=.pdf” Solution: We have a defect for this issue and as a workaround to solve this issue, you can try below steps - 1) Locate catalina.properties file under apache-tomcatconf directory; 2) Add the following setting to the file: mail.mime.splitlongparameters=false 3) Save the change, restart the server, and test run a report job to see the result. Defect IDs for reference - JS-57006, JS-60109
  15. Problem:To display pie chart labels in Indian rupee format for example 12,34,567 which is by default displayed as 1,234,567 when you create a report in studio and also add the Indian rupee symbol to the labels. Solution:This can be achieved using the formatter function for the pie chart data labels. HTML5 Charts or HighCharts allow usage of JavaScript functions as property values. You will need to enable them for the Jaspersoft Studio and Jaspererver before you use them. For TIBCO JasperSoft® Studio - Go to Window -> Preferences -> Select JasperSoft Studio category -> Select Properties category -> First type in the filter field "functions.allowed" to check if you already have the property. If you don't see anything returned by the search, press Add Property name: com.jaspersoft.jasperreports.highcharts.function.properties.allowed Property value: true For JasperReports® Server - Go to your <jasperserver-pro>/WEB-INF/classes, edit jasperreports.properties file -> Append com.jaspersoft.jasperreports.highcharts.function.properties.allowed=true and restart the application server. To format the datalabels for the pie chart, you will need to Edit the chart properties -> Go to Chart Formatting -> Show Advanced properties -> Navigate to plotOptions -> bar-> dataLabels -> formatter -> edit the property value and add the below function - <hc:chartProperty name="plotOptions.pie.dataLabels.formatter"> <hc:propertyExpression> <![CDATA["function() { var label = this.y; x = this.y.toString(); var lastThree = x.substring(x.length-3); var otherNumbers = x.substring(0,x.length-3); if(otherNumbers != ''){ lastThree = ',' + lastThree; } var res = otherNumbers.replace(/\B(?=(\d{2})+(?!\d))/g, ",") + lastThree; return res + '₹'; }"]]> </hc:propertyExpression> </hc:chartProperty>You can interchange the position of the symbol ‘₹’ in return if you want it to be a prefix. For the tooltip of the pie chart, you will need to add the same function as below except the symbol in plotOptions -> bar-> tooltips -> pointFormatter. <hc:chartProperty name="plotOptions.pie.dataLabels.formatter"> <hc:propertyExpression> <![CDATA["function() { var label = this.y; x = this.y.toString(); var lastThree = x.substring(x.length-3); var otherNumbers = x.substring(0,x.length-3); if(otherNumbers != ''){ lastThree = ',' + lastThree; } var res = otherNumbers.replace(/\B(?=(\d{2})+(?!\d))/g, ",") + lastThree; return res; }"]]> </hc:propertyExpression> </hc:chartProperty>To add the rupee symbol to the tooltip, you will need to add it in the plotOptions -> bar-> tooltips ->valuePrefix or valueSuffix. Related links -https://community.jaspersoft.com/wiki/display-axis-label-numbers-indian-numeric-system-html5-chartshttps://community.jaspersoft.com/wiki/using-functions-html5-charts-highcharts
  16. Problem: We have seen that sometimes using “defaultTransactionIsolation= READ_UNCOMMITTED” in jdbc connection string for the JNDI connection let to continuous loading of reports and same was observed when the reports were used in a dashboard. Solution: Database isolation levels are used to define the degree to which one transaction must be isolated from resource or data modifications made by other concurrent transactions. Transactions running at READ_UNCOMMITTED level do not issue shared locks to prevent other transactions from modifying data read by the current transaction. Also, transactions are not blocked by exclusive locks at the time of data modification, thus allowing other transactions to read the modified data which is not yet committed. If you observe continuous loading of reports while running them which use "defaultTransactionIsolation= READ_UNCOMMITTED" in their JDBC Data source connection, you can try to remove the isolation level to see if it resolves the issue.
  17. Problem: The “Loading...” message between navigation of pages for a report on JasperReports Server may seem to be disruptive for user experience which was not seen in versions prior to 7.9 JRS. Cause: This was an intentional change in the 7.9 JasperReports Server. The report viewer has been refactored to use the same code as the dashboards, so that our product uses a single report viewing API, which works the same way everywhere. The "Loading.." message appears because each time we click the next page, it sends a request to the server and we have to wait for the 2nd page generation. Hence, this is by default how the jasperserver is designed to function in the 7.9 version. Resolution: As a workaround for this, you will need to make changes in the <js-webapp>jasperserver-proscriptsruntime_dependenciesbi-reportsrcbireportReport.js file. You will need to Comment out 'controller.view.showOverlay()’ in the file and this will resolve the issue. Also, as we are making changes in the javascript file you will need to follow the below documentation to optimize the scripts to get the changes reflected on the server if optimization has been enabled on your JasperReports Server. https://community.jaspersoft.com/documentation/tibco-jasperreports-server-ultimate-guide/v790/customizing-javascript-files
×
×
  • Create New...