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
Reporting services SSRS页脚中的索引表_Reporting Services_Ssrs 2008 - Fatal编程技术网

Reporting services SSRS页脚中的索引表

Reporting services SSRS页脚中的索引表,reporting-services,ssrs-2008,Reporting Services,Ssrs 2008,我正在构建一个SSRS报告,我想要一个索引表,在报告的页脚显示每个组的页面索引,因为我的报告中有很多页面,但是SSRS 2008不允许访问正文部分中的页码以将其传递到页脚。您可以通过代码获取该页码。首先添加一个包含要索引的组标题的文本框,然后转到“报告-->报告属性-->代码”并添加此代码: Dim groupNo为整数=1 Dim sw作为System.IO.StreamWriter 将最大值调整为整数=0 将文本变暗为字符串=“” 公共函数GetGroupPageNumber(ByVal g

我正在构建一个SSRS报告,我想要一个索引表,在报告的页脚显示每个组的页面索引,因为我的报告中有很多页面,但是SSRS 2008不允许访问正文部分中的页码以将其传递到页脚。

您可以通过代码获取该页码。首先添加一个包含要索引的组标题的文本框,然后转到“报告-->报告属性-->代码”并添加此代码:

Dim groupNo为整数=1 Dim sw作为System.IO.StreamWriter 将最大值调整为整数=0 将文本变暗为字符串=“”

公共函数GetGroupPageNumber(ByVal groupName作为字符串,ByVal pagenumber作为整数)作为对象
如果不是String.IsNullOrEmpty(groupName),则
text+=组名
max=groupName.Length
而(最大值<50)
文本+=“”
最大+=1
结束时
将索引设置为整数
对于索引=0到20
文本+=“”
下一个索引
text+=pagenumber.ToString()&vbCrLf
如果结束
返回文本
端函数
在页脚部分添加文本框,该文本框将显示索引表并执行代码,并向其传递报告标题和页码: Code.GetGroupPageNumber(ReportItems!ReportTitle.Value,Globals!PageNumber)

Public Function GetGroupPageNumber(ByVal groupName As String, ByVal pagenumber As Integer) As Object

    If Not String.IsNullOrEmpty(groupName) Then

        text += groupName
        max = groupName.Length

        While (max < 50)
            text += " "
            max += 1
        End While

        Dim index As Integer
        For index = 0 To 20
            text += " "
        Next index

        text += pagenumber.ToString() & vbCrLf

    End If

    Return text

End Function