Home
Analytics
BIRT Datepicker plzzzzzzzzzzz
berk123
Hi,
Can someone please post a sample report with datepicker for the paramerter dialog box. I couldn't follow the existing postings related to this. I've tried using a calendar.js and modified TextboxparameterFragment.jsp and added the script src to FramesetFragment.jsp but was unsuccessful in getting it to run.
I'd appreciate if someone can post a working example.
Thanks a bunch!!!
Find more posts tagged with
Comments
PlinioV
helpppppppp us plx !!
Yvonne Mwajuma
Same problem.... Please assist.....
TripleP
I've got it working in the runtime environment, but it doesn't work in the designer. It requires a few adjustments to the standard installation.
This implementation is based on version 2.3.0 and the Dutch language, but this can be modified easily in the dialog fragments.
I'll describe the steps in random order:
Put the calendar.js script in: wepapps/birt-viewer/webcontents/birt/ajax/utility directory on the deployment server.
Put the calendar.gif file in wepapps/birt-viewer/webcontents/birt/images
Put the g2style.css file in wepapps/birt-viewer/webcontents/birt/styles
Backup the file : webapps/birt-viewer/webcontent/birt/pages/layout/FramesetFragment.jsp and replace it with the attached version.
Backup the file: webapps/birt-viewer/webcontent/birt/pages/dialog/ParameterDialogFragment.jsp and replace it with the attached version.
Backup the file: webapps/birt-viewer/webcontent/birt/pages/parameter/TextboxParameterFragment.jsp and replace it with the attached version.
Choose Date as the parameter type in your report.
Success in trying it out,
Harm van het Ende
Yvonne Mwajuma
I have made progress with this. I can now see the calendar image. However, it still does not function properly. Onclicking this image, it jumps to the following url<br />
<br />
<a class='bbc_url' href='
http://localhost:8080/birt2.3.1/webcontent/birt/#'>http://localhost:8080/birt2.3.1/webcontent/birt/#</a><br
/>
<br />
Here is the error I get:<br />
<br />
HTTP Status 404 - /birt2.3.1/webcontent/birt/<br />
<br />
type Status report<br />
<br />
message /birt2.3.1/webcontent/birt/<br />
<br />
description The requested resource (/birt2.3.1/webcontent/birt/) is not available.<br />
<br />
Apache Tomcat/6.0.18<br />
<br />
The code section with the problem is line 100 of TextBoxParameterFragment.jsp. <a href="#" <br />
I need a particular label to include in the href attribute in order for the link to jump to a particular document section. Kindly assist.<br />
<br />
Thanks
TripleP
I was away for two weeks, soory for the delay.<br />
<br />
My implementation was done on 2.3.0. There may be a change in code on the last level. <br />
The part that was changed is the next block of code.<br />
<br />
It follows the line:<br />
<INPUT TYPE="HIDDEN" ID="isRequired" <br />
VALUE = "<%= parameterBean.isRequired( )? "true": "false" %>"><br />
Which is at the end of the file.<br />
<br />
begin of block ==========================================<br />
<br />
<%<br />
if (parameterBean.getParameter().getDataType()==7) { <br />
%> <br />
_img');<br />
var coors2 = findPos(objChild);<br />
var x = coors1[0] - objChild.width - 19 ;<br />
var y = coors1[1] - objChild.height - 5 ;<br />
calendario.offsetX = - x;<br />
calendario.offsetY = - y;<br />
calendario.select(document.getElementById('<%=parameterBean.getName()%>'),'<%=parameterBean.getName()%>_fromdatelnk','yyyy-MM-dd');<br />
return false;"<br />
name="<%=parameterBean.getName()%>_fromdatelnk" id="<%=parameterBean.getName()%>_fromdatelnk" ><br />
<br />
birt/images/calendar.gif<br />
<br />
<br />
<%<br />
if (parameterBean.getValue( ) == null ) {<br />
%><br />
<script language="javascript"><br />
var now = new Date();<br />
document.getElementById('<%=parameterBean.getName()%>').value = formatDate(now,"yyyy-MM-dd"); <br />
</script><br />
<% } %><br />
<% } %><br />
<br />
end of block=============================================<br />
<br />
Please try to insert only the specified block of code.
Yvonne Mwajuma
Instruction followed to the letter; no progress. Could the difference be the Birt version?
TripleP
I installed runtime 2.3.1 and compared the jsp files to the 230 ones and there is no difference.
I installed the changed files in 2.3.1 and I got the same problem you reported. That's because I forgot to copy the calendar.js file to the ajax/utility directory.
After I copied that one over also it worked fine.
I attached a working reportdesign to test it.
Kind regards,
Harman van het Ende
mhegna
Thanks a lot for your great work! I'm using the datepicker with BIRT Viewer 2.3.1 and it works fine with IE on Windows platform.
When I tried to use it also with newest version of firefox (3.0.5 Windows) I encountered a little problem when selecting a different month or year: the datepicker dialog just closes without updating the selections of month/year.
Do you have any idea how to modify the code to work with this firefox release?
Thanks in advance!
TripleP
Try commenting out line 985 of calendar.js ( //c.autohide(); )
Dot not forget to reload the page to refresh the browser cache
mhegna
It works, great!
Thanks a lot!
temphan
Hey
Thanks for sharing this softwares, I used it and it works well. the only thing is that is shows in Dutch instead of English, how to set it to show English?
Thanks!
Shawn
temphan
got it, thanks!
Yvonne Mwajuma
It finally worked! I had earlier just replaced the old jsp files with the new ones. I overlooked saving these new files again so as to flush out the old content in cache. I hope no one repeats my mistake.
tyildirim
Hi,
I followed your instructions, whne I click on date picker button and I encountered error message below:
HTTP Status 404 - /birt/webcontent/birt/
type Status report
message /birt/webcontent/birt/
description The requested resource (/birt/webcontent/birt/) is not available.
Is there any thing I have to do ?
thanks...
tyildirim.
neillr
Got this working "out the box" using the instructions above.
alanto
I am having problems with installing this, ever since I read on the Birt website that the datepicker wasnt supported for BIRT 2.3.1 I was more or less surprised to see that someone has got it working
<br />
<br />
I followed the instructions but this didnt produce anything, I replaced the block of code in "TextBoxParameterFragment.jsp" and this made the calendar GIF icon appear on the parameter form. However when I click on this it brought me to a 404 page which is similar to what the other users had:<br />
<br />
<strong class='bbc'>HTTP Status 404 - /jiraiya/webcontent/birt/</strong><br />
<br />
<strong class='bbc'>type</strong> Status report<br />
<br />
<strong class='bbc'>message</strong> /jiraiya/webcontent/birt/<br />
<br />
<strong class='bbc'>description</strong> The requested resource (/jiraiya/webcontent/birt/) is not available.<br />
<br />
The Tomcat version is Apache Tomcat/5.5.25<br />
<br />
The link of the calendar icon is: ../jiraiya/webcontent/birt#<br />
<br />
I have tried recopying the files over to the relevant directories and also to clear the cache on the server by restarting it but this still produces the same 404 error message...<br />
<br />
Any advice would be greatly appreciated
Yvonne Mwajuma
Alanto
Your problem is similar to the kind I experienced a while ago.
I'll describe the steps of the solution in random order:
open the new FramesetFragment.jsp file and save it in the same location.
open the new ParameterDialogFragment.jsp file and save it in the same location.
open the new TextboxParameterFragment.jsp file and save it in the same location.
The instructions look stupid but worth following. Am sure you will understand the logic when your code finally works. It is simple, it is until you save the new files that the new code will reflect, otherwise, the program still refers to the old content that was saved under the same file name.
This should get you rolling.
Thanks
YOM
alanto
Thanks!!!! it's working!!! Strange how you need to do that... normally when you reset and restart the servers it should clear the cache...
I guess the calendar is supposed to be laid out at the top of the parameter page... ah well... thought it would be a nice popup like in previous HTML Custom Parameter pages.
Just me hoping that someone has already gone through the trouble of editing the code to make it english hehe...
*Edited* You need to edit the ParameterDialogFragment.jsp file to change the calendar values there
Big Thanks YOM for your help!!
Yvonne Mwajuma
Alanto
Sorry I was away. You are welcome
Thanks
YOM
BIRTigo
Hello,
This really worked perfectly. But is it possible to add the Time too?
Please help
salvotop
Hi to all,
I installed all sources in my 2.3.2 birt runtime, and calendar is correctly displayed in parameters dialog box, but when I click "OK" an error appear:
**********
The viewing session is not available or has expired.
**********
(without any stacktrace)
I've turn back original jsps one by one, and the jsp causing problem is "FramesetFragment.jsp".
I compared posted version (I think based on birt 2.3.0) to the actual (2.3.2.2) and appear quite different.
I have no experiences to update java code, can someone help me ?
tnx
salvo
salvotop
Hi to all,
easier than I thought, in attach to this post , the page FramesetFragment.jsp I updated, if need.
tnx
salvo
zkhalid
Hi All,<br />
I downloaded the example and to be honest a great effort but many issues regarding the position, datepicker and other bugs as well. So then i managed to get my hands on jscalendar 1.0 and tried to integrate with BIRT but no success. I copied the code from <a class='bbc_url' href='
http://www.birt-exchange.org/forum/deploying-integrating-birt-report-engine-applications/14199-jscalendar-integration-birt-viewer-2-3-2-a.html'>http://www.birt-exchange.org/forum/deploying-integrating-birt-report-engine-applications/14199-jscalendar-integration-birt-viewer-2-3-2-a.html</a>
; but still no sucess. <br />
<br />
Then i thought what the ****, i dug deep into BIRT and jscalendar and managed to get BIRT integrated with jscalendar 1.0. For that i had to tweak the jscalendar files namely (calendar.js) to get it working. Basically jscalendar creates the dynamic div on the body and that does not work with parameter dialog of BIRT. Now the datepicker is shown write below the datefield and closing events are working fine as well.
salvotop
dear zkhalid,
your effort seems to be interesting.
can you help me to obtain same goals ?
can you post your modifications to jscalendar ?
tnx in advance
salvotop
zkhalid
Will post all the changes soon. Right now very busy so if its not urgent then can u please wait for a day or two.
salvotop
Absolutely no urgent, take your time wo pb.
many tanks
salvotop
zkhalid
Steps to work with jscalendar 1.0<br />
Download the jscalendar 1.0 from the site<br />
<a class='bbc_url' href='
http://www.dynarch.com/static/jscalendar-1.0.zip'>http://www.dynarch.com/static/jscalendar-1.0.zip</a><br
/>
<br />
after downloading it unzip and place in your app server folder whereever u like.<br />
<br />
Download this zip file, and copy the calendar.js with the given one. Step 1 complete.<br />
Secondly replace the 2 files given in the zip file in the BIRT report-viewer folder.<br />
<yourContext>report-viewerbirtpagesparameterTextBoxParameterFragment.jsp<br />
<yourContext>report-viewerbirtpageslayoutFramesetFragment.jsp <br />
<br />
All the references to jscalendar js files are in FramesetFragment.jsp line no 45 so u can refer to your location. <br />
Also in TextBoxParameterFragment.jsp line no 79 replace the image src with ur datepicker one. You can change the date format in TextBoxParameterFragment.jsp line 79. Good thing is you can specify time as well through format return showCalendar('<%= encodedParameterName %>', '%Y-%m-%d %H:%M','24',true).<br />
<br />
and vola u r ready to go. Create a parameter in dialog with type date and u will see a datepicker. Now the only thing u cannot do is drag and drop the datepicker due to restriction of BIRT parameter dialog but i am working on it.<br />
<br />
If Any problems please post it and i am happy to reply. Please enter any comments after trying it out.
dilIT
Hi all,
I used this birthpicker software, did everything that was written on
post.
I can see an icon for calendar, now when i click it, it shows me an
empty window.Can anyone help me with this.Nothing showsup atall.
Thanks in advance.
Best Regards.
zkhalid
Which version of BIRT are you using? I added the JSP pages for 2.3.2 BIRT. Can u tell me is there any javascript errors etc???. Also note you need to change the calendar.js of jscalendar with the one given by me. Usually that is the reason the popup does not show and that what i fixed in jscalendar 1.0.
cano
Does some one has made the calendar work in birt 2.5, can show the instruccions.
Thanks