Jump to content
Changes to the Jaspersoft community edition download ×

How to change Input Control default of [Null]


paroney

Recommended Posts

Using a "Single Value" input control, with setting of Mandatory and Visible and a datatype of Text, and when used it always displays a default of "[Null]". Therefore when the control is used, the user always needs to delete the "[Null]" text and then enter a value.

Running version 5.2.0.  Our previous version 5.0.0 always (and preferrably) defaulted to an empty input control.

 

Link to comment
Share on other sites

  • 1 month later...
  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Hi,

[Null] is the default value, in order to change it, you may want to set another default value, e.g. empty string:

<parameter name="MyParameter" class="java.lang.String">
    <defaultValueExpression><![CDATA[""]></defaultValueExpression>
</parameter>
Link to comment
Share on other sites

  • 3 years later...
  • 6 months later...
  • 1 year later...

To ktalarico - Thank you for your response to this issue.  Can you please elaborate on how this would prevent mandatory input control from working?  I believe what you are saying is that is a user could get away with a running a report without inputting a mandatory parameter themselves, because technically the code has already given a value to the parameter.  Please let me know if this is what you mean.  Thanks!

Other than that this solution appears to work well, with the parameter being input by the user overwriting the empty string that was initialized.  Something to consider in the design would be an indicator to the user that the field is mandatory.  

Link to comment
Share on other sites

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...