SSRS - Reference a Textbox Value from a RowGroup

廉价感情. 提交于 2019-12-11 02:32:44

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!