Reputation: 399
I am making an SSRS report using SQL Server Report Builder. I have column and row grouping as follows :
I want to pick up the row that is highlighted in the red box below. How do I access that specific cell and display its value in some other table in the report? As you can see the value that I want to access is a column grouping total.
Upvotes: 0
Views: 3584
Reputation: 871
Use custom code:
Function SumLookup(ByVal items As Object()) As Decimal
If items Is Nothing Then
Return Nothing
End If
Dim suma As Decimal = New Decimal()
Dim ct as Integer = New Integer()
suma = 0
For Each item As Object In items
suma += Convert.ToDecimal(item)
Next
return suma
End Function
Then in the cell where you want to reference the value:
=Code.Sumlookup(lookupset("2073/074",Fields!FiscalYear.Value,Fields!Value.Value,"DataSet"))
*
lookup("2073/074",Fields!FiscalYear.Value,Fields!Alfa.Value,"DataSet"))
Upvotes: 1
Reputation: 21683
As the cell you want does not have a specific design time name, you won't be able to reference it directly. You'll have to recalculate the value in your second table. You'll have to determine the criteria but assuming it always the last fiscal year and Particular = fixed percentage... then...
You should be able to do it with something like (untested)...
=SUM(IIF(Fields!FiscalYear.Value = Last(Fields!FiscalYear.Value) AND Fields!.Particular.Value = "Fixed Percentage of Gross Income [c=(axb)]", Fields!Value.Value,0))
Upvotes: 0