Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
605 views
in Technique[技术] by (71.8m points)

javascript - Adding date picker as parameter in BIRT

I am having some challenges adding a date picker for my date parameter in an Eclipse report. I have little or no knowledge of Javascript ... I would appreciate some detailed instruction on how to accomplish this. Thanks.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

There is a way to achieve this, but it is not straight forward.

Here is how,

  1. First you need to download the jscal2 project files.You will find the required files in the below mentioned Github project.

    https://github.com/captainhcg/GFW/tree/master/js/JSCal2-1.9

  2. In your project find "FramesetFragment.jsp" file located in the location

    birt/webcontent/birt/pages/layout/FramesetFragment.jsp

    This file should be readily available in your current project setup, if you already have birt report up and running. (I am not going to explain birt report configuration in a JAVAEE web project here, because this is only about how to add the datepicker for existing birt report date parameter field.)

  3. Add the following lines of code after line number 130(before the </HEAD> tag) of "FramesetFragment.jsp" file. Replace the context root path with your project context root.

<script src="${pageContext.request.contextPath}/js/jscal2.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/lang/en.js" type="text/javascript"></script>
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/border-radius.css" meda="screen" type="text/css"/>
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/jscal2.css" meda="screen" type="text/css"/>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...