Jump to content

How to cretate a mandatory parameter for jrxml on Jaspersoft Studio?


Recommended Posts

I have a working jrxml file on Jaspersoft Studio but even if I set Mandatory option on Jaspersoft Server, the input parameter is not mandatory. Though I don't set the parameter, report is being created.

Here's my parameter definition on jrxml;

    <parameter name="whereClauseForEndDate" class="java.lang.String" isForPrompting="false">
            <defaultValueExpression><![CDATA[($P{endDate} == null || $P{endDate}.toString().isEmpty()) 
    ? "" 
    : ($P{startDate} == null || $P{startDate}.toString().isEmpty() 
        ? ",payload.measurement.eventTimeMs : { '$lt' : "+ (new SimpleDateFormat("yyyy-MM-dd").parse($P{endDate}.toString()).getTime() + 172800000) +"}"
        : "")]]></defaultValueExpression>

As I said, I chose mandatory option on Jaspersoft server. How can I make the parameter mandatory?

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...