问题
I have a tablix that is using RowGroups to group instances of data. A textbox in the tablix refers to a field as it relates to everything else in that group of data. I would like to create a textbox outside the group, below the tablix, and have it reference the value of that textbox inside the group. I have attempted referencing the group textbox using =ReportItems!GroupTextbox1.Value but this returns empty. Is this in anyway possible in SSRS? Thanks in advance for any assistance anyone can provide.
回答1:
This scenario is probably not supported, ref http://msdn.microsoft.com/en-us/library/dd255285.aspx
If you provided some more info on what output you are trying to achieve (not just your code) we might be able to help.
回答2:
Hope this helps someone: You can use Custom code-feature of the report. Open the Report properties and then Code-tab. In there you can write or own code to save results and read them later on. The variables are in report-scope. Like:
Public Shared Dim MyValue as Double = 0
Public Function SaveMyValue (ByVal s As Double) as Double
MyValue+=s
Return s
End Function
Public Function GetMyValue() as Double
Return MyValue
End Function
And using these functions goes like this, eg. in Textbox expression: =Code.SaveMyValue(Fields!SomeValue.Value)
来源:https://stackoverflow.com/questions/15298612/ssrs-reference-a-textbox-value-from-a-rowgroup