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

Dashboard Input control showing previous date not todays date.


rsuddhala

Recommended Posts

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

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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

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