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

eferrell

Members
  • Posts

    8
  • Joined

  • Last visited

eferrell's Achievements

Rookie

Rookie (2/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Issue DescriptionIn rare occurrances there is an issue after an upgrade where all reports fail to execute and they return an error saying "Parameter "DATABASE_TIMEZONE" does not exist". Sample stack trace below. [toc]net.sf.jasperreports.engine.JRRuntimeException: Parameter "DATABASE_TIMEZONE" does not exist. at net.sf.jasperreports.engine.query.JRAbstractQueryExecuter.getValueParameter(JRAbstractQueryExecuter.java:646) at net.sf.jasperreports.engine.query.JRAbstractQueryExecuter.getValueParameter(JRAbstractQueryExecuter.java:661) at com.jaspersoft.jasperserver.api.engine.jasperreports.util.JRTimezoneJdbcQueryExecuter.getValueParameter(JRTimezoneJdbcQueryExecuter.java:148) at com.jaspersoft.jasperserver.api.engine.jasperreports.util.JRTimezoneJdbcQueryExecuter.<init>(JRTimezoneJdbcQueryExecuter.java:132) at com.jaspersoft.commons.util.JSControlledJdbcQueryExecuter.<init>(JSControlledJdbcQueryExecuter.java:65) at com.jaspersoft.commons.util.JSControlledJdbcQueryExecuterFactory.createQueryExecuter(JSControlledJdbcQueryExecuterFactory.java:26) at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:1070) at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:667) at net.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:1253) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:877) at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFiller.run(BaseFillHandle.java:120) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$SynchronousExecutor.execute(EngineServiceImpl.java:733) at net.sf.jasperreports.engine.fill.BaseFillHandle.startFill(BaseFillHandle.java:165) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$AsynchronousReportFiller.fillReport(EngineServiceImpl.java:695) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.fillReport(EngineServiceImpl.java:1474) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$ReportFill.runReport(EngineServiceImpl.java:874) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$ReportRunnable.run(EngineServiceImpl.java:754) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) ResolutionIn the jasperserver database, compiled JasperReports Library resources are cached in the JIRepositoryCache table for increased efficiency at runtime. Because the JasperReports Library JAR is typically updated with each new release, old cached items can get out of date and cause errors at runtime. To manually clear the repository cache database table, run a SQL command similar to one shown below: update JIRepositoryCache set item_reference = null; delete from JIRepositoryCache;Ref. Case 00062087
  2. In this article I will provide step-by-step instructions for editing a domain schema using the RESTv2 webservice API. I recommend testing this out with a REST tool before coding your customized solution. I used WizTool’s REST Client v3.2.2 which can be found here: http://code.fosshub.com/WizToolsorg-RESTClient/download/restclient-ui-3.2.2-jar-with-dependencies.jar but you can also use the Postman extension on Google Chrome. First, you need to get the resource descriptor of the domain. You are required to know the repository URI of the domain as it part of the request’s URL. This resource descriptor will contain the URI of the domain’s schema file which we will use in future steps. URL: localhost:8080/jasperserver-pro/rest_v2/resources/public/Testing/sugarcrm_domain_REST Method: GET Auth: Basic, username=superuser, password=superuser, pre-emptive=yes Body: None (GET request) Response Status: HTTP/1.1 200 OK Response Body: <?xml version="1.0" encoding="UTF-8"?> <semanticLayerDataSource> <creationDate>2015-04-02T11:26:04</creationDate> <description/> <label>sugarcrm-domain-REST</label> <permissionMask>1</permissionMask> <updateDate>2015-04-02T11:26:04</updateDate> <uri>/public/Testing/sugarcrm_domain_REST</uri> <version>0</version> <dataSourceReference> <uri>/public/Samples/Data_Sources/SugarCRM_postgres93</uri> </dataSourceReference> <schemaFileReference> <uri>/public/Testing/sugarcrm_domain_REST_files/sugarcrm_domain_REST_schema</uri> </schemaFileReference> </semanticLayerDataSource> Download the existing schema using the URI in the schemaFileReference tag from the domain resource descriptor. URL: localhost:8080/jasperserver-pro/rest_v2/resources/public/Testing/sugarcrm_domain_REST_files/sugarcrm_domain_REST_schema Method: GET Auth: Basic, username=superuser, password=superuser, pre-emptive=yes Body: None (GET request) Response Status: HTTP/1.1 200 OK Response Body: [Contains the schema XML file. This is the same file that you would see if you click on the Export Design button in the Domain Designer] Modify your domain schema xml. Upload the schema xml back to the repository replacing the existing one. Note that this call is very similar to step 2 but requires additional parameters in the header. URL: localhost:8080/jasperserver-pro/rest_v2/resources/public/Testing/sugarcrm_domain_REST_files/sugarcrm_domain_REST_schema Method: PUT Auth: Basic, username=superuser, password=superuser, pre-emptive=yes Header Content-Type: application/xml Content-Disposition: filename=schema.xml Body Contents: [Contains the modified domain xml schema from step 3.] Response Status: HTTP/1.1 200 OK Response Body: <?xml version="1.0" encoding="UTF-8"?> <file> <creationDate>2015-04-02T11:26:04</creationDate> <label>sugarcrm_domain_REST_schema</label> <permissionMask>1</permissionMask> <updateDate>2015-04-02T11:45:43</updateDate> <uri>/public/Testing/sugarcrm_domain_REST_files/sugarcrm_domain_REST_schema</uri> <version>1</version> <type>xml</type> </file>
  3. Removing Options button on Report ViewerYou will need to edit the <jasperserver-pro>WEB-INFjspmodulesviewReportViewReport.jsp file to do this. Comment out the following lines: [toc]<li class="node"> <ul class="list buttonSet"> <li id="controls" class="leaf ${controlsHidden}"> <button id="ICDialog" class="button capsule ${controlToggle} ${controlUp}" title="<spring:message code="button.controls"/>"> <span class="wrap"> <span class="icon"></span> </span> </button> </li> </ul></li>[/code]This will permanently hide the Option button from the report viewer.
  4. Removing Save and Save As buttons on Report ViewerYou will need to edit the <jasperserver-pro>WEB-INFjspmodulesviewReportViewReport.jsp file to do this. Comment out the following lines: [toc]<li class="leaf"> <button id="fileOptions" class="button capsule mutton up first" title="<spring:message code="button.save"/>" disabled="true"> <span class="wrap"> <span class="icon"></span> <span class="indicator"></span> </span> </button></li>[/code]and <li class="leaf"> <button id="fileOptions" class="button capsule mutton up first" title="<spring:message code="button.save"/> -<spring:message code="feature.pro.only"/>" disabled="true"> <span class="wrap"> <span class="icon"></span> <span class="indicator"></span> </span> </button></li>[/code]This will permanently hide the Save and Save As buttons from the report viewer.
  5. Issue Description:While interacting or closing the Welcome page in Studio on Windows, Studio suddenly crashes. Resolution:This is caused by Internet Explorer patch KB2977629 which is what is used to display the Welcome page. Microsoft has issued an update (KB2987107) which is IE version 11.0.13 to resolve this problem. Additional information about this issue can be found here: https://connect.microsoft.com/IE/feedbackdetail/view/974361https://bugs.eclipse.org/bugs/show_bug.cgi?id=444005https://social.technet.microsoft.com/Forums/ie/en-US/0bae08b2-68fa-4976-9658-6bd4521aca1e/eclipse-37-38-42-crashes-with-ie11-and-kb2977629-installed?forum=ieitprocurrentver
  6. If you have Vietnamese characters in your report and notice that on a PDF export the special characters are either left out completely or replaced with '?', then the following steps will show you how to create a font extension to properly export those special characters. Note that this may work for other special characters in other languages. Creating the Font Extension with Jaspersoft StudioGo to Window -> Preferences -> Jaspersoft Studio -> Fonts and click the Add button.Type in your Font Family name and select your font file for Normal, Bold, Italic, and Bold Italic. Note that you do not have to supply a font file for Bold, Italic, and Bold Italic if you do not plan on using these styles.Select 'Identity-H (Unicode with horizontal writing)' for the PDF Encoding and also check the box for 'Embed this font in PDF document'. This is a predefined encoding for rendering large fonts or fonts with non-standard glyphs. This is the key step for exporting special characters to PDF.Press Next. The font mapping is an optional step.Press Next. The locales is an optional step.Press Finish. Your font extension is now available for use in Jaspersoft Studio.You can now press the Export button to export a JAR file for use with JasperReports Server. This JAR will need to go in the <jasperserver-pro>/WEB-INF/lib folder. A server restart is required to load this extension. Now that your font extension is available in Jaspersoft Studio. You can select it from the list of fonts when editing a text element in the report.
  7. When setting up the font extension, try to use the Identity-H encoding and check the box for imbedding the font in the PDF. Identity-H is a predefined encoding for rendering large fonts or fonts with non-standard glyphs in pdf. I found that this works well with asian-character fonts such as Vietnamese.
  8. "Document is Empty" means that your main data set query did not return any records. If you're not using the main data set query (perhaps you're retrieving your data from sub-data sets or the scriptlet itself) then you need to put in a static query to return at least one result. Here are some examples: Oracle: select 1 from DUAL PostgreSQL: select 1 as field1 MySQL: select 1
×
×
  • Create New...