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

Runtime pass input control value and how to take that value as another parameter default value?


mastanraosegu

Recommended Posts

Hi all,

Runtime pass parameter value and how to take that value as another parameter default value?

Scenario is: [/code]

I have from date ,to date, timezone  three parameter  is avalible for report.

from date ,todate default expression is : 

new SimpleDateFormat("MM/dd/yyyy").format(new SimpleDateFormat("MM/dd/yyyy").parse(Calendar.getInstance(TimeZone.getTimeZone($P{timezone})).get(Calendar.MONTH)+1+"/"+Calendar.getInstance(TimeZone.getTimeZone($P{timezone})).get(Calendar.DATE)+"/"+Calendar.getInstance(TimeZone.getTimeZone($P{timezone})).get(Calendar.YEAR)).getTime())

timezone default expression is :  "PST"

When I am Running report a i Pass parameter time zone value is : "IST" 

Problem is Here:

from date and todate displaying PST time not IST time .

Please any one help me.....!

 

 

Thanks&Regards,

Mastanrao

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

User can only pass parameter values from the input control to the report query. The default value expression is used to set the input control selection BEFORE selected input control value is passed into the report.

What you should do is to create additional "hidden" parm in JRXML template (no prompt and no input control deployment with the report unit), and set its default value expression using $P{timezone}, etc. Make sure this hidden parm is defined after all the other visible input control parms in the JRXML and use it in your SQL query condition clause.

Link to comment
Share on other sites

thanks for giving reply..,

actually my application supports I18N feature and timezones also. Ican take timezone id value to input control to the reports

time zone id dates input controls to default value to that specific value to the timezone times display .

then i no need hidden parameter value application send to the timezone value like pst,ist,est will take that input default time

is to display the input control.

How to handle this problem.

 

Thanks & Regards,

Mastanrao S. 

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