title: How to get column value of join query in SSRS?
body: <p>I have select join query for generating report in SSRS. Query is working fine in SQL Server but as I add same query as dataset in SSRS and try to get rows count using CountRows() function it always return 0 (Zero). I'm not getting where my query is going wrong.</p>
  
  <p><strong>SQL Query</strong>  </p>
  
  <pre><code>SELECT  PR.NAME 
  FROm innovator.PROJECT PR
  INNER JOIN innovator.PROJECT_RISK LPR ON LPR.SOURCE_ID = Pr.ID
  INNER JOIN innovator.RISK_MANAGEMENT LR ON LR.id = LPR.RELATED_ID
  Inner join innovator.PROGRAM_PROJECT P ON PR.ID  = P.RELATED_ID 
  Inner Join innovator.PROGRAM PP ON P.SOURCE_ID = PP.ID
  WHERE  pp.ID = @Id  
  </code></pre>
  
  <p><strong>Fetching total count using CountRows() for Textbox</strong>  </p>
  
  <pre><code>=CountRows(Fields!NAME.Value, "DataSetRisk")  
  </code></pre>
  
  <p>DataSetRisk is Dataset name and Name is column name of Project Table  </p>