17 comments

  1. Thanks for the post. I am trying to find ways to inject some JS so that I can add a menu type effect when a person clicks on a cell. The frames are throwing me off in my own tinkering.

    I downloaded your sample and tried to use it. I get the message box that indicates it is going to change the text, but then i get an object missing error on the window.frames[1][1].document. Could this vary based on how RS is deployed? I am in standalone mode.

    Thanks,
    Brian

    Brian

  2. Hi Brian,

    My RS is also in standalone mode. So that should not be the problem.

    Can you post the exact error message?

    – Bas

    bast

  3. Bas,

    Thank you for your reply. I am getting the following error:
    “window.frames.1.1.document is null or not an object”

    Thanks for your help!
    Brian

    Brian

  4. Bas,

    I should have tried this before I posted again. I changed the array to be [0][1] and it worked. Sorry for the bother and thanks again for your post. Not sure why the layout is different between my machine and yours.

    Here is the line I changed:
    var doc = window.frames[0][1].document;

    Brian

    Brian

  5. Hi Brian,

    Good to hear that you solved it! Just like you I have no direct answer to why your frame layout is different from mine. This will require extra investigation.

    If the frame layout can be different per machine it would require some measures to locate the correct frame dynamically.

    – Bas

    bast

  6. Hi, Bas !
    Unfortunately there are no any frame in rendered report.
    I added this line in script.js file
    alert(window.frames.length);
    and I received a 0 value.
    Could you suggest something ?

    Alex

  7. Hi Alex,

    Are you running Reporting Services 2008 in integrated or native mode? The example I have posted is native mode.

    If you are running in native mode and you have the 2008 version, it seems that the display is different per installation type.

    – Bas

    bast

  8. anyone can you send any code for add pop up menu to reporting service in visual studio 2008

    Chinthaka

  9. hi,nice post!! do we have to deploy before testing it…cant”t we test it on the visual studio preview option????need some help 🙂

    charix

  10. cant we try testing on the preview without deploying???

    charix

  11. Hi,

    Great post! I was lossing my hope…. I have tried that but one drawback for me was that I had to press a button to make it work (and https didn’t like it). In my case fortunatenelly I was able to use this code with asp.net page and reportviewer control and implement proper javascript tooltip! (Finally!!) I generate HTML code using SQL and put into ’tooltip’ property on report using the extra generated field; which is assigned to title attribute in HTML so I just loop throught all elements in reports viewer (area, td) and add onmouseover/out which fires javascript and value is taken from title attribute.

    The file might get big but I presume AJAX might help with it.

    Many thanks for that. Finally I have that working!!

    Regards
    Emil

    Emil

  12. Charix, sorry for my late response.

    If I am not mistaken the render engine of the preview and of the final result differs. This means that it is advisable to develop it so it renders in IE. To tell you the truth I have not even tried it in the preview mode.

    – Bas

    bast

  13. Thanks Emil!

    I am pleased to hear that my post was of help. It would be great if you could share your code with us.

    – Bas

    bast

  14. Hi Bas

    Here is the early stage script (ReportViewer2010)

       <script type=”text/javascript”>

           function Test(doc) {

               var el = doc.getElementsByTagName(‘AREA’);

               var len = el.length;

               for (j = 0; j < len; j++) {

                   var ToolTipText = “<table><tr><td>Milestone: </td><td>”+el[j].getAttribute(“TITLE”)+”</td></tr></table>”;

                   el[j]onmouseover = function () { tooltip.show(this.value,200); };

                   el[j].onmouseout = function () { tooltip.hide() };

                   el[j].setAttribute(“value”, ToolTipText);

               }

           }

       </script>

    Regards

    Emil

    Emil

  15. Thanks Emil! I hope this can help others…

    I had to change your variable i in the for loop to j. Because if you use [ i] in the comments, the blog engine replaces it with [i]. I don’t know how to get around this problem other then renaming or using spaces.

    bast

  16. how do you inject javascript into a SSRS 2005 report

    Ben

  17. It is in reality a nice and helpful piece of info. I?m satisfied that you simply shared this useful info with us. Please stay us up to date like this. Thank you for sharing.

    WoW Adult

Comments are closed.