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

vchiem

Members
  • Posts

    443
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Downloads

Everything posted by vchiem

  1. You can set net.sf.jasperreports.print.keep.full.text in classes/jasperreports.properties on the JR server. This will be a global change. In studio, it can be set at the report level or text element level as a property. <property name="net.sf.jasperreports.print.keep.full.text" value="true"/>
  2. Issue:We are using SQL Server JDBC driver as the data source connection. In Ad Hoc designer, we are unable to add a calculated field containing a Date() function to a Domain-based Ad Hoc view Table. Adding the calculated field (APPLY_DATE) to the Columns section worked fine but when adding/moving it to the Groups section, there is a pop up error message, "An error occured while performing the previous request.". The jasperserver.log generated the following sql server jdbc driver error: Caused by: java.sql.SQLException: [TibcoSoftware][sqlServer JDBC Driver][sqlServer]'d' is not a recognized ODBC scalar function option. [/code] The calculated field created is 'APPLY_DATE' which contains the following formula: Date(Concatenate(Mid("APPLY_DATE_MY_NUM", 1, 4), '-', Mid("APPLY_DATE_MY_NUM", 5, 2), '-01'))[/code]Solution:This issue was observed only with SQL Server jdbc driver. It was reported as a defect (JS-33957). Until this defect is addressed, the workaround to this issue is : Under a superuser account, navigate to Manage -> Server Settings -> Ad Hoc Settings Uncheck the following setting and apply the changes by clicking on Change button: "Optimize Queries for Domain-based Reports" Related Articles:JS-33957 SQLServer JDBC error 'not a recognized ODBC scalar function option' when adding Date() calculated field to Groups
  3. Issue:The following errors were thrown in the js-upgrade-pro_<datetime>.log when trying to upgrade 6.1 to 6.4.2 using js-upgrade-newdb.sh as a non-root user: [toc][java] Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'systemLoggedInUserStorage' defined in file [/opt/userhome/jasperreports-install/buildomatic/conf_source/iePro/applicationContext.xml]: Cannot resolve reference to bean 'systemUserStorageCache' while setting bean property 'cache';...[java] Caused by: net.sf.ehcache.CacheException: java.io.IOException: Permission denied [java] at net.sf.ehcache.DiskStorePathManager$DiskStorePath.<init>(DiskStorePathManager.java:331)[/code]Solution:In the file ../buildomatic/conf_source/iePro/applicationContext.xml, there exists the following property: <prop key="ehcache.disk.store.dir">#{ systemProperties['java.io.tmpdir'] }</prop>[/code]The user needs to have full permissions to the path referenced by java.io.tmpdir. This temp directory should not have any subdirectories: main, buffer, adhocCache. If they exist then they should first be deleted. In order to determine what path this system variable is pointing to, you can first set the debug component for class DiskStorePathManager. Please refer to 'Debugging options' below. There are two ways to override the path of 'java.io.tmpdir'. Including -Djava.io.tmpdir for ANT_OPTS in file ..buildomaticbindo-js-setup.sh since running js-upgrade-newdb.sh will execute this script. Example: export ANT_OPTS="$ANT_OPTS -Dnet.sf.ehcache.disabled=true -Xms512m -Xmx2048m -XX:PermSize=128m -Djava.io.tmpdir=/opt/userhome/tmp"[/code]Edit ../buildomatic/conf_source/iePro/applicationContext.xml and change to user.home system property. This is usually the path to the users home dir. Eg /opt/userhome <prop key="ehcache.disk.store.dir">#{ systemProperties['user.home'] }</prop>[/code]When running the upgrade script, watch for temp files and the following 3 directories that will be created: /opt/userhome/main /opt/userhome/buffer /opt/userhome/adhocCache Note: If you are able to run a Diagnostic report on the JR Server, the Diagnostic report will show the paths for the system properties, java.io.tmpdir and user.home. Debugging options:In order to determine what the disk store path is, you can add the following logging component to the file ..buildomaticconf_sourceieProlog4j.properties : log4j.logger.net.sf.ehcache.DiskStorePathManager=debug[/code]and search for "Using diskstore path" in the log file. This is the path that requires the appropriate permissions set for the user. Example log entries: [java] Using diskstore path /opt/userhome/main [java] Holding exclusive lock on /opt/userhome/main/.ehcache-diskstore.lock Related Articles:Importing the archive to TIBCO JasperReports® Server fails because of insufficient permissions
  4. Issue:The TIBCO JasperReports® Server REST API Reference guide section "5.12 Input Control" provides an example notation of XML format resource descriptor for Input Control : [toc]<visibleColumns> <column>{column1}</column> <column>{column2}</column> <column>...</column></visibleColumns>[/code]After creating the Input Control resource (section 6.4 Creating a Resource) the input control was successfully created with all the defined attributes except for the visible column/s. Both POST and PUT method were used but resulted in the same problem. Solution:The issue was reported as a defect (JS-33951). The workaround is to use JSON format as the content type. JSON Format example: This example creates a single-select query (type=4) Input Control resource named 'TestInputControlJSON' in the repository path '/public/Input_Controls'.It requires a pre-defined sql query resource 'JIUSERQuery' created under '/public/Queries'. In this example, the sql behind JIUserQuery is "select fullname from JIUSER;" Header: Content-Type: application/repository.inputControl+jsonBody:{ "label": "TestInputControlJSON", "uri" : "/public/Input_Controls/TestInputControlJSON", "mandatory": false, "readOnly": false, "visible": true, "type": 4, "valueColumn": "fullname", "visibleColumns": ["fullname"], "query": { "queryReference": { "uri": "/public/Queries/JIUSERQuery" } }}[/code] Related Article: JS-33951: RESTv2: creating Input Control resource using XML format <visibleColumns> does not create visible columns
  5. Issue:In Ad Hoc designer, when trying to add a specific field on to a domain-based Ad Hoc crosstab view, the following error was encountered in the jasperserver.log file: [toc]2018-02-19 21:07:57,239 ERROR AdhocAjaxController,http-bio-8080-exec-10388:953 - ad hoc controller exception: An error occurred while performing the previous request. java.lang.UnsupportedOperationException at com.jaspersoft.commons.datarator.ConstantColumn.getRowSet(ConstantColumn.java:69) at com.jaspersoft.commons.dimengine.SingleValueDimensionMember.<init>(SingleValueDimensionMember.java:20) [/code]Solution:The issue surfaced after applying the TIBCO JasperReports® Server 6.3.3 cumulative hotfix build 20180119_1215. This regression was fixed in a subsequent cumulative hotfix v6-3-3-cumulative-hot-fix-20180412-1257 In order to fix this issue please download hotfix_JRSPro6.3.3_cumulative_20180412_1257.zip (or newer) from: https://support.tibco.com/s/hotfixes Note: This issue can also affect TIBCO JasperReports® Server 6.3.2 which was resolved with the latest 6.3.2 cumulative hotfix (hotfix_JRSPro6.3.2_cumulative_20180416_1244.zip or newer). Related Articles: JS-33913: 'UnsupportedOperationException' error adding field to Ad Hoc View after applying hotfix 6.3.3 build 20180119_1215
  6. The table component has a dataset with parameters defined. The parameters created at the main level of the report cannot not have spaces in the names. These are the input control parameters that pass the values to the dataset parameters at run time. Spaces in the names is one that causes the 'null' values in the parameters when run on the server. The input control "Prompt Text" labels on the server can be changed to whatever name you like to display after publishing the report.
  7. Issue:Running certain crosstab reports can result in the following error: ERROR AsyncJasperPrintAccessor,pool-6-thread-4:321 - Error during report execution net.sf.jasperreports.engine.JRRuntimeException: Crosstab has not printed anything on 3 consecutive pages, likely infinite loop. [/code]Solution:This is a defect reported in JRL-1249 and will be fixed in TIBCO JasperReports® Server 7.1. The workaround is to set the following property in the ../classes/jasperreports.properties file: net.sf.jasperreports.legacy.element.stretch.enabled=true[/code]followed by a restart of the TIBCO JasperReports® server. Note: This issue affects versions 6.2.2 and higher. Related Article: JRL-1249: Crosstab infinite loop error
  8. Issue:A TIBCO Jaspersoft® Studio report was created with a table component. The table component's data source is from a dataset with a query that uses the dataset parameters. The main report also has the corresponding parameters created so that any input values can be passed to the dataset parameters at run time. This worked fine when previewing in TIBCO Jaspersoft® Studio but after publishing the report to the server and running the report on the server, a blank report was generated showing null values for the parameters. This was verified in the jasperserver.log file (in DEBUG mode) with the following entries: 2018-04-10 22:06:01,643 DEBUG JRJdbcQueryExecuter,Top_Prescribers subreports #1:434 - Parameter #1 (ds_start_date of type java.sql.Date): null2018-04-10 22:06:01,643 DEBUG JRJdbcQueryExecuter,Top_Prescribers subreports #1:434 - Parameter #2 (ds_end_date of type java.sql.Date): null....[/code] Solution:The cause of the problem was due to the main report parameter names containing spaces. All parameters at the main level need to be changed. For example from "Number of Rows to Return" to "Number_of_Rows_to_Return". See screenshot below showing parameters at the main level of the report. This change should automatically be reflected in the dataset parameters: The query behind the dataset references the dataset parameters : SELECT customer.customer_id, customer.fname, customer.country, customer.birthdate , customer.gender, customer.yearly_income FROM customer WHERE customer.country IN ('USA', 'Mexico', 'Canada') AND customer.birthdate between $P{ds_start_date} AND $P{ds_end_date} AND customer.customer_id IS NOT NULL AND customer.fname like UPPER('%$P!{ds_drug}%') GROUP BY customer.country, customer.birthdate, customer.customer_id, customer.fname, customer.gender, customer.yearly_income LIMIT $P{ds_Rows_Returned}[/code]After publishing the report to the server overwriting existing parameters, the report will successfully run with the parameter values passed and data generated. Note: You can change the "Prompt Text" label of the Input Controls to change the label back to how you want it to be displayed, eg. "Number of Rows to Return"
  9. Issue:The following property is available to store text content of Excel sheet headers and/or footers: net.sf.jasperreports.export.xls.sheet.header.* net.sf.jasperreports.export.xls.sheet.footer.* where * can be either center, left, right. They will appear on the Excel pages upon print preview as plain text. How do we customize the font and size of the text that is stored when using these properties. Solution: There is a nice trick to include the custom font and size in the xml attribute as follows (footer example) : <property name="net.sf.jasperreports.export.xls.sheet.footer.center"> <![CDATA[&"Simsun,bold"&16Page &P of &N]]> </property>[/code]This can be added directly in the Source tab of the JRXML template or indirectly added as a property of the report (Right click on the report name in the outline pane -> Advanced tab -> Edit Properties) The above example will look like this when print previewing in Excel : Tip: If the header or footer is not showing in the Print Preview, check your page margins. Related Articles: https://stackoverflow.com/questions/39656257/how-to-set-excel-header-font-and-style-in-print-preview/39669535
  10. Issue:After installing Jaspersoft® Bigdata ETL 6.4.1 on Mac OS X 10.12 (Sierra), the following error incurred while launching the ETL Studio application: "The JETLBigData-macosx-cocoa executable launcher was unable to locate its companion shared library" Solution:Mac OS sets a quarantine attribute on the file/s by default. The solution is to first delete this quarantine attribute using a terminal session before launching. Steps: Open Terminal session in MacGo to the path of your talend open studio folder and execute this: xattr -d com.apple.quarantine * For example: /<path>/JETLBigData-xxxxxxx-V6.4.1$ xattr -d com.apple.quarantine * Try launching the ETL studio application againRelated Articles: TINSTL-1000: Launching Studio on MacOS Sierra results in error (https://jira.talendforge.org/browse/TINSTL-1000) https://community.talend.com/t5/Installing-and-Upgrading/executable-launcher-was-unable-to-locate-its-companion-shared/m-p/25591#M922
  11. There is a property that you can set at the global, report level or text element level. The default is false though. net.sf.jasperreports.print.keep.full.text Property used to determine whether the fill process must preserve the original text for text elements that are not able to fit their entire contents. When this property is set, the engine saves the original text in the JRPrintText print text object, along with the index at which the text is to be truncated by the print object.
  12. Possibly its reading the first row which is column header. Try checking on the 'Skip the first line' option
  13. Issue:After running a report on TIBCO JasperReports® Server, at the top of the report it shows "Data Refreshed <date> at <time>". I do not want this to be displayed and would like to remove this. How can this be achieved ? Solution:Edit the file: ..webappsjasperserver-proWEB-INFbundlesjasperserver_messages.properties Look for : jasper.report.view.data.snapshot.message=Data refreshed {0} at {1} and modify this to: jasper.report.view.data.snapshot.message= Restart the TIBCO JasperReports® Server.
  14. Issue:In TIBCO Jaspersoft® Studio, after exporting a report to PDF the Japanese multi-byte characters are cut off from the textField. [toc] Image below shows the expected characters to be displayed : There are no issues when displaying the report in java or HTML format. Solution:The problem was due to the font used for the textField. After changing the font to use a different font, for example, Adobe Heiti Std (Adobe Heiti Std R.ttf) then all the characters appear in the PDF output. The fonts that are used by the PDF output can be verified under File -> Properties -> Fonts tab of the PDF document. Note: If a downloaded font is not listed, it can be added by going to Windows -> Preferences -> Jaspersoft Studio -> Fonts -> Add from Path
  15. Issue:How to create a "Multi Select Query" input control using MongoDB native connector Solution:In TIBCO JasperReports® Server, Edit the Input Control of the report Select Mult-Select Query option Select "MongoDB Query" as the language and enter the syntax similar to the example below as the query to the input control. { 'collectionName' : 'accounts', 'findFields' : {'name':1} } [/code]This example populates the Input Control with the 'name' field from the 'accounts' collection (table)
  16. Issue:When scheduling an Ad Hoc report by clicking on "Schedule -> Create Schedule" or "Run in Background", it takes a long time (in this use case it is approximately 6 minutes) for the Save or Submit button to be enabled. The Ad Hoc report contains a multi-select input filter with a "is one of" condition which has 32 event names in it. This issue also affects the long wait time for the Parameters tab to become available. The parameters tab is empty until the Submit/Save button activates and then the parameters load. Solution: The cause of the problem is due to the time it takes to query and load the report input filter data. In this use case, in order to work out that there are 32 different events, it has to load the much larger table and find all the distinct values from that table. There is an enhancement request (reference JS-7555) to disable Ad Hoc Report Filter value look up as it does not make sense for the input control values to be fully populated before enabling the user to click on Submit or Save button. For this use case, there is no desire to change these input values with each run of the report and the filter values need to remain whatever values were set in the Ad Hoc view that the report is based on. The workaround is to use the "Starts with" condition operator in replace of "is one of" in the Ad Hoc view. Related Articles: JS-7555 Disable Adhoc Report Filter data lookup
  17. Issue:How to set pagination when exporting to HTML output format using Visualize.js code. [toc]Solution:In the javascript code, use "ignorePagination: false" instead of "paginated: true" as paginated option is no longer supported. For example: }, function (v) { var report = v.report({ resource: "/public/Samples/Reports/AllAccounts", container: "#container", ignorePagination: false, success: function(){ $("#export").prop("disabled", false); }[/code]There is a documentation enhancement for this addressed in JS-26676 which will amend 'paginated' to 'ignorePagination' option in releases beyond 6.4. Related Articles: JS-26676 Add option to get non-paginated HTML report (Viz.js)
  18. Issue:An end-user deleted a scheduled job from the View -> Schedules page. However, despite the scheduled job having being deleted, the user keeps receiving the error notification emails for the report on a recurring basis (based on the deleted scheduled job definition). How can this be resolved ? Solution:Once the scheduled job was deleted from the front end UI, then under normal circumstances there should be no report executions and no notifications to trigger and hence no emails should have been received. However under abnormal (unidentified) circumstances, a scheduled job was deleted but the corresponding triggers remain. The steps documented below are intended to recover from this situation only as a workaround approach. The idea is to trace down the scheduled job and the triggers and verify if they were actually deleted from the scheduling and trigger tables after the user deleted the schedule from the UI. The jasperserver.log may also capture information that would help with this trace. The jireportjob table stores the schedule job information : select * from jireportjob [/code]Note 1: If the schedule job has been deleted, then the scheduled job entry should not exist in this table. Note 2: The users email can be queried from jireportjobmailrecipient, to identify what schedule triggers email to the impacted user: select * from jireportjob where mail_notification in (select destination_id from jireportjobmailrecipient where address = '<email>';[/code]The jasperserver.log (located under WEB-INF/logs) can be inspected to see whether there is still a schedule trigger happening. For example, look for : "trigger: ReportJobs.trigger_343289_0, scheduled fire time: 2018-01-23 07:00:00.000, fired at: 2018-01-23 07:00:38.405" This entry captures the trigger name 'trigger_343289_0' Check for existing corresponding trigger in the quartz triggers table based on the trigger name : select job_name, trigger_state from qrtz_triggers where trigger_name='trigger_343289_0';[/code]If the trigger_state shows 'WAITING', then its an enabled trigger and it should be set to 'PAUSED' to disable it: update qrtz_triggers set trigger_state='PAUSED' where trigger_name='trigger_343289_0';[/code]Note 3: Setting to PAUSED is safer than deleting the trigger record, for such case where it can be re-enabled again if the wrong trigger was set. Note 4: This is equivalent to 'unchecking' the Enabled checkbox on the View -> Schedules page. However as the scheduled job was already deleted, it is not possible to uncheck the 'Enabled' checkbox.
  19. Issue:The bundled version of the installer comes with a java version installed. For 6.4.0 Linux bundled installer, there would be a java directory under jasperreports-server-6.4.0 and the java version is 1.8.0_121. How do we upgrade the java component to a later Java update ? [toc]Solution:Upgrading Java version for a bundled installer is simply a matter changing the current pointer for environment variable $JAVA_HOME to the new location. Steps: 1> Download the JDK version you want to install. Note that the version must be a certified version. See the Supported Platforms guide for more information. Eg: download JDK 1.8 Update 161 from Oracle.com 2> Extract the JDK to a location on the server. Eg: extract to /opt/jasperreports-server-6.4.0/jdk1.8.0_161 3> Modify the setenv.sh (located under /jasperreports-server-6.4.0/apache-tomcat/bin) and re-point the environment variable $JAVA_HOME to the new location Eg: JAVA_HOME=/opt/jasperreports-server-6.4.0/jdk1.8.0_161 4> Start Tomcat server using command: ./ctlscript.sh start 5> Confirm Java is updated by reviewing the catalina.log/catalina.out file in the ./apache-tomcat/logs directory. Eg: # grep "Java Home" ./catalina.2018-02-19.log # grep "Java Home" ./catalina.out
  20. Issue:The default log format does not include a time to indicate how long each request takes. How can we include this into the output generated in the access log ? Solution:The format for access logs in Tomcat is determined by the configuration of the AccessLogValve in $TOMCAT_HOME/conf/server.xml. There is a %D tag available which represents the duration of the request in milliseconds. This tag appears to be available in Tomcat 6.0 and later. For the full list of format tags for AccessLogValve in Tomcat 8.5, see https://tomcat.apache.org/tomcat-8.5-doc/config/valve.html. If you have another version, consult the documentation for that version. To add logging of request time in milliseconds: Edit the file $TOMCAT_HOME/conf/server.xmlAppend %D to the pattern to output the time it takes to serve the request (in milliseconds). The following example puts square brackets around the response time. <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log" suffix=".txt" pattern="%h %l %u %t "%r" %s %b [%D]" />[/code] The output file is localhost_access_log_yyyy-mm-dd.txt generated under $TOMCAT_HOME/logs
  21. Issue:TIBCO Jaspersoft® Studio 6.4 "Create Parameter" option is not available under the Crosstab Parameters menu Solution:This is a regression defect reported in incident JSS-1612 as the menu option was there in 6.3.0. Until a version with the fix is released, the workaround is to manually set the parameter in the Source tab. Once this is set, the parameter will then be visible under Crosstab -> Parameters structure of the Outline tab for any other modifications to the parameter. Workaround: <crosstab> <reportElement ...> </reportElement> <crosstabParameter name="Parameter1"> </crosstabParameter>[/code] Related Article: JSS-1612 "Create Parameter" in the Crosstab context menu missed in v.6.4.0
  22. Check this: https://community.jaspersoft.com/questions/826264/drill-down-graph-bars
  23. In Studio, there are sample chart reports that you can load by going to File -> New -> Project -> JasperReports Samples. The chart samples shows vertical bar charts but you can change the orientation to Horizontal under Chart Plot. This should be a good starting point.
  24. If its something to ping to see whether the server is running, then can try a specific call: http://:/jasperserver[-pro]/rest_v2/serverInfo/version or another approach may be to send a login request and see if a session id is returned.
  25. This is a regression defect and is targeted to be fixed in the upcoming major release of Studio. In 6.3, the "Create Parameter" is there in the menu option for Crosstab. but not in 6.4 Workaround is to manually put it in the source code tab and then the parameter will appear in the structure pane : <crosstab> <reportElement ...> </reportElement> <crosstabParameter name="ParameterTest1"> <parameterValueExpression><![CDATA["test"]]></parameterValueExpression> </crosstabParameter>
×
×
  • Create New...