0

我有一个 Visual Studio 2010 Web 应用程序,我在其中使用 VS 报告查看器 RDLC 实现了报告。当用户单击列上的值时,我必须打开一个新报告。我已经为此实施了 RDLC 钻取报告。单击cell --> Text box Properties --> Action--> Go to Report。在指定报告时,我使用了如下表达式:

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

但是,我的挑战是该列上只有两行应该是可点击的,而其他行不应该是可点击的。单击一个值需要打开报告 1,单击其他值应该打开报告 2。在其他行上,我必须禁用我不知道该怎么做的超链接。

4

1 回答 1

0

使用 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();
                }
            });
        });
    }
于 2013-11-29T13:32:11.360 回答