Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Reporting > Telerik Reporting > Call javascript function on action

Not answered Call javascript function on action

Feed from this thread
  • Saima Gul avatar

    Posted on Jan 1, 2011 (permalink)

    Hi
    i have downloaded latest version of telerik reports released on Report Q3 2010. thanks for new features
    I want to open a new window of specific record when user click on image. We can use action for it. I define a javascript function which accept RecordId as parameter
    function openWin(id)
    {
    window.open("mypage.aspx?employeeId="+id);
    }
    This javascript function is in my aspx file where i have placed ReportViewer Control
    on action of image i select Navigate to url if i write javascript:alert('ok') it works fine and display alert
    Now how can i call my javascript function defined in my aspx page and how pass parameter for each row

    Reply

  • Steve Steve admin's avatar

    Posted on Jan 3, 2011 (permalink)

    Hello Saima,

    Currently specifying custom actions is not allowed, but we have logged this as a feature request and would work on it for subsequent version of the product.

    Sorry for the temporary inconvenience.

    Kind regards,
    Steve
    the Telerik team
    Get started with Telerik Reporting with numerous videos and detailed documentation.

    Reply

  • Giuliano Caetano avatar

    Posted on Feb 1, 2012 (permalink)

    I Steve,
    I had this works on 2011 Q2, because the Action propertie from TextBox rendered in HTML something like this: 
    <a href='javascript:nameFunction()'> <a/>, so, the href property from this tag called any javascrip function.

    In Q3 2011, this was modified, the Action property from TextBox, render something like this:

    <div class="action" style="left:206px;top:364px;width:445px;height:15px;" onclick="javascript:NavigateToUrl('http://maps.google.com/maps?q=38.754722,-9.375611', '_blank');"></div>

    and we lose many feature on reports, already on production. So, how can we solve this problem?

    Any answer will be greatly appreciated.

    Thanks
    gcaetano

    Reply

  • Steve Steve admin's avatar

    Posted on Feb 2, 2012 (permalink)

    Hello Giuliano,

    Custom actions would no longer function with Q3 2011 release as hyperlink actions are no longer rendered as <a href>, rather they use javascript function like so:

    function NavigateToUrl(Url, target)
    {
         window.open(Url, target);
    }

    We have not removed it purposely, but the revamping of HTML rendering we did for the Q3 release required those changes. We had them in mind for quite some time and that is why we warned users that the approach used till now is only a temporary hack.
    Additionally as always we aim to be consistent among all viewers/formats and the hack for "custom actions" was only applicable for the ASP.NET viewer. Clients that used other technology did not have a way to get this done which is bad. There is no other *hack* for the time being. If we implement custom actions for future versions, this would be indicated in our Roadmap.

    Regards,
    Steve
    the Telerik team

    Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

    Reply

  • Giuliano Caetano avatar

    Posted on Feb 2, 2012 (permalink)

    Hi Steve,
    Thanks for your answer...
    It is so bad news and affects future plans... With this way I lose may features on reports. 
    Is possible override the function NavigateToUrl to minimize this impact?

    Tks
    gcaetano

    Reply

  • Steve Steve admin's avatar

    Posted on Feb 6, 2012 (permalink)

    Hello Giuliano,

    There is no other *hack* for the time being. If we implement custom actions for future versions, this would be indicated in our Roadmap.

    Kind regards,
    Steve
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>

    Reply

  • Fournier avatar

    Posted on Feb 8, 2012 (permalink)

    Hello Steve,

    We are having the same problem. We have several reports on production with this functionality and all stopped working. When will we have this problem resolved? It's an urgent issue because if it will not be resolved soon we'll have to change for another report api.

    Best regards,
    Fournier,
    Sedimap

    Reply

  • Steve Steve admin's avatar

    Posted on Feb 10, 2012 (permalink)

    Hello Fournier,

    Just for clarify, we would like to note once again that reports never officially had or supported custom actions. What you had working in your web applications with older versions was a hack that was applicable only for web projects and when exported these reports would contain invalid actions. Meaning that you have a report that contains some kind of "commands" for your application that are not valid from outside the application. We would suggest extracting these actions from the reports to the application. This way the reports will contain only the relevant information and will be really portable - that is you can export them to PDF or Excel and can open them outside your application.

    We cannot engage with a time frame for custom actions functionality and if this is important for your project, we recommend sticking to the Q2 2011 version where you have a possible solution.

    Thank you for the understanding.

    Kind regards,
    Steve
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Reporting > Telerik Reporting > Call javascript function on action
Related resources for "Call javascript function on action"

Features  |  Documentation  |  Demos  |  Telerik TV  |  Knowledge Base  |  Code Library  |  Step-by-step Tutorial  |  Blogs  |  Whitepaper  ]