0
votes

I have a Visual Studio 2010 web application where I have implemented reporting using VS report viewer RDLC. I have to open a new report when user clicks on a value on a column. I have implemented RDLC drillthrough report for that. Clicking on the cell --> Text box Properties --> Action--> Go to Report. On Specify a report, I have used an expression as below:

      = Switch( Fields!Field1.Value="F1" , "Report1", 
              Fields!Field2.Value="F1" , "Report2",
  )

But, my challenge is only two rows on that column should be clickable and other should not. Clicking on one value needs to open Report 1 and clicking on other value should open Report 2. On other rows I have to disable the hyperlink which I am not sure how to do.

1

1 Answers

0
votes

Use jQuery to find the cell you want to disable the hyperlink

function pageLoad(){

        $(document).ready( function () {
            $( "a").click(function (event) {
                var href = $(this ).attr('href');

                if (href.indexOf("ReportOverview.aspx?" ) >= 0) {
                    $( this).attr('href' , 'javascript:void(0)');
                    $( this).removeAttr('target' );
                    event.preventDefault();
                }
            });
        });
    }