Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 222330 - Setting a default value for a date parameter
Summary: Setting a default value for a date parameter
Status: RESOLVED DUPLICATE of bug 124950
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: 2.3.0   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Birt-ReportDesigner CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-11 19:00 EDT by Krishna Venkatraman CLA
Modified: 2008-04-08 03:35 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Krishna Venkatraman CLA 2008-03-11 19:00:51 EDT
I have a date parameter in a report design. I would like to set the default value dynamically to be the date that the report is run. Scripting is ok.
Comment 1 Zhiqiang Qian CLA 2008-03-11 22:40:07 EDT
Currently there's no way to change default value for parameter on the fly. Please refer to bug 124950. 

If you just want to revalidate the value when original parameter value meets specific criteria, you can do like this in reportDesign.initialize() method:

var p1v = reportContext.getParameterValue("p1");
if ( p1v==null /*or other conditions*/)
{
	reportContext.setParameterValue("p1", new java.util.Date());
}

Comment 2 Zhiqiang Qian CLA 2008-04-08 03:35:55 EDT

*** This bug has been marked as a duplicate of bug 124950 ***