silvi Posted January 24, 2012 Share Posted January 24, 2012 Hello all, I have a date parameter in my report called Auto_Date: <parameter name="Auto_Date" class="java.util.Date"> <defaultValueExpression><![CDATA[($P{Auto_Date} == null || $P{Auto_Date} == " " ? new Date() : $P{Auto_Date})]]></defaultValueExpression> </parameter>Set curdate as default value when null or empty string. Report is working fine in i-report but when I am scheduling on Japser server by leaving visible Auto_Date parameter blank, report is empty. I know that if I will set parameter as "Read-only" on server I can schedule it. My limitation is that I cannot have two jrxml file one for random date and one for scheduling. It is driving me crazy, I have searched all the forum but did not find any answer. Can I schedule my report by using default value of parameter. Please help, it' svery important for me. Thanks Silvi Link to comment Share on other sites More sharing options...
brooneyx1 Posted January 24, 2012 Share Posted January 24, 2012 You would either need 2 reports or create a dynamic date entry taht allows you ot choose from a pre-defined list:I use something like: "This Week", "Last 7 Days", Last 30 Days", "Month to Date", etc.This allows me to send reports on any of the defined time slices. So I can schedule a monthly on the first by choosing "Last Month", etc.I have a writeup on this at: http://reptics.com/?p=1And I will be releasing the cdoe behind it shortly. Others probably did something simular, so search around if how I did it doesn't fit. Post Edited by brooneyx1 at 01/24/2012 10:57 Link to comment Share on other sites More sharing options...
silvi Posted January 24, 2012 Author Share Posted January 24, 2012 Thanks Broonyex1.. I read your tutorial and that's what exactly I am looking for. But very sorry to say I am a newbie in using jasper products. So I am not sure how and where use the codes. I would highly appreciate your help if you can explain me in detail and can link me up with documents. 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