rsuddhala Posted February 10, 2016 Share Posted February 10, 2016 Hi, I have created Dashboard with reports, It is worked fine when i work last day.But today when i try to run the input conrtol of Dashboard shows previous date not todays date.But when i run report saperately not in dashboard the input contols shows todays date and work correctly .The same input control used in Dashboard but it shows previous date, The date which i created Dashboard not todays date.Please let me know any solution for this questions...Thank you...Thanks,Raviraj Link to comment Share on other sites More sharing options...
kkriplani Posted February 10, 2016 Share Posted February 10, 2016 Check the default expression for date in the report, most likely the date is hard bounded to the particular date.You could give a java util date.regards, KKriplani Link to comment Share on other sites More sharing options...
rsuddhala Posted February 11, 2016 Author Share Posted February 11, 2016 Hi KKriplani,I have already given "java.util.date" ...It is not hard bounded..It is working fine when i run the report saperately .But not in Dashboard , Please check below code <parameter name="cal" class="java.util.Calendar"><defaultValueExpression><![CDATA[Calendar.getInstance()]]></defaultValueExpression></parameter><parameter name="endDate" class="java.util.Date"><defaultValueExpression><![CDATA[($P{cal}.set(new Date().getYear()+1900, new Date().getMonth(), new Date().getDate()) ||$P{cal}.add(Calendar.MONTH, -1) ||$P{cal}.set(Calendar.DAY_OF_MONTH, $P{cal}.getActualMaximum(Calendar.DAY_OF_MONTH)))? null : $P{cal}.getTime()]]></defaultValueExpression></parameter><parameter name="beginDate" class="java.util.Date"><defaultValueExpression><![CDATA[($P{cal}.set(new Date().getYear()+1900, new Date().getMonth(), new Date().getDate()) ||$P{cal}.add(Calendar.MONTH, -13) ||$P{cal}.set(Calendar.DAY_OF_MONTH, 1))? null : $P{cal}.getTime()]]></defaultValueExpression></parameter> 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