okyrychenko
Members-
Posts
8 -
Joined
-
Last visited
okyrychenko's Achievements
-
Issue DescriptionWe have a table in which we have value stored in seconds. But On report we need to display it in format hh:mm:ss. Formula has to work on both sql server and Oracle ResolutionTo use one function with different database you need to add it to WEB-INF/applicationContext-semanticLayer.xml for each database To oracleSQLGenerator bean "to_char(to_date(" + sqlArgs[0] + ", 'SSSSS'),'HH24:MI:SS')" To bean sqlserverGenerator "convert(varchar,dateadd(ss, "+ sqlArgs[0] + ", 0),8)" As function returns different type then we need to add it also in applicationContext-el.xml and restart server. Then you can use sec2time() function in domain designer. Ref. Case 00061845
-
Need to Hide 'View As Tree' Button
okyrychenko posted an entry in Best Practices
okyrychenko posted an entry in Best Practices
Issue DescriptionWe need to hide the "view as tree" button in ad-hoc view creation - "Select Data" Page. We are OK if both of the "View as Tree" and "View as List" buttons are hidden. [toc]ResolutionYou hide it by changing the files <jasperserver-pro>scriptsadhocdatachoosertemplatedatachooserTabTemplate.htm and <jasperserver-pro>optimized-scriptsadhocdatachoosertemplatedatachooserTabTemplate.htm to this: <button class="button {{= additionalCssClasses }}{{ if (exposeAction) { }} {{= action}} {{ } }} up" style="{{ if(action === 'tree') { }} {{= 'display: none;' }} {{ } }}" title="{{ if(action === 'list') { }} {{= i18n.ADH_108_DATA_CHOOSER_LIST_TAB_TOOLTIP }} {{ } else { }} {{= i18n.ADH_108_DATA_CHOOSER_FOLDERS_TAB_TOOLTIP }} {{ } }}"> <span class="wrap">{{= label }}</span> </button> If you want to hide both buttons, change it to this: <button class="button {{= additionalCssClasses }}{{ if (exposeAction) { }} {{= action}} {{ } }} up" style="display: none;" title="{{ if(action === 'list') { }} {{= i18n.ADH_108_DATA_CHOOSER_LIST_TAB_TOOLTIP }} {{ } else { }} {{= i18n.ADH_108_DATA_CHOOSER_FOLDERS_TAB_TOOLTIP }} {{ } }}"> <span class="wrap">{{= label }}</span> </button> Ref. Case 00060237-
- ad hoc
- jasperreports server
-
(and 3 more)
Tagged with:
-
Hyperlink not visible in report output
okyrychenko posted an entry in Troubleshooting
okyrychenko posted an entry in Troubleshooting
Issue DescriptionHyperlinks in reports are not visible when report output is rendered on the UI. Though the functionality is working, since clicking on particular field with a hyperlink opens the required result. This is happening across all reports with JasperReports v5.6.1. In older versions, the hyperlinks were clearly noticeable on the report UI with a different color. ResolutionThat is a known issue. You can easily fix it : just add the following to your overrides_custom.css in your theme: ._jrHyperLink { text-decoration: underline; color: #0000EE;} /* unvisited link */._jrHyperLink:link { color: #0000FF; } /* visited link */._jrHyperLink:visited { color: #800080; } /* mouse over link */._jrHyperLink:hover { color: #FF00FF; } /* selected link */._jrHyperLink:active { color: #FF0000; }[/code]Ref. Case 00059407-
- troubleshooting
- jasperreports library
-
(and 3 more)
Tagged with:
-
Customize home page items based on role
okyrychenko posted an entry in Best Practices
okyrychenko posted an entry in Best Practices
If you are on version 6.4 or later please see this article: https://community.jaspersoft.com/wiki/video-enabling-or-disabling-homepage-items-based-roles That is all can be configured in WEB-INF/applicationContext-rest-services.xml file. First find bean "filterOutNotPermittedWorkflows", property objectDefinitionSource. By default we have only ADMINISTRATION_ALLOWED, CONFIGURATION_ALLOWED permission. We will add SEE_DOMAINS_ALLOWED,SEE_ADHOCS_ALLOWED,SEE_REPORTS_ALLOWED: <property name="objectDefinitionSource"><value> com.jaspersoft.jasperserver.jaxrs.poc.hypermedia.workflow.data.UserWorkflowStorage.findByName=ADMINISTRATION_ALLOWED,CONFIGURATION_ALLOWED,SEE_DOMAINS_ALLOWED,SEE_ADHOCS_ALLOWED,SEE_REPORTS_ALLOWEDcom.jaspersoft.jasperserver.jaxrs.poc.hypermedia.workflow.data.UserWorkflowStorage.findAll=ADMINISTRATION_ALLOWED,CONFIGURATION_ALLOWED,SEE_DOMAINS_ALLOWED,SEE_ADHOCS_ALLOWED,SEE_REPORTS_ALLOWEDcom.jaspersoft.jasperserver.jaxrs.poc.hypermedia.workflow.data.UserWorkflowStorage.findAllByParentName=ADMINISTRATION_ALLOWED,CONFIGURATION_ALLOWED,SEE_DOMAINS_ALLOWED,SEE_ADHOCS_ALLOWED,SEE_REPORTS_ALLOWED</value></property>[/code]Now we will add them to next bean workflowsAfterInvocationManager: <bean id="workflowsAfterInvocationManager" class="org.springframework.security.afterinvocation.AfterInvocationProviderManager"> <property name="providers"> <list> <bean class="com.jaspersoft.jasperserver.jaxrs.poc.hypermedia.workflow.service.WorkflowsSecurityFilter"> <property name="supportedAttribute" value="CONFIGURATION_ALLOWED"/> <property name="allowedRoles" ref="${bean.configurationAllowedRoles}"/> <property name="workflowsToSecure"> <list> <value>serverSettings</value> </list> </property> </bean> <bean class="com.jaspersoft.jasperserver.jaxrs.poc.hypermedia.workflow.service.WorkflowsSecurityFilter"> <property name="supportedAttribute" value="ADMINISTRATION_ALLOWED"/> <property name="allowedRoles" ref="${bean.administrationAllowedRoles}"/> <property name="workflowsToSecure"> <list> <value>admin</value> </list> </property> </bean> <bean class="com.jaspersoft.jasperserver.jaxrs.poc.hypermedia.workflow.service.WorkflowsSecurityFilter"> <property name="supportedAttribute" value="SEE_DOMAINS_ALLOWED"/> <property name="allowedRoles"> <util:list> <value>ROLE_ADMINISTRATOR</value> <value>SEE_DOMAINS_ROLE</value> </util:list> </property> <property name="workflowsToSecure"> <list> <value>domain</value> </list> </property> </bean> <bean class="com.jaspersoft.jasperserver.jaxrs.poc.hypermedia.workflow.service.WorkflowsSecurityFilter"> <property name="supportedAttribute" value="SEE_ADHOCS_ALLOWED"/> <property name="allowedRoles"> <util:list> <value>ROLE_ADMINISTRATOR</value> <value>SEE_ADHOCS_ROLE</value> </util:list> </property> <property name="workflowsToSecure"> <list> <value>adhocView</value> </list> </property> </bean> <bean class="com.jaspersoft.jasperserver.jaxrs.poc.hypermedia.workflow.service.WorkflowsSecurityFilter"> <property name="supportedAttribute" value="SEE_REPORTS_ALLOWED"/> <property name="allowedRoles"> <util:list> <value>ROLE_ADMINISTRATOR</value> <value>SEE_REPORTS_ROLE</value> </util:list> </property> <property name="workflowsToSecure"> <list> <value>report</value> </list> </property> </bean> </list> </property></bean>[/code]You can add your custom roles you want to see corresponding item to each list: <util:list> <value>ROLE_ADMINISTRATOR</value> <value>SEE_REPORTS_ROLE</value></util:list>[/code]Roles should be global. For roles that belong to organization use role|tenantId. Restart is required. To restrict access to Data Sources you would need to include the following in the workflowsToSecure property: <value>dataSources</value>[/code] -
How to change start day of WEEK for Relative Dates
okyrychenko posted an entry in How-To
okyrychenko posted an entry in How-To
Issue Description:I'm using the new DateRange concept to get run reports for a Week, quarter, week-1, etc but I need the beginning of the week to begin on a Sunday, not Monday. Where do I configure that? Resolution:You can change it in WEB-INF/classes/relativedate.properties # 1 - SUNDAY, 2 - MONDAYweek.start.day=1[/code]Ref. Case #00034869 -
How do I position or hide the tick labels for a chord meter chart?
okyrychenko posted an entry in How-To
okyrychenko posted an entry in How-To
To hide tick labels you can set font to 0 <ticklabelfont></ticklabelfont>[/code] -
Disabling Dashboard option Popup
okyrychenko posted an entry in How-To
okyrychenko posted an entry in How-To
Issue Description:When mouse hovers over a dashboard we get a pop-up with two options: Refresh & Open in new window. Is there anyway to disable them? Resolution:Delete the section from beginning with div class="floatingMenu" from dashboardViewer.jsp and restart JasperReports Server. Ref. Case #00032850 -
Change default value for data chooser adhoc report (domains)
okyrychenko posted an entry in Best Practices
okyrychenko posted an entry in Best Practices
Issue Description:I want to put domains as a default value when i create an adhoc report and choose its data source, but presently a topic has this default value. Resolution:modify <js-install>/scripts/adhoc.start.js In the initialize section of adhocStart(), there is a switch statement that specifies the default behavior: /** * This is for the initialization of ad Hoc's start page */ initialize : function(){ dialogs.popup.show($("sourceDialog"), true); //get the topic path var options; var UNSPECIFIED_TOPIC ="unspecifiedTopic"; if(!defaultTopic){ this.DefaultTopicsPath = defaultTopicDir + UNSPECIFIED_TOPIC; }else{ this.DefaultTopicsPath = defaultTopicDir + defaultTopic; } if(!isNotNullORUndefined(this.TopicsTreeContainerId)){ return; } switch (window.launchType) { case this.DOMAIN_LAUNCH_TYPE: this.hideRealmTree(this.DOMAIN); this.getDomains(); break; case this.OLAP_CONNECTION_LAUNCH_TYPE: this.hideRealmTree(this.OLAP_CONNECTION); this.getOlapConnections(); break; default: // Fall back to Adhoc Topic this.getTopics(); } this.initializeHandlers(); }, Modify the switch statement to look like this: switch (window.launchType) { case this.DOMAIN_LAUNCH_TYPE: this.hideRealmTree(this.DOMAIN); this.getDomains(); break; case this.OLAP_CONNECTION_LAUNCH_TYPE: this.hideRealmTree(this.OLAP_CONNECTION); this.getOlapConnections(); break; default: // Fall back to Adhoc Topic // this.getTopics(); this.hideRealmTree(this.DOMAIN); this.getDomains(); } Restart JasperReports Server Ref. Case #00032221