You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

报表ID列超链接控制及主报表向IdDataReport传参问题咨询

Let's work through your two SSRS problems step by step—these are typical pitfalls when setting up conditional report actions!

The issue here is twofold: your current expression has a logic flaw, and you're not tying visual link styling to the conditional action. Here's how to fix it:

  1. Correct the "Go to report" expression
    Your current check for IsNothing(Fields!isActive.value)=True isn't ideal for a boolean field (since isactive is a bit/boolean type, it should be either true/false unless your schema allows nulls). Update the expression in Actions → Go to report → fx to:

    =IIF(Fields!isActive.Value = True, "IdDataReport", Nothing)
    

    If isactive can be null in your data, adjust it to handle that edge case:

    =IIF(NOT IsNothing(Fields!isActive.Value) AND Fields!isActive.Value = True, "IdDataReport", Nothing)
    
  2. Match visual styling to the condition
    Even with the corrected action expression, SSRS might still show the link cursor if the text box has default link styling. Fix this by setting conditional formatting on the ID text box:

    • Go to Font → Color → fx, use:
      =IIF(Fields!isActive.Value = True, "Blue", "Black")
      
    • Go to Font → Text Decoration → fx, use:
      =IIF(Fields!isActive.Value = True, "Underline", "None")
      

    Now only active IDs will look like links and show the hand cursor.

Problem 2: Clicking the ID doesn't jump to IdDataReport with the correct data

You're missing a critical step: passing the selected ID as a parameter to IdDataReport. Here's how to set that up:

  1. Verify IdDataReport has a parameter
    Make sure IdDataReport has a parameter (e.g., named @SelectedId, data type matching your Id column) that filters its dataset. The dataset query should look something like:

    SELECT Id, fName, lName, isActive 
    FROM Table1 
    WHERE Id = @SelectedId
    
  2. Add parameter mapping in Mainreport
    Back in Mainreport's ID text box Actions → Go to report:

    • Below the report name expression, click Add Parameter
    • In the "Parameter name" dropdown, select the parameter from IdDataReport (e.g., @SelectedId)
    • In "Parameter value", enter the expression =Fields!Id.Value to pass the current row's ID
  3. Double-check report name spelling
    Ensure the report name in your expression exactly matches the name of IdDataReport in your project (SSRS is case-sensitive in some environments, so watch for typos!).

After making these changes, preview Mainreport—only active IDs will have clickable links, and clicking them will open IdDataReport filtered to the selected ID.

内容的提问来源于stack exchange,提问作者Dinesh

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.14 08:48:35