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

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?

brkulu.06's picture
Joined: Nov 7 2019 - 11:06pm
Last seen: 1 year 11 months ago

0 Answers:

No answers yet