RDLC - 鑽取報告如何禁用超鏈接

[英]RDLC - Drillthrough report how to disable hyperlink


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:

我有一個Visual Studio 2010 Web應用程序,我使用VS報表查看器RDLC實現了報表。當用戶點擊列上的值時,我必須打開一個新報告。我已經為此實施了RDLC鑽取報告。單擊單元格 - >文本框屬性 - >操作 - >轉到報告。在指定報告時,我使用了如下表達式:

      = 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並單擊其他值應該打開報告2.在其他行上我必須禁用超鏈接,我不知道該怎么做。

1 个解决方案

#1


0  

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

使用jQuery查找要禁用超鏈接的單元格

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();
                }
            });
        });
    }

注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:https://www.itdaan.com/blog/2013/11/07/720d810365b2fa8158b234e7943490f.html



 
粤ICP备14056181号  © 2014-2021 ITdaan.com