Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » birt report java script problem in chrome and firefox
birt report java script problem in chrome and firefox [message #802813] Mon, 20 February 2012 13:44 Go to next message
rahul rahuldeshpande89@gmail.com is currently offline rahul rahuldeshpande89@gmail.com
Messages: 16
Registered: February 2012
Junior Member
I have downloaded an example of collapse/expand table rows using java script in birt from devshare . It is attached to this post . But this example is not working in mozilla firefox and chrome its showing error

'document.getElementById(btnstr) is null' in mozilla firefox.
'uncaught TypeError: Cannot set property 'value' of null' in chrome

although it works fine in IE and in eclipse IDE birt viewer.

I want to use this functionality in my report also

Please help

Thanks
Rahul Deshpande
Re: birt report java script problem in chrome and firefox [message #803684 is a reply to message #802813] Tue, 21 February 2012 16:57 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Can you try the attached?

Jason

On 2/20/2012 8:44 AM, rahul rahuldeshpande89@gmail.com wrote:
> I have downloaded an example of collapse/expand table rows using java script in birt from devshare . It is attached to this post . But this example is not working in mozilla firefox and chrome its showing error
>
> 'document.getElementById(btnstr) is null' in mozilla firefox.
> 'uncaught TypeError: Cannot set property 'value' of null' in chrome
>
> although it works fine in IE and in eclipse IDE birt viewer.
>
> I want to use this functionality in my report also
>
> Please help
>
> Thanks
> Rahul Deshpande
Re: birt report java script problem in chrome and firefox [message #803688 is a reply to message #802813] Tue, 21 February 2012 16:57 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Can you try the attached?

Jason

On 2/20/2012 8:44 AM, rahul rahuldeshpande89@gmail.com wrote:
> I have downloaded an example of collapse/expand table rows using java script in birt from devshare . It is attached to this post . But this example is not working in mozilla firefox and chrome its showing error
>
> 'document.getElementById(btnstr) is null' in mozilla firefox.
> 'uncaught TypeError: Cannot set property 'value' of null' in chrome
>
> although it works fine in IE and in eclipse IDE birt viewer.
>
> I want to use this functionality in my report also
>
> Please help
>
> Thanks
> Rahul Deshpande
Re: birt report java script problem in chrome and firefox [message #803692 is a reply to message #802813] Tue, 21 February 2012 16:57 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Can you try the attached?

Jason

On 2/20/2012 8:44 AM, rahul rahuldeshpande89@gmail.com wrote:
> I have downloaded an example of collapse/expand table rows using java script in birt from devshare . It is attached to this post . But this example is not working in mozilla firefox and chrome its showing error
>
> 'document.getElementById(btnstr) is null' in mozilla firefox.
> 'uncaught TypeError: Cannot set property 'value' of null' in chrome
>
> although it works fine in IE and in eclipse IDE birt viewer.
>
> I want to use this functionality in my report also
>
> Please help
>
> Thanks
> Rahul Deshpande
Re: birt report java script problem in chrome and firefox [message #804301 is a reply to message #803684] Wed, 22 February 2012 12:54 Go to previous messageGo to next message
rahul rahuldeshpande89@gmail.com is currently offline rahul rahuldeshpande89@gmail.com
Messages: 16
Registered: February 2012
Junior Member
thanks Jason,

can you please exaplain me why it was not working in chrome or fiorefox?
only first group is appears closed/hidden in chrome/firefox .


Rahul D.
Re: birt report java script problem in chrome and firefox [message #804302 is a reply to message #804301] Wed, 22 February 2012 12:58 Go to previous messageGo to next message
rahul rahuldeshpande89@gmail.com is currently offline rahul rahuldeshpande89@gmail.com
Messages: 16
Registered: February 2012
Junior Member
also please explain where did you made changes?

Rahul D.
Re: birt report java script problem in chrome and firefox [message #804402 is a reply to message #804302] Wed, 22 February 2012 15:28 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

I believe the issue was that rows where named but did not have an id:


<INPUT Type="BUTTON"
id=<VALUE-OF>"mybutton"+row["ORDERNUMBER"]</VALUE-OF>
name=<VALUE-OF>"mybutton"+row["ORDERNUMBER"]</VALUE-OF> Value="-"
onClick='hidetable( this.form, <VALUE-OF>row["ORDERNUMBER"]</VALUE-OF>,
<VALUE-OF>row["Aggregation"]</VALUE-OF> )'></INPUT>
<VALUE-OF>row["ORDERNUMBER"]</VALUE-OF>

I added the id= field to the above HTML.

Jason

On 2/22/2012 7:58 AM, rahul rahuldeshpande89@gmail.com wrote:
> also please explain where did you made changes?
>
> Rahul D.
Re: birt report java script problem in chrome and firefox [message #814386 is a reply to message #804402] Tue, 06 March 2012 11:39 Go to previous messageGo to next message
rahul rahuldeshpande89@gmail.com is currently offline rahul rahuldeshpande89@gmail.com
Messages: 16
Registered: February 2012
Junior Member
Hi Jason ,


Sorry for let reply here by i am attaching report that is developed by me
please go through it . Its working fine on IE 8 but not on firefox and Chrome


Thanks
Rahul
Re: birt report java script problem in chrome and firefox [message #814709 is a reply to message #814386] Tue, 06 March 2012 19:51 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

I can not run the report. Can you view it in html( not the WebViwer)
just the html (View the Report as HTML from the menu) save and post the
html?

Jason

On 3/6/2012 6:39 AM, rahul rahuldeshpande89@gmail.com wrote:
> Hi Jason ,
>
>
> Sorry for let reply here by i am attaching report that is developed by me
> please go through it . Its working fine on IE 8 but not on firefox and Chrome
>
>
> Thanks
> Rahul
Re: birt report java script problem in chrome and firefox [message #815023 is a reply to message #814709] Wed, 07 March 2012 06:08 Go to previous messageGo to next message
rahul rahuldeshpande89@gmail.com is currently offline rahul rahuldeshpande89@gmail.com
Messages: 16
Registered: February 2012
Junior Member
as per your suggestion i am posting html.
when we load the page all rows should be hidden.
i am attaching two files .
1.test.html contains only html

2. Call_Report_activity.rptdesign

please use following link to run the report
replace localhost and port number as per your environment.
userid & Uid are parameters i am passing to report. i am using apache tomcat to run the report .

localhost:8888/birt/run?__report=Call_Report_activity.rptdesign&UserId=NmMwY2I5NTUtY2QxZC1kYzg0LTA1MTMtNGU1YjRlZDQ0ZTcw&__overwrite=true&Uid=6c0cb955-
cd1d-dc84-0513-4e5b4ed44e70


If your runing report in IDE then you will be promted for UserId please enter value for it as 'NmMwY2I5NTUtY2QxZC1kYzg0LTA1MTMtNGU1YjRlZDQ0ZTcw'.

Rahul
Re: birt report java script problem in chrome and firefox [message #815526 is a reply to message #815023] Wed, 07 March 2012 19:25 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Ok I believe your issue is that your are using the run mapping instead
of frameset. You are using the script tag to hide a table before it is
actually making it to the browser:

<INPUT Type="BUTTON" name=<VALUE-OF>"mybutton"+row["parent"]</VALUE-OF>
id= <VALUE-OF>"mybutton"+row["parent"]</VALUE-OF> Value="-"
onClick="hidetable(this.form,
'<VALUE-OF>row["parent"]</VALUE-OF>','<VALUE-OF>row["Aggregation_2"]</VALUE-OF>');"></INPUT>
<VALUE-OF>row["Parentname"]</VALUE-OF> :
<VALUE-OF>row["parent_role"]</VALUE-OF>
<script>
hidetable( this.form, '<VALUE-OF>row["parent"]</VALUE-OF>',
'<VALUE-OF>row["Aggregation_2"]</VALUE-OF>' );

</script>


Remove this:

<script>
hidetable( this.form, '<VALUE-OF>row["parent"]</VALUE-OF>',
'<VALUE-OF>row["Aggregation_2"]</VALUE-OF>' );

</script>

and put the following script on the table detail rows onrender

this.getStyle().display = "none";

Put that same script on the onrender for the group header row containing
the "parent" column. Also I changed your input tag to look like:

<form >

<INPUT Type="BUTTON" name=<VALUE-OF>"mybutton"+row["parent"]</VALUE-OF>
id= <VALUE-OF>"mybutton"+row["parent"]</VALUE-OF> Value="-"
onClick='hidetable(this.form,
<VALUE-OF>row["parent"]</VALUE-OF>,<VALUE-OF>row["Aggregation_2"]</VALUE-OF>);'></INPUT>
<VALUE-OF>row["Parentname"]</VALUE-OF> :
<VALUE-OF>row["parent_role"]</VALUE-OF>


</form>


I tried to run your report and it timed out on the connection, but I was
able to reproduce the issue with my sample and then fix it. Attached
are your design that I modified and the my modified sample report.

Jason


On 3/7/2012 1:08 AM, rahul rahuldeshpande89@gmail.com wrote:
> as per your suggestion i am posting html.
> when we load the page all rows should be hidden.
> i am attaching two files .
> 1.test.html contains only html
>
> 2. Call_Report_activity.rptdesign
>
> please use following link to run the report
> replace localhost and port number as per your environment.
> userid& Uid are parameters i am passing to report. i am using apache tomcat to run the report .
>
> localhost:8888/birt/run?__report=Call_Report_activity.rptdesign&UserId=NmMwY2I5NTUtY2QxZC1kYzg0LTA1MTMtNGU1YjRlZDQ0ZTcw&__overwrite=true&Uid=6c0cb955-
> cd1d-dc84-0513-4e5b4ed44e70
>
> If your runing report in IDE then you will be promted for UserId please enter value for it as 'NmMwY2I5NTUtY2QxZC1kYzg0LTA1MTMtNGU1YjRlZDQ0ZTcw'.
>
> Rahul
  • Attachment: Examples.zip
    (Size: 23.93KB, Downloaded 79 times)
icon14.gif  Re: birt report java script problem in chrome and firefox [message #815979 is a reply to message #815526] Thu, 08 March 2012 09:24 Go to previous messageGo to next message
rahul rahuldeshpande89@gmail.com is currently offline rahul rahuldeshpande89@gmail.com
Messages: 16
Registered: February 2012
Junior Member
Jason ,

Thanks a lot for your support. Both of your example working fine . all my java script issues are now resolved .
But in my report i am facing row formatting problem . when we click on button to unhide/show the detail rows ,all data is get placed in first column only .
Please see attached image. How ever your collapset.rptdesign report is working fine without any formatting issue.Have you used any special formatting for detail rows?

Thanks
Rahul
Re: birt report java script problem in chrome and firefox [message #816509 is a reply to message #815979] Thu, 08 March 2012 23:37 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Try setting your display to '' instead of 'block'

Jason



On 3/8/2012 4:24 AM, rahul rahuldeshpande89@gmail.com wrote:
> Jason ,
>
> Thanks a lot for your support. Both of your example working fine . all my java script issues are now resolved .
> But in my report i am facing row formatting problem . when we click on button to unhide/show the detail rows ,all data is get placed in first column only .
> Please see attached image. How ever your collapset.rptdesign report is working fine without any formatting issue.Have you used any special formatting for detail rows?
>
> Thanks
> Rahul
>
icon14.gif  Re: birt report java script problem in chrome and firefox [message #816824 is a reply to message #816509] Fri, 09 March 2012 09:56 Go to previous messageGo to next message
rahul rahuldeshpande89@gmail.com is currently offline rahul rahuldeshpande89@gmail.com
Messages: 16
Registered: February 2012
Junior Member
Thanks Buddy , Its working fine now

Rahul Smile
Re: birt report java script problem in chrome and firefox [message #818839 is a reply to message #816824] Mon, 12 March 2012 07:15 Go to previous messageGo to next message
rahul rahuldeshpande89@gmail.com is currently offline rahul rahuldeshpande89@gmail.com
Messages: 16
Registered: February 2012
Junior Member
When i am trying to export the report in pdf no details are coming in report
(please see attached pdf).
rahul
Re: birt report java script problem in chrome and firefox [message #819186 is a reply to message #818839] Mon, 12 March 2012 15:47 Go to previous message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Change the onRender scripts to:

if( reportContext.getOutputFormat() == "html" ){
this.getStyle().display = "none";
}

Jason

On 3/12/2012 3:15 AM, rahul rahuldeshpande89@gmail.com wrote:
> When i am trying to export the report in pdf no details are coming in report
> (please see attached pdf).
> rahul
Previous Topic:Birt fails on report with strings
Next Topic:Installation Error
Goto Forum:
  


Current Time: Sun Oct 26 03:02:56 GMT 2014

Powered by FUDForum. Page generated in 0.08799 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software