Jump to content
Changes to the Jaspersoft community edition download ×

asimkin

Members
  • Posts

    196
  • Joined

  • Last visited

asimkin's Achievements

Community Regular

Community Regular (8/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Collaborator Rare

Recent Badges

0

Reputation

9

Community Answers

  1. Issue DescriptionCustomer has a requirement to use Apache Dremio as a datasource via JDBC driver. He tried to copy a Dremio JDBC to WEB-INF/lib folder, but TIBCO JasperReports® Server failed to start with error [toc]Error creating bean with name 'logFilterManager': Invocation of init method failed; nested exception is java.lang.ClassCastException: org.apache.logging.log4j.simple.SimpleLoggerContext cannot be cast to org.apache.logging.log4j.core.LoggerContext[/code]ResolutionIt looks like Dremio JDBC driver has log4j dependencies which conflicts with built-in log4j library. A possible solution is to upload the driver manually via UI. Additionally, applicationContext.xml config file should be modified to mark Dremio JDBC driver as the one which does not support autocommit, otherwise you will gen an error in connection test Can’t turn off auto-committing; transactions are not supported. (Dremio is not transactional.)[/code]Steps to create a Dremio JDBC datasource: Stop TIBCO JasperReports® ServerEdit WEB-INF/applicationContext.xml by adding<value>com.dremio.jdbc.Driver</value>[/code]into property<property name="autoCommitUnsupportedDrivers">[/code]Start the serverGo to Create > Data Source menuSelect "Other..." from JDBC Driver drop-down listPaste com.dremio.jdbc.Driver[/code]as JDBC Driver field valueClick on "Add Driver..." buttonSelect Dremio JDBC v.4.7.3 or later driver, click UploadOnce the driver uploaded to the server, specify connection URL in formjdbc:dremio:direct=<host>:31010[/code] Provide user name and passwordClick Test Connection Please note, in case of using some older versions of Dremio JDBC driver, for example, v.3.3.2 connection test fails with error Cannot get a connection, pool error Could not create a validated object, cause: Can't turn off auto-committing; transactions are not supported. (Dremio is not transactional.)[/code]Download the latest version of Dremio JDBC driver and use it instead. Solution tested with TIBCO JasperReports® Server v.7.5.0 AS-20200923, case 01890236
  2. Request DescriptionCustomer created a report and need to remove elemtns formatting (color, style etc) in export to MS Excel SolutionJasperReports library has a special property which allows to ignore text formatting (such as text color, background color, bold style, italic, underline, etc) in Excel export: net.sf.jasperreports.export.xls.ignore.text.formatting[/code]http://jasperreports.sourceforge.net/config.reference.html#net.sf.jasperreports.export.xls.ignore.text.formatting The property can be set at report level (in that case all cells in Excel export will be affected), or at the specific Text Field element. AS-20200922, case 01889949
  3. Request DescriptionCustomer created a report with hyperlinks and need to disable them in export to MS Excel SolutionJasperReports library has a few properties to ignore hyperlinks for most popular export format: net.sf.jasperreports.export.{format}.ignore.hyperlink[/code]For Excel export you should use net.sf.jasperreports.export.xls.ignore.hyperlink[/code]http://jasperreports.sourceforge.net/config.reference.html#net.sf.jasperreports.export.xls.ignore.hyperlink The property should be specified as hyperlink parameter with True boolean value: <hyperlinkParameter name="net.sf.jasperreports.export.xls.ignore.hyperlink"> <hyperlinkParameterExpression>Boolean.TRUE</hyperlinkParameterExpression></hyperlinkParameter>[/code]AS-20200922, case 01889949
  4. Issue DescriptionCustomer created an Ad Hoc Crosstab Report and noted it took about 10 minutes to open the report, although the report SQL took less than 1 minute to execute Customer wondered what was the poor performance issue and hot to improve it. ResolutionAd Hoc Crosstab performance depends on volume of data, crosstab structure (how many columns and rows) and data cardinality (fields with a large number of unique values): Crosstab Reports and High Memory Consumption In that specific case, a Timestamp field ("Ready Date") was used in the Crosstab, but the field data was bucket into quarters. As that field was high-cardinality one due to Time portion, that caused the performance issue. A solution suggested to the customer was to create an Ad Hoc View calculated field to get DATE part of the "Ready Date" field using expression like Date(concat(Year("Ready date"), '-', MonthNumber("Ready date"), '-', DayNumber("Ready date")))[/code]and then use it in the Ad Hoc Crosstab instead of "Ready Date" field. As a result, modified Ad Hoc Crosstab opened in about 40 secs instead of 10 minutes. AS-20200617, case 01846122
  5. Issue DescriptionUser hit an issue related to using the same elements UUIDs in a report: https://community.jaspersoft.com/wiki/unable-export-report-server-due-elements-same-uuids As noted in the article, to fix the issue report element's UUID should be re-generated using Refactor > Reset UUIDs menu But the user uses an older version TIBCO Jaspersoft Studio (v.6.4.21) where there is no such menu. He tried to use TIBCO Jaspersoft Studio version 7.5.0 but there was a compatibility issue with it. What can be done in this case? ResolutionReset UUIDs feature was introduced in a later version of Studio (v.7.2.0) and, in general, reports are not backward compatible. What could be done to get around the restriction: 1. Open Studio v.7.5, do not open the report 2. Go to Window > Preferences > Jaspersoft Studio > Compatibility menu 3. Select 'JasperReports 6.4.0' version in Version drop-down list 4. Open the report in question, reset UUIDs and save the changes. 5. Open the modified report in Studio v.6.4.21 AS-20200617, case 01862405
  6. Request DescriptionUser has a requirement to retrieve TIBCO JasperReports® Server URL when running a report to find out on which instance the report is running. How to achieve it? SolutionA possible way to retrieve TIBCO JasperReports® Server URL where a report is running is to use an expression ((javax.servlet.http.HttpServletRequest)$P{REPORT_PARAMETERS_MAP}.get("HTTP_SERVLET_REQUEST")).getRequestURL() The expression returns a value like http://<servername>:<port_number>/jasperserver-pro/flow.html You may process / truncate the string value per your requirements. Please note, the expression only works when running the report via TIBCO JasperReports® Server UI. It does not work if you run the report in TIBCO Jaspersoft Studio. Solution tested with TIBCO JasperReports® Server v.7.2, v.7.5. AS-20200617, case 01862140
  7. Request DescriptionUser created a custom function in Ad Hoc View to be used in calculated measure or field as described in article How to Add a Custom Function to Ad Hoc View Calculated Measure/Field Functions List In Function Description section, customer would like to display information about function arguments in the same way it works for pre-defined once: Average("NumberFieldName", 'Level') How to implement it? SolutionInformation about functions arguments stored in jasperserver-proscriptsadhoccalculatedFieldsfactorycodeExampleFactory.js Javascript file. The file contains an array of functions definitions: var codeExamples = [....[/code]You can add your custom function arguments into the array using already provided functions details, for example: { // ascii ("FieldName") functions: ['ascii'], code: '"' + getArg('TEXT_FIELD') + '"'}[/code] Complete list of possible argument types and their translations defined in jasperserver-proWEB-INFbundlesadhoc_messages.properties[/code]file: # Argument parts used in Function syntax examples ADH_425_ARGS_FIELD=FieldName ADH_425_ARGS_TEXT_FIELD=TextFieldName ADH_425_ARGS_NUMBER_FIELD=NumberFieldName ADH_425_ARGS_DATE_FIELD=DateFieldName ADH_425_ARGS_BOOLEAN_FIELD=BooleanFieldName ADH_425_ARGS_DATETIME_FIELD=DateTimeFieldName ADH_425_ARGS_NUMBER_OR_DATE_FIELD=NumberOrDateFieldName ADH_425_ARGS_FIELD_VALUE=FieldValue ADH_425_ARGS_RETURN_VALUE=ReturnValue ADH_425_ARGS_ELSE_RETURN_VALUE=ElseReturnValue ADH_425_ARGS_LEVEL=Level ADH_425_ARGS_INTEGER=Integer ADH_425_ARGS_INTEGER_OFFSET=Integer_Offset ADH_425_ARGS_TEXT_STRING=string expression ADH_425_ARGS_START_POSITION=Start_Pos ADH_425_ARGS_LENGTH=Length ADH_425_ARGS_TRUE_CALC=TrueCalc ADH_425_ARGS_FALSE_CALC=FalseCalc ADH_425_ARGS_NAME_STRING=name ADH_425_ARGS_CATEGORY_STRING=category Solution tested with TIBCO JasperReports® Server v.7.5.0 AS-20200520, case 01848172
  8. Issue DescriptionCustomer has a requirement to create an Ad Hoc View based on PostgreSQL datasource which included JSON data type. When he adds the JSON field into Ad Hoc View Table as a Column, an error appears: Exception executing database query. Please contact your administrator. See application log for additional details. 42883 ERROR: could not identify an equality operator for type json[/code]Is there a way to use PostgreSQL JSON data in Ad Hoc View? ResolutionThe error caused by ORDER BY clause added to generated SQL like select "id","info"from "public"."orders_json"order by "info" nulls firstlimit 1000[/code]which can not be applied to JSON object directly. There is an enhancement request to implement support for JSON nested fields in Ad Hoc Views and Domains, internal #JS-33110 Until the request implemented, a possible workaround is to create a Domain derived table to 'convert' JSON type into Text data like: select "id", "info"::Text from "public"."orders_json"[/code]and then use derived table field to create an Ad Hoc View. The data will be displayed like { "customer": "John Doe", "items": {"product": "Beer","qty": 6}}[/code]Solution tested with TIBCO JasperReports® Server v.7.2.0 AS-20200501, case 01852384
  9. Request DescriptionCustomer has a requirement to hide / remove 'minutes' value from a job schedule drop-down list: ResolutionThere are 2 ways to achieve the requirement: Modify an HTML template to remove 'minute' value : WEB-INF/scripts/runtime_dependencies/jrs-ui/src/scheduler/template/editor/scheduleTabTemplate.htm[/code]section <select name="recurrenceIntervalUnit"> <option value="MINUTE">{{- i18n["job.interval.unit.minute.label"] }}</option> <option value="HOUR" >{{- i18n["job.interval.unit.hour.label" ] }}</option> <option value="DAY" >{{- i18n["job.interval.unit.day.label". ] }}</option> <option value="WEEK" >{{- i18n["job.interval.unit.week.label". ] }}</option></select>[/code]Remove or comment out the first option. As non-optimized file is modifdied, in order to test the changes you need to add &_opt=false[/code]parameter to the server URL. Hide the element with a custom theme (overrides_custom.css) using CSS This works with all browsers except MS Internet Explorer. Solution tested with TIBCO JasperReports® Server v.7.5.0 AS-20200410, case 01854815
  10. QuestionWhat is the effect of "Batch Size" property of tOracleOutput JETL compoment? How does it interfer with 'Commit Every' option? ExplanationtOracleOutput component executes the action defined on the table and/or on the data contained in the table, based on the flow incoming from the preceding component in the Job. "Batch Size" property of the component specifies the number of records to be processed in each batch. The batch size feature allows you to have more control of the performance of the data being outputted. Using the Batch size enables you to define the number of lines committed to the database. If working with a large dataset or have hardware restricted environment which can cause excessive memory consumption slows down overall machine performance (client-side) which can lead to errors if the process runs out of accessible memory. Altering the Batch size will ensure performance is not impacted. For example, if transferring a table with 1000000 rows in Studio the batch size commit 10000 at a time to ensure performance is not degraded. You can alter this as per your request but we advise not to exceed the default level. Commit is the process of committing the rows in DB within each batch rows together. The batch size can be used when there is a situation insertion of a bulk number of rows. For example, let us consider the insertion of 1 million records. Batch size is 1000 and commit size is 500. So for each batch 1000 records will be inserted and for each batch, 500 records will be committed. This was answered on the following post: SqlOutput advanced settings The parameters are inter-related and are similar. "Batch size" is the number of rows to be "batched up" before sending them to the database and "Commit" is the number of rows to be sent to the database before sending a commit. Commit is advised to be used after the insert process. AS-20200326, case 01852400
  11. Issue DescriptionUser developed a JRXML report with Groovy language which included a Text field element with expression $P{frm_date_pm}.equals(null)? "N/A" : $P{frm_date_pm}.format("dd-MMM-yyyy")[/code]The report worked as expected in TIBCO JasperReports® Server v.7.1, but after upgrade to v.7.5.0 the report fails with error No signature of method: java.util.Date.format() is applicable for argument types: (String) values: [dd-MMM-yyyy][/code]What's the reason of the error and how to fix it? ResolutionThe issue related to upgraded Groovy library: In TIBCO JasperReports® Server v.7.1, Groovy v.2.4.15 used In TIBCO JasperReports® Server v.7.5, Groovy v.2.5.7 used Date.format() is a method added by Groovy to java.util.Date. Looking at the source, in 2.5.x methods are not added to java.util.Date by default anymore. It's documented in release notes for Groovy 2.5.x: Release notes for Groovy 2.5 - Breaking Changes The extension methods for the java.util.Date class are now in a separate groovy-dateutil module which isn’t included by default when using the groovy-all pom dependency. A possible workaround is to manually place groovy-dateutil-2.5.7.jar library into webappsjasperserver-proWEB-INFlib and restart the server https://dl.bintray.com/groovy/maven/apache-groovy-binary-2.5.7.zip Solution tested with TIBCO JasperReports® Server v.7.5.0 AS-20200324, case 01853647
  12. Issue DescriptionCustomer modified a JSP file to add a custom DIV element and then specified the element color, size in overrides_custom.css file. But then the custom theme was set as Active theme, the custom CSS was not applied to the element. ResolutionReview of the modified JSP showed that the customer used incorrect value for the element class: <div class="711"> <h2>Custom Company Header</h2> <ul> <li>Testing</li> </ul> </div> and corresponding CSS was #loginPage #rotating > .711 { color: #6699ff; font-size: 25px; font-weight: normal; } According to CSS rules, a valid name should start with an underscore (_), a hyphen (-) or a letter (a-z) which is followed by any numbers, hyphens, underscores, letters: CSS Quick Tip: The Valid Characters in a Custom CSS Selector Once the class name was changed to a correct value, like myCorpClass in jsp file <div class="myCorpClass"> <h2>Custom Company Header</h2> <ul> <li>Testing</li> </ul> </div> and in CSS #loginPage #rotating > .myCorpClass { color: #6699ff; font-size: 25px; font-weight: normal; } cusrtomer got expected output. Solution tested with TIBCO JasperReports® Server v.7.2.0, v.7.5.0 AS-20200324, case 01853598
  13. QuestionCustomer would like to hide/remove "Send job status notifications" UI element of job schedule Notifications tab: SolutionA possible solution to hide 'Send job status notifications' section is to customize a theme and use CSS code #jobNotification { display: none;} That is: - download attached overrides_custom.css file with required CSS code- create a new theme in JasperReports Server in Themes folder under the root- import overrides_custom.css file to the theme folder- make the custom theme activePlease review TIBCO JasperReports® Server Admin Guide for more details of custom themes: https://community.jaspersoft.com/documentation/tibco-jasperreports-server-administrator-guide/v720/creating-themes#top Solution tested with TIBCO JasperReports® Server v.7.2.0 , 7.5 AS-20200320, case 01853298
  14. Hi, in Manage > Server Settings > Server Attributes menu you should add atrbiutes using their name/key, that is just userName password Syntax like {attribute('host','Server')} should be used in Da tasource definition only: jdbc:postgresql://{attribute('host','Server')}:{attribute('port','Server')}/{attribute('db','Server')} Best regards, Andriy
  15. QuestionCustomer has a requirement to restrict import of *.jar files from Add Resources > File > Secure file context menu in the repository . SolutionTIBCO JasperReports® Server uses file extension validation for each resource type, defined in a JavaScript file resource.add.files.js located in jasperserver-proscriptsruntime_dependenciesjrs-uisrc for v.7.2.0 jasperserver-proscriptsruntime_dependenciesjrs-uisrcresource for v.7.5.0 typetoExtMap object: 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'], 'secureFile': ['*'] } For secure file, uploading files with any extensions allowed: "secureFile": ["*"] You can change the property value to specify a comma separated list of valid extensions for secure file. As TIBCO JasperReports® Server uses optimized version of scripts, you should rebuild the scripts as described in Ultimate Guide: https://community.jaspersoft.com/documentation/tibco-jasperreports-server-ultimate-guide/v710/customizing-javascript-files or add _opt=false parameter to the URL to use non-optimized scripts: Why my JavaScript customized solution does not work? Solution tested with TIBCO JasperReports® Server v.7.2.0 , 7.5 AS-20200228, case 01805477
×
×
  • Create New...