Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/reporting-services/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vb.net 使用自定义代码SSRS从特定行获取值_Vb.net_Reporting Services_Ssrs 2008_Ssrs Tablix_Ssrs Grouping - Fatal编程技术网

Vb.net 使用自定义代码SSRS从特定行获取值

Vb.net 使用自定义代码SSRS从特定行获取值,vb.net,reporting-services,ssrs-2008,ssrs-tablix,ssrs-grouping,Vb.net,Reporting Services,Ssrs 2008,Ssrs Tablix,Ssrs Grouping,我有一个报告,参数是我可以选择多个值的年份:例如,我选择了200520062007 当我在视图报告中单击时,我得到了这个结果 我添加了一些自定义代码以在arraylist中添加值 Dim values As System.Collections.ArrayList Function AddValue(ByVal newValue As Integer) If (values Is Nothing) Then values = New System.Collections

我有一个报告,参数是我可以选择多个值的年份:例如,我选择了200520062007

当我在视图报告中单击时,我得到了这个结果

我添加了一些自定义代码以在arraylist中添加值

Dim values As System.Collections.ArrayList
Function AddValue(ByVal newValue As Integer)
    If (values Is Nothing) Then
        values = New System.Collections.ArrayList()
    End If
    values.Add(newValue)
End Function
Public Function GetArray(Item as Integer)
     return values(Item)
End Function
我在我的矩阵中添加了我的代码这是结果

第一行我答对了,但其他几行都是错误答案,这是我需要的结果

如果没有关于您的表达式的RDL详细信息,则很难回答您的问题。你预期的结果是什么?您期望的确切输入和输出是什么?请提供样品

在这种情况下,问题似乎出在您的自定义代码中。返回第一行末尾的结果后。variablecalled结果保留66,并且从未被覆盖,因此始终显示66。在Reporting Services中,它从左到右、从上到下生成单元格。因此,您需要在函数中传递第一列HP、DELL、Acer作为参数,并使用名为Previous的变量来接收此值。如果传递的参数不等于上一个参数,则始终在函数开头进行判断。您需要清除结果变量