Visual Studio 2005 表渲染顺序
我正在使用 Visual Studio 2005 报告,并且正在尝试实现嵌套聚合函数的解决方法(我需要执行总和计数)。在表详细信息行中,我调用自定义代码以在每次一个单元格的值 > 10 时增加一个整数,然后页脚调用仅返回该值的自定义代码函数。
计数始终返回 0,因此我插入了一些 MsgBox 调用,并注意到表页脚在详细信息行之前被调用。我需要首先调用表详细信息行,以便页脚中的“get”函数实际上检索我需要的值。
更具体地说,我希望计算给定表格单元格的值大于 10 的次数,其值计算为 (Sum / (Sum+Sum+Sum)) * 100
由于聚合函数不能嵌套,并且在 ReportItems 上使用聚合!...只能在报表页眉/页脚中完成(在我的情况下没有帮助,因为它将在每个页面上显示不同的总计),我'我还有这个选择自定义代码。
有没有办法强制表格的详细信息行在表页脚之前呈现?
I'm working in Visual Studio 2005 Reporting and I'm trying to implement a workaround of nesting aggregate functions (I need to perform a Count of Sums). In the table details row, I have a call to custom code to increment an integer every time the value of one cell is >10, then the footer has a call to a custom code function that just returns that value.
The count was always returned as 0, so I threw in some MsgBox calls and noticed the table footer is being called before the details rows. I need the table details rows to be called first so that the "get" function in the footer will actually retrieve the value I need.
To be more specific, I'm looking to count the number of times a given table cell, whose value is calculated as (Sum / (Sum+Sum+Sum)) * 100
, is greater than 10. Since aggregate functions can't be nested, and the use of aggregates on ReportItems!... can only be done in report headers/footers (in my case not helpful as it will display a different total on each page), I'm left with the option of custom code.
Is there any way to force the details row of a table to be rendered before the table footer?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我没有使用表页脚,而是在表下方使用了文本框,因此首先呈现表、标题行和详细信息行,然后报表处理下面的文本框,从而得出正确的值。
希望对遇到此问题的任何人有所帮助。
Instead of using the table footer, I used a textbox beneath the table, so the table was rendered first, header and details rows, then the report processed the textbox below, leading to the correct value.
Hope that helps anyone that comes across this issue.