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

babasss

Members
  • Posts

    6
  • Joined

  • Last visited

babasss'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. In 7.2, the changes are not in the same files. See below files that should be modified : The length of this field should be increased in the JasperReports Server Repository The length of this field should be increased in <jasperserver-pro>WEB-INFapplicationContext-remote-services.xml The length of this field should be increased in <jasperserver-pro>scriptsruntime_dependenciesjrs-uisrcattributesenumvalidationRulesEnum.js
  2. One year after..... I found the answer myself :-) <principalExpression><![CDATA[authentication.getPrincipal().getRoles().any{ it.getRoleName() in ['ROLE_2'] } && !authentication.getPrincipal().getRoles().any{ it.getRoleName() in ['ROLE_1'] } ]]></principalExpression>
  3. On a dashlet (on a dashboard), I use series.dataLabels.format => {point.name} : {point.percentage:.1f}% Maybe, it can help you !
  4. Hello, I have 2 users : A with ROLE_1 and ROLE_2 B with ROLE_2 onlyIn my security file (linked to the domain), i want to filter data on rowlevel only for ROLE_2. So I put something like <resourceAccessGrant id="Jointree_1_row_access_test"> <principalExpression>authentication.getPrincipal().getRoles().any{ it.getRoleName() in ['ROLE_2'] }</principalExpression> <filterExpression>security_table.login_field == groovy('authentication.principal.username')</filterExpression> </resourceAccessGrant> But as the user A has the ROLE_2, rows are filtered for him. So I tried to test something like "authentication.getPrincipal().getRoles().any{ it.getRoleName() in ['ROLE_2'] } AND authentication.getPrincipal().getRoles().any{ it.getRoleName() not in ['ROLE_1'] }" but groovy send an error (it seems it don't like the second part "AND ....")/ Do you have any idea how filter one group and not another to make something like "ROLE_2 but not ROLE_1" ? Thanks for your help
  5. Hello, I use JasperStudio 6.3. In a StackedPercentBar, i want to hide legend and xAxis. So i changed properties of "Showlegend" and "legend.enabled" and "xAxis.visible" and xAxis.labels.enabled". I see all modifications on XML <hc:chartSetting name="default"> <hc:chartProperty name="title.text" value=""/> <hc:chartProperty name="legend.enabled" value="false"/> <hc:chartProperty name="credits.enabled" value="false"/> <hc:chartProperty name="credits.href" value=""/> <hc:chartProperty name="credits.text" value=""/> <hc:chartProperty name="yAxis.title.text" value=""/> <hc:chartProperty name="chart.zoomType" value="xy"/> <hc:chartProperty name="plotOptions.series.dataLabels.enabled" value="true"/> <hc:chartProperty name="plotOptions.series.dataLabels.format" value="{point.y} ( {point.percentage:.1f}% )"/> <hc:chartProperty name="colors"/> <hc:chartProperty name="xAxis.visible" value="false"/> <hc:chartProperty name="xAxis.labels.enabled" value="false"/> </hc:chartSetting>[/code]But when i execute the report, legend and xAxis are still here. Am I doing something wrong ? Thanks for your help
  6. Thanks for the solution, it works well. If you want to use jQuery (it's embedded by jasperserver), you have to use $ sign. But $ sign is not much appreciate by html component, so you can use "jQuery" instead of $. And be careful to the place and the moment javascript function was loaded. For example, in my report i write (all in the same line) : "<textarea class='hidden' style='display:none' name='_evalScript'>jQuery( document ).ready( function() { jQuery('.class_D').parent().hide(); jQuery('.button_plus').toggle(function() { jQuery('.'+jQuery(this).attr('id')+'_D').parent().show(); }, function() { jQuery('.'+jQuery(this).attr('id')+'_D').parent().hide(); }); });</textarea>" Explanation : I have a table with primary rows and delegate rows => Primary Row Delegate row 1 Delegate row 2 Primary row Delegate row 1 Delegate row 2 Delegate row 3 With an net.sf.jasperreports.export.html.class on properties, i put a class "class_D" for delegate rows and "class_P" for primary rows (more precisely, on one element in the row. jQuery( document ).ready( function() { // I load all functions when the document is ready so it will works jQuery('.class_D').parent().hide(); // I recover parent html element on row with class_D, when the element is on a "td", the parent element is a "tr" and i hide all of it jQuery('.button_plus').toggle(function() { jQuery('.'+jQuery(this).attr('id')+'_D').parent().show(); // I put a button on each row with class "button_plus" with net.sf.jasperreports.export.html.class. When the button is click one time, it show delegate row of the primary element },function() { jQuery('.'+jQuery(this).attr('id')+'_D').parent().hide(); // When the button is click the second time, it hide delegate row of the primary element },function() { }); });[/code]
×
×
  • Create New...