European Windows 2019 Hosting BLOG

BLOG about Windows 2019 Hosting and SQL 2019 Hosting - Dedicated to European Windows Hosting Customer

European SSRS Hosting - Amsterdam :: Fixing - Your browser does not support scripts or has been configured not to allow scripts.

clock February 15, 2013 07:51 by author Scott

Sometimes our clients complained about this issue when they run a report in the Report Manager:

Your browser does not support scripts or has been configured not to allow scripts.

So, in today post and hope this help for all of you who facing this problem too. What is the solution??

- go to (from its menu) Tools/Internet Options
- go to Security tab
- select Trusted zone from the list of available zones
- click Sites button
- in new window provide the URL of the Reports Manager (e.g. http://MACHINE_NAME/*); if you are running Reports Manager not on the default port, provide the port number as well

Then, it works like a charm. :)

 



European SSRS Hosting - Amsterdam :: Add a Clear button to SQL Server Reporting Services (SSRS)

clock September 10, 2012 07:35 by author Scott

If you ever had the need to add a clear / reset button to your standard SQL Server Reporting Services report viewer, here’s a way to do it. Normally when reports are displayed, they are piped through the ReportViewer.aspx page that comes with SSRS. This page hosts the Reporting Server host component, and adds text boxes, radio buttton etc. based on the number of parameters you have in your report.

Something like this:




You can’t simply replace this file with your own custom page, because SSRS has HTTP handlers installed that prevents any other file to be rendered except the ReportViewer.aspx page.


So how to add a clear button to clear the text boxes? One way to do it is to modify the OOB ReportViewer.aspx page by injecting some javascript that does this for us. Initially I wanted to use jQuery, but again, the HTTP handler prohibits us from accessing the external .js file. Back to plain old Javascript it is.


Essentially, we just need to find the container that holds the View Report button, and add our custom button.


In the body tag, add a page onload event handler:


<body style="margin: 0px; overflow: auto" onload="addClearButton();">


and then add some javascript code:

<script type="text/javascript">

document.getElementsByClassName = function(cl) {

    var retnode = [];
    var myclass = new RegExp('\\b'+cl+'\\b');
    var elem = this.getElementsByTagName('*');
    for (var i = 0; i < elem.length; i++) {
        var classes = elem[i].className;
        if (myclass.test(classes)) retnode.push(elem[i]);
    }
    return retnode;
};


function addClearButton(){

    var inputs = document.getElementsByClassName('SubmitButtonCell');

    // can't find the cell, return
    if (inputs.length<1)
        return;   

    // create a button
    var clearButton = document.createElement("input");
    clearButton.type = "button";
    clearButton.value = "Clear";
    clearButton.name = "btnClear";
    clearButton.style.width = "100%";

    // add clear text boxes functionality to the onclick event
    clearButton.onclick = function (){
        var textBoxes = document.getElementsByTagName("input");
        for (var i=0;i<textBoxes.length;i++){
        if (textBoxes[i].getAttribute("type")=="text"){
          textBoxes[i].value ="";
          }
        }
    };

    // find the relevant cells
    var tdSubmitButtonCell = inputs[0];

    // find the child table
    var table = tdSubmitButtonCell.childNodes[0];
    var lastRow = table.rows.length;
    var row = table.insertRow(lastRow);
    var cellLeft = row.insertCell(0);

    // add the clear button
    cellLeft.appendChild(clearButton);
  } 

</script>

The final result will look something like this:


 



About HostForLIFE

HostForLIFE is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes.

We have offered the latest Windows 2019 Hosting, ASP.NET 5 Hosting, ASP.NET MVC 6 Hosting and SQL 2019 Hosting.


Month List

Tag cloud

Sign in