locked
How can I avoid Post Back on Reports? RRS feed

  • Question

  • User524898530 posted

    I have a question. How can I ensure that when am selecting parameters values to submit to generate report the application does not go back to the server. In other words there is no post back?   I am Business Intelligence Development Studio 2008 to develop reports on  SQL Server Reporting Services (SSRS) 2008.

    Please help.

    Monday, September 5, 2011 3:10 PM

Answers

  • User-1438587911 posted

    So, i just used jQuery to remove the 'onchange' attribute from the parameter:

    function pageLoad() {
       $('#ctl00_cphBody_rv1_ctl04_ctl07_ddValue').removeAttr("onchange");
    };

    And that worked perfect. Now, if you have one page to run all your reports, as I do, then you want the jQuery to be dynamic and not look for one particular control:

    $('#ParametersGridctl00_cphBody_rv1_ctl04 select').removeAttr("onchange");
    $('#ParametersGridctl00_cphBody_rv1_ctl04 input').removeAttr("onclick");

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 6, 2011 4:45 PM

All replies

  • User-830595639 posted

    Hi Mobzam,

    If you are using cascading parameter then only Report will postback (because it has to refresh the other parameter) and there is no way that you can stop this. Explain your scenario in detail, so that may be we can help you.

    Tuesday, September 6, 2011 1:50 AM
  • User600473285 posted

    hi

    Can u show me u'r code... So may be i help you!!!!!!

    Tuesday, September 6, 2011 1:57 AM
  • User-1438587911 posted

    I know exactly what you are talking about. I've been trying to see if I can stop the postbacks myself. I'm looking at using jQuery to stop the postbacks. I believe if you have any parameter that comes from a query (even if the parameter isn't a cascading parm) then all the parameters on the report, except the last one, has the following doPostBack function on the 'onChange' event of the parameter:

    javascript:setTimeout('__doPostBack(\'ctl00$cphBody$rv1$ctl04$ctl07$ddValue\',\'\')', 0)

    If I am able to prevent the postback I'll let you know.

    Tuesday, September 6, 2011 3:46 PM
  • User-1438587911 posted

    So, i just used jQuery to remove the 'onchange' attribute from the parameter:

    function pageLoad() {
       $('#ctl00_cphBody_rv1_ctl04_ctl07_ddValue').removeAttr("onchange");
    };

    And that worked perfect. Now, if you have one page to run all your reports, as I do, then you want the jQuery to be dynamic and not look for one particular control:

    $('#ParametersGridctl00_cphBody_rv1_ctl04 select').removeAttr("onchange");
    $('#ParametersGridctl00_cphBody_rv1_ctl04 input').removeAttr("onclick");

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 6, 2011 4:45 PM