cancel
Showing results for 
Search instead for 
Did you mean: 

如何给一个日期提示一个默认值,默认值为系统日期?

Former Member
0 Kudos

我定义了一个日期提示,想给它一个默认值,默认值为系统日期,我该怎么做。我试过好多次,默认值都只能是个常量~~

Accepted Solutions (0)

Answers (1)

Answers (1)

sunny_zhang
Active Contributor
0 Kudos

应该没有什么好办法,默认值只能写一个固定值在那里。

不过你可以自己写程序获得系统当前时间,然后作为参数传给报表。

Former Member
0 Kudos

能详细说下吗?我没什么思路,谢谢了

yangning_peng
Participant
0 Kudos

sy-datlo 是当前的系统日期

sunny_zhang
Active Contributor
0 Kudos

对了,你说的是CR的报表吧?

楼上提到的 u201Csy-datlo 是当前的系统日期u201D 是在哪里用的?

Former Member
0 Kudos

不是CR的,是在webi的报表中

sunny_zhang
Active Contributor
0 Kudos

1.自己写一个页面获得当前系统日期,并将该日期存入变量currentDate;

2.点击提交按钮后,将上述变量传给下边的链接;

3.使用openDocument链接打开一个WebI报表,第一步中获取的日期值作为链接中的参数之一。链接示例如下:

String URLstr = "http://bej-l-01-sunzhang:8080/businessobjects/enterprise115/desktoplaunch/opendoc/openDocument.jsp?token=" + token + "&iDocID=6159&lsSReportDateParam="+currentDate;

如果不太明白什么是openDocument,可以参考如下的帖子: