【问题标题】:RDLC - Drillthrough report how to disable hyperlinkRDLC - 钻取报告如何禁用超链接
【发布时间】:2013-11-19 13:21:33
【问题描述】:

我有一个 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。在其他行上,我必须禁用我不知道该怎么做的超链接。

【问题讨论】:

    标签: visual-studio-2010 reportviewer rdlc


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-04-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多