Reporting services 在部署或导出报表时更改图例
我有一个100%的堆积条形图。学生是根据出勤率进行分组的,报告只是简单地跟踪了乐队人数占学生总数百分比的变化。在报表生成器中,这完全可以正常工作(当然,它突出了我们的垃圾出勤率…) 问题出现在:Reporting services 在部署或导出报表时更改图例,reporting-services,ssrs-2008-r2,reportbuilder3.0,Reporting Services,Ssrs 2008 R2,Reportbuilder3.0,我有一个100%的堆积条形图。学生是根据出勤率进行分组的,报告只是简单地跟踪了乐队人数占学生总数百分比的变化。在报表生成器中,这完全可以正常工作(当然,它突出了我们的垃圾出勤率…) 问题出现在: 报表将从报表生成器导出到PDF/Word/Excel/任意格式 报告将部署到SSRS服务器并通过浏览器运行 您可以切换到报告的后续页面,然后切换回带有图形的页面 在所有情况下,尽管实际图表保持不变,但图例有点失去了它的意识,并将前三项显示为100%: 我想不出会发生这种情况的任何原因……由于底层数据
我想我们需要更多的细节来找出问题所在。如果您可以在自定义代码中包含一个小样本数据,这会有所帮助。感谢您的回复。我将添加一个我正在使用的数据和自定义代码的示例。请包含系列组属性好吗?此外,还有其他显示图表设置的图像吗?@DanScally接下来,将该表达式添加到表中,以便可以看到所有结果。在预览和服务器上比较,看看计算结果是否真的不同。这样我们就可以确定问题出在图表还是代码上。嗨,史蒂文。我已经试过了,是的,我把它全部转储到excel中,并手动计算了波段,代码正确地计算了波段,我想我们需要更多的细节来找出这里的错误。如果您可以在自定义代码中包含一个小样本数据,这会有所帮助。感谢您的回复。我将添加一个我正在使用的数据和自定义代码的示例。请包含系列组属性好吗?此外,还有其他显示图表设置的图像吗?@DanScally接下来,将该表达式添加到表中,以便可以看到所有结果。在预览和服务器上比较,看看计算结果是否真的不同。这样我们就可以确定问题出在图表还是代码上。嗨,史蒂文。我已经尝试过了,是的,我把它全部转储到excel中,并手动计算了波段,代码正确地计算了波段
Private attendance_table As New System.Collections.Hashtable()
Private last_added_table As New System.Collections.Hashtable()
Public Function band_calc(ByVal attendance As Double) As String
REM Define the bands that I want to track
If attendance = 1 Then
Return "A"
ElseIf attendance >= 0.975 Then
Return "B"
ElseIf attendance >= 0.95 Then
Return "C"
ElseIf attendance >= 0.925 Then
Return "D"
ElseIf attendance >= 0.90 Then
Return "E"
ElseIf attendance >= 0.85 Then
Return "F"
ElseIf attendance >= 0.8 Then
Return "G"
Else
Return "X"
End If
End Function
Public Function get_attendance_band(ByVal week_start_date as String, ByVal learnerID As Integer, ByVal possibles As Integer, ByVal presents As Integer) As String
If attendance_table Is Nothing Then
Dim attendance_table As New System.Collections.Hashtable()
End If
If last_added_table Is Nothing Then
Dim last_added_table As New System.Collections.Hashtable()
End If
REM check if attendance_table has the Learner already
If attendance_table.ContainsKey(learnerID) Then
REM check if we've already added this week's data in
If attendance_table(learnerID).ContainsKey(week_start_date) Then
REM just return the band_calc for those data
Return band_calc(attendance_table(learnerID)(week_start_date)(1) / attendance_table(learnerID)(week_start_date)(0))
Else
REM Add in this week to the hashtable. Add this weeks data to the last weeks data
attendance_table(learnerID).Add(week_start_date, New Object() { possibles + attendance_table(learnerID)(last_added_table(learnerID))(0), presents + attendance_table(learnerID)(last_added_table(learnerID))(1)})
REM record that this is now the last date updated for this learner
last_added_table(learnerID) = week_start_date
REM show the band!
Return band_calc(attendance_table(learnerID)(week_start_date)(1) / attendance_table(learnerID)(week_start_date)(0))
End If
Else
attendance_table.Add(learnerID, New System.Collections.Hashtable())
attendance_table(learnerID).Add(week_start_date, New Object() {possibles, presents})
last_added_table.Add(learnerID, week_start_date)
Return band_calc(attendance_table(learnerID)(week_start_date)(1) / attendance_table(learnerID)(week_start_date)(0))
End If
End Function