mastanraosegu Posted April 16, 2014 Share Posted April 16, 2014 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 More sharing options...
Tom C Posted April 16, 2014 Share Posted April 16, 2014 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 More sharing options...
mastanraosegu Posted April 17, 2014 Author Share Posted April 17, 2014 thanks for giving reply..,actually my application supports I18N feature and timezones also. Ican take timezone id value to input control to the reportstime 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 timeis to display the input control.How to handle this problem. Thanks & Regards,Mastanrao S. 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