kiran_3 Posted May 14, 2015 Share Posted May 14, 2015 here is my jrxml file <?xml version="1.0" encoding="UTF-8"?><!-- Created with Jaspersoft Studio version 6.0.1.final using JasperReports Library version 6.0.0 --><!-- 2015-05-14T10:50:59 --><jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="TestTestMultiQuery" pageWidth ="595" pageHeight ="842" columnWidth="555" leftMargin="20" rightMargin ="20" topMargin ="20" bottomMargin="20" uuid="90abb488-1239-4b84-865e-291aa3094758"> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="mysql_db"/> <parameter name="source" class="java.util.Collection"/> <parameter name="p_source" class="java.lang.String" isForPrompting="false"> <defaultValueExpression> <![CDATA[((!$P{source}.isEmpty() && $P{source}!=null)?"":$P{source}.toString().replaceAll("[\[\]]", "'").replaceAll(", ", "', '"))]]> </defaultValueExpression> </parameter> <queryString> <![CDATA[select id,title,creator_id from need n where ($X{IN,n.source,p_source})]]> </queryString> <field name="id" class="java.lang.Long"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="title" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="creator_id" class="java.lang.Long"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <background> <band splitType="Stretch"/> </background> <detail> <band height="125" splitType="Stretch"/> </detail></jasperReport>[/code]here, my parameter source is not-required param. when i tried running this report its showing meAn error has occurred. Please contact your system administrator. (5321)[/code]If I make it manditory i am not getting this error. what might be the issue? and I tried a solution from internet for this kind of error but it(in tomcat/config/server.xml file urlencoding shoudd be utf-8) didn't work. Link to comment Share on other sites More sharing options...
afomin Posted May 15, 2015 Share Posted May 15, 2015 Hi,The error you see is server's input validation, which blocks request containing unwanted symbols. It may be that mandatory flag somehow impacts the data being sent. In would be in order if you look at server log, there is more detailed information about which security input validation rule is affected.Thanks,Anton. Link to comment Share on other sites More sharing options...
tchen Posted May 16, 2015 Share Posted May 16, 2015 Please refer to the following wiki article for detail on input validation rules:http://community.jaspersoft.com/wiki/jaspersoft-security-changes-and-configurationhttp://community.jaspersoft.com/wiki/jaspersoft-security-security-configuration-filesYour report design is failing on the security rule with this paramter expressions: <parameter name="p_source" class="java.lang.String" isForPrompting="false"> <defaultValueExpression> <![CDATA[((!$P{source}.isEmpty() && $P{source}!=null)?"":$P{source}.toString().replaceAll("[\[\]]", "'").replaceAll(", ", "', '"))]]> </defaultValueExpression> </parameter>[/code] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now