Jump to content

vchiem

Members
  • Posts

    443
  • Joined

  • Last visited

 Content Type 

Forum

Downloads

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Events

Profiles

Everything posted by vchiem

  1. Check this: https://community.jaspersoft.com/wiki/how-import-separate-organization-rest-v2-api
  2. The REST API guide has information on the reports service: CHAPTER 13 REST API REFERENCE - THE reports SERVICE
  3. Issue:Using REST_v2 API to try and set the theme of a sub-organization, 'East_Chain', the response returned is a 404 status code. Basic Auth username: superuser password: superuser Request PUT: http://<server>:8080/jasperserver-pro/rest_v2/jasperserver-pro/rest_v2/organizations/Top_Chain/East_Chain or PUT: http://<server>:8080/jasperserver-pro/rest_v2/jasperserver-pro/rest_v2/organizations/Top_Chain/organizations/East_Chain Body {"theme":"pods_summer"} [/code]How to successfully set the theme for a sub-organization ? Solution:The REST API service only has the structure to set the theme to an organization and not to a sub-organization. Setting this: /jasperserver-pro/rest_v2/organizations/Top_Chain/East_Chain will return 404 because the REST API expects this format: /jasperserver-pro/rest_v2/organizations/<organization> and hence <organization> then becomes "Top_Chain/East_Chain" which doesn't exist. In order to set the theme to a sub-organization, "East_Chain": 1> Set the REST authentication to the administrator of the parent organization. For example: Basic Auth username: jasperadmin|Top_Chain password: jasperadmin 2> Issue a REST call like this: PUT: http://<server>:8080/jasperserver-pro/rest_v2/organizations/East_Chain For more information on setting themes to an organization, refer to "TIBCO JasperReports® Server REST API Reference" section "21.5 Setting the Theme of an Organization" ref 01844815
  4. There is the Horizontal LED widget under "Components Pro" but I think it is only available in Commercial editions.
  5. Issue:Report A has a parameter of type java.util.List (This input control shows a list of years when report is run). The parameter is hyperlinked to Report B (using ReportExecution) and at run-time it which works fine based on the years selected. But the requirement is to also pass the previous year/s of the selected year/s as well to the Report B. How can this be achieved ? [toc]Example use case:User selects 2003, 2005, 2007 in the input control of Report A and run the report. The report contains a table with hyperlinks.User clicks on the report hyperlink which opens Report B with the years 2002, 2003, 2004, 2005, 2006, and 2007 selected in the input control.The following screenshots illustrates the use case. Report A: Report B: Solution:Enter this in the hyperlink parameter expression: ((List<Integer>) $P{P_1_nengetsu}).stream().collect(() -> new ArrayList<>(), (l, x) -> {l.add(x - 1); l.add(x);}, (l1, l2) -> {})[/code]This creates a list with x - 1 added for all x values in the original list Note: This expression does not work in TIBCO JasperReports® Server 6.4.x. JasperReports Server 6.4.x cannot compile Java 1.8 expressions and therefore you can get compile errors in both Studio and Server. Version 7.x has a newer version of ecj-4.4.2.jar in the WEB-INF/lib directory whereas in version 6.4.x it is using an older ecj-4.3.1.jar. Attached is a sample JRXML with the above expression. ref 01827419
  6. Issue:Scheduling a report with filename >=30 characters containing accented characters (eg. french accents) produces an email attachment with corrupt filename. For the same scheduled report, the output file generated correctly in the specified repository output location. Issue can be reproduced after logging into TIBCO JasperReports® Server as either US english locale or french locale. Screenshot of email attachment showing corrupt file name: [toc] Solution:The issue occurs when the report name is less than or equal to 30 characters AND containing accented characters. The following results indicates whether the email attachment filename is correct based on the report name given. Works:Bons_bleus_non_finalises_rapportBons_bleus_non_finalises_rapport123456789Bons_bleus_non_finalisés_rappFails:Bons_bleus_non_finalisés_rappoAs a workaround, name the report in the schedule definition to be less than 30 characters for report names to contain accented characters. This issue has been reported as a defect (see Related Articles). Related Articles:JS-57006: Scheduled Report attachment filename is corrupt when name contains accented chars
  7. Issue:After exporting a report to any output format, the user is redirected to the TIBCO JasperReports® Server login page. Either of the following errors may be observed in the jasperserver.log/catalina.out: [toc]YYYY-MM-DD 10:34:29,152 ERROR CsrfGuard,http-nio-80-exec-41:44 - potential cross-site request forgery (CSRF) attack thwarted (user:<anonymous>, ip:xxx.xxx.xxx.xxx, method:POST, uri:/jasperserver-pro/flow.html/flowFile/Report.pdf, error:request token does not match session token)[/code]or YYYY-MM-DD 14:18:44,001 ERROR CsrfGuard,http-nio-8070-exec-10:44 - potential cross-site request forgery (CSRF) attack thwarted (user:<anonymous>, ip:xxx.xxx.xxx.xxx, method:POST, uri:/jasperserver-pro/flow.html/flowFile/Report.pdf, error:required token is missing from the request[/code]Solution:An internet browser extension called LastPass was found to be the cause of this issue. The LastPass plugin appears to have altered the CSRF token during the export operation and hence the user was redirected to the login page. Check the user's internet browser extensions to see whether the browser has the LastPass plugin installed and if it exists, then the solution is to disable the extension. Note: Although we have identified that the LastPass is causing issues with CSRF token, the cause of the issue may not be limited to LastPass. If LastPass was not installed it is worthwhile to check other non-standard extensions that have been installed that may have interfered with the CSRF token. LastPass is a common browser extension and TIBCO has an enhancement request filed for this issue (see Related Articles). Related Articles:JS-38127: CSRF Guard lib does not play nicely with LastPass browser extension
  8. Issue:When developing report in TIBCO Jaspersoft® Studio querying a CSV data adapter, we can create a simple report with the data shown when placing the text fields in the Detail band. However, when using a table component, the preview displays a blank table. How to get a table to display data from a CSV data source ? Solution: This can be achieved by passing the $P{REPORT_DATA_SOURCE} to the table component in the "Use a JRDataSource Expression". You may need to also pass the $P{REPORT_PARAMETERS_MAP} to the table's parameters map. Image below: Related Articles:https://community.jaspersoft.com/questions/1155161/how-create-table-csv-data
  9. Issue:When adding a file with new file extension (such as *.js) to a repository folder using "Add Resource --> File --> Content Resource", the following message is displayed: "The file extension is not valid for the selected file type" How can I enable this new file extension in TIBCO JasperReports® Server ? Solution:New file extensions can be added by editing the server file, resource.add.files.js, followed by restarting the TIBCO JasperReports® Server. Location: Before TIBCO JasperReports® Server 7.2: ../webapps/jasperserver-pro/scripts/bower_components/jrs-ui/src/resource.add.files.js TIBCO JasperReports® Server 7.2 and above: ../webapps/jasperserver-pro/scripts/runtime_dependencies/jrs-ui/src/resource/resource.add.files.js The relevant section is pasted below and for adding a 'Content Resource' file, you can add the file extension to the list for 'contentResource' : var addFileResource = { PAGE_ID: 'addResourceFile', TYPE_ID: 'fileType', PATH_ID: 'filePath', LABEL_ID: 'addFileInputResourceLabelID', RESOURCE_ID_ID: 'addFileInputResourceID', DESCRIPTION_ID: 'addFileInputDescription', FOLDER_URI_ID: 'folderUri', SAVE_BUTTON_ID: 'save', typeToExtMap: { 'accessGrantSchema': ['xml'], 'css': ['css'], 'font': ['ttf'], 'img': ['jpg', 'jpeg', 'gif', 'bmp', 'png'], 'jar': ['jar'], 'jrxml': ['jrxml'], 'olapMondrianSchema': ['xml'], 'prop': ['properties'], 'jrtx': ['jrtx'], 'xml': ['xml', 'agxml'], 'config': ['config'], 'cer': ['p12', 'pfx'], 'contentResource': ['docx', 'doc', 'ppt', 'pptx', 'xls', 'xlsx', 'ods', 'odt', 'odp', 'pdf', 'rtf', 'html', 'txt', 'csv', 'json', 'js'], 'secureFile': ['*'] },[/code] The change can be tested by appending _opt=false to the URL which will test the change in non-optimized mode. For example : http://server:8080/jasperserver-pro/flow.html?_opt=false&_flowId=homeFlow The customized javascript file would need to be optimized. To optimize the javascript file/s, this can be done by following the section, "5.2.3 Customizing JavaScript Files" in "TIBCO JasperReports Server Ultimate Guide". ref: 01827458
  10. Issue:Once "Reset Page Number" is checked under the Group Header/Footer band properties, the built-in variables PAGE_NUMBER and MASTER_CURRENT_PAGE are reset for each group. We would like to generate a report with page numbering which is reset for each group as well as the current page numbering for the total number of pages in the report. How can this be achieved ? Solution:Page numbering for each group involves checking on "Reset Page Number" (isResetPageNumber="true") which means for each group the page number is reset. It involves a text field expression in the Page Footer band with built-in variable, $V{PAGE_NUMBER} with Evaluation Time set to Now (for current page in group) and another text field expression with $V{PAGE_NUMBER} with Evaluation Time set to the defined Group (for total pages in group). In order to also create a page number displaying the current page of the whole report, the solution involves having an expression involving the built-in variables: $V{MASTER_CURRENT_PAGE} $V{MASTER_TOTAL_PAGES} but placed in a subreport. The subreport is then placed in the same Page Footer band of the main (master) report. Attached is a sample report with page numbering reset per group as well as page numbering for report. Note: Each group is separated by a blank page. ref: 01841938
  11. Report is empty when the underlying query does not return any data. You may want to check the SQL query for the main report and see if your date parameters are set correctly. On the server under Log Settings, you can turn on the SQL debug option (JRJdbcQueryExecuter) and when running the report you can see the SQL with the parameter values in the jasperserver.log
  12. This can be achieved if you pass the $P{REPORT_DATA_SOURCE} to the table in the "Use a JRDataSource Expression". See file image.. Also need to pass the $P{REPORT_PARAMETERS_MAP} to the table's parameters map.
  13. Seems like a network related issue. I recommend to do a google search on the error itself and see what suggestions are out there that can help. There are plenty of articles out there. Here is one example: http://www.dba-oracle.com/t_no_more_data_to_read_from_socket.htm
  14. Perhaps you are looking for the "Stretch with Overflow" option in text field. With Studio, you can write conditional expressions in the Expression field of the text element.
  15. Not sure why your administrator is seeking another solution but PhantomJS is required. https://community.jaspersoft.com/wiki/dashboard-renderer-not-found-or-failed-start-please-contact-your-system-administrator
  16. Start with this: https://community.jaspersoft.com/wiki/filtering-date-range It is an old article which applies to outdated version of Studio but the concept is the same.
  17. In the Dataset and Query dialog of the main report there is the "Data preview" tab. You can test whether data is feeding into this report by clicking on Read Fields and then Refresh Preview Data. If you can see data, then revise the design. Or perhaps start a blank report again and simply add one field to the detail band and see if the report previews with data.
  18. Issue:In TIBCO JasperReports® Server 7.5, the available Time Series Chart types in Ad Hoc Editor are: Time Series Line Chart Time Series Spline Chart Time Series Area Chart Time Series Area Spline Chart But instead of the above, we want to create a Time Series Column Chart. How can this be achieved ? Solution:Although there is no available option in the Ad Hoc Editor to choose a Time Series Column Chart, you can actually start by creating a Time Series Line Chart and then specify the property chart.type=column (or series.type=column) in the Chart Format -> Advanced tab: The result will look like this:
  19. Issue:We are using a map component from the 'Basic Elements' palette and have set the latitude and longitude values for the map center (under Map tab) to reference fields as $F{lat} and $F{long} respectively. However, when navigating to the Markers tab and adding a new marker or editing an existing marker, the map center latitude and longitude expression values were reset to 45.439722 and 12.331944 overwriting what was defined. Solution:This was reported as a defect (reference JSS-2682) and the workaround is to define all your markers first and then set/re-set the map center expression values last or copy and paste the relevant two lines back into the source code under the Source tab: <c:latitudeExpression><![CDATA[$F{lat}]]></c:latitudeExpression> <c:longitudeExpression><![CDATA[$F{long}]]></c:longitudeExpression>[/code]
  20. IssueAfter installing TIBCO JasperReports® Server 7.2 successfully on Tomcat 9.0.29, the following errors were encountered upon starting the server: [toc]2019-12-05 13:09:17,945 ERROR ContextLoader,main:350 - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tenantImportMergeUtil' defined in ServletContext resource [/WEB-INF/applicationContext-export-import-web-pro.xml]: Cannot resolve reference to bean 'multiTenancyExportConfiguration' while setting bean property 'tenantModuleConfiguration'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'multiTenancyExportConfiguration' defined in ServletContext resource [/WEB-INF/applicationContext-export-import-web-pro.xml]: Cannot resolve reference to bean 'tenantSerializer' while setting bean property 'tenantSerializer'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tenantSerializer' defined in ServletContext resource [/WEB-INF/applicationContext-export-import-web.xml]: Invocation of init method failed; nested exception is com.jaspersoft.jasperserver.api.JSExceptionWrapper: A mapping for class com.jaspersoft.jasperserver.export.modules.mt.beans.TenantBean already exists ... Caused by: org.exolab.castor.mapping.MappingException: A mapping for class com.jaspersoft.jasperserver.export.modules.mt.beans.TenantBean already exists at org.exolab.castor.mapping.loader.AbstractMappingLoader2.addDescriptor(AbstractMappingLoader2.java:96) at org.exolab.castor.mapping.loader.AbstractMappingLoader.createClassDescriptors(AbstractMappingLoader.java:276) at org.exolab.castor.xml.XMLMappingLoader.loadMapping(XMLMappingLoader.java:152) at org.castor.mapping.MappingUnmarshaller.getMappingLoader(MappingUnmarshaller.java:165) at org.castor.mapping.MappingUnmarshaller.getMappingLoader(MappingUnmarshaller.java:131) at org.exolab.castor.xml.XMLContext.addMapping(XMLContext.java:82) at com.jaspersoft.jasperserver.export.io.CastorSerializer.createCastorMapping(CastorSerializer.java:83) ... 74 moreSolution:The error was due to deploying TIBCO JasperReports® 7.2 server on the release version Tomcat 9.0.29. It is uncertain why this specific minor release is generating such issues but according to the TIBCO Jaspersoft® Platform Support guide, TIBCO JasperReports® Server 7.2 certifies the following Tomcat releases: - 8.5.0 - 8.5.39 - 9.0.1 - 9.0.17 The solution is to revert to a certified version of Tomcat, for example 9.0.17 and installing TIBCO JasperReports 7.2 server on that version.
  21. Answer to title subject is No. JasperReports Server 7.2 supports Tomcat 9.0.1 to 9.0.17. If your issues occur on a certified combination then it is best to check the jasperserver log for details of error.
  22. Special characters in report names will give problems when export to excel. We know about this and was reported as a defect from 6.x onwards but it hasn't been fixed yet. Apart from removing it from the name, I am not aware of any other workarounds.
  23. This is a sample using REST_v2 to create a new Holiday Calender named 'XmasCalendar' so that it appears in the Holidays dropdown box of the Scheduled Jobs page. RequestMethod: PUTURL: http://<server>:8080/jasperserver-pro/rest_v2/jobs/calendars/XmasCalendar[/code]Headers Content-Type: application/xmlauthorization: Basic auth (with username='superuser' and password='superuser' credentials)[/code]Body<?xml version="1.0" encoding="UTF-8" standalone="yes"?><reportJobCalendar> <calendarType>holiday</calendarType> <description>Xmas calendar description</description> <timeZone>America/Los_Angeles</timeZone> <excludeDays> <excludeDay>2019-12-25</excludeDay> <excludeDay>2019-12-26</excludeDay> </excludeDays></reportJobCalendar>[/code]Result
  24. This is a sample using REST_v2 to create a Single Select Query Input Control named 'TestInputControlJSON' RequestMethod: POSTURL: http://<server>:8080/jasperserver-pro/rest_v2/resources/public/Input_Controls[/code]Headers Content-Type: application/repository.inputControl+jsonauthorization: Basic auth (with username='superuser' and password='superuser' credentials)[/code]Body{ "label" : "TestInputControlJSON", "uri" : "/public/Input_Controls/TestInputControlJSON", "mandatory" : false, "readOnly" : false, "visible" : true, "type" : 4, "valueColumn" : "fullname", "visibleColumns": [ "fullname", "username" ], "query" : { "queryReference": { "uri": "/public/Queries/JIUSERQuery" }}}[/code]Notes:The sample references an existing query 'JIUSERQuery' in the repository folder /public/Queries. JiUserQuery datasource = Jserver repository databaseJIUserQuery query sql = "select fullname, username from jiuser;"
  25. Check this link: https://community.jaspersoft.com/wiki/applying-your-jaspersoft-product-licenses It mentions: NOTE: If you purchased the entire Jaspersoft Business Intelligence suite (including JasperServer), you can apply the jasperserver.license file in the iReport or Jaspersoft Studio License Manager dialog rather than jasperreports.license.
×
×
  • Create New...