Cognos-如何通过聚合为日历创建最终报告
我想创建一个最终报告,其中显示带有指定数据聚合的日历(月份)。
我正在开发cognos 8.4,我有一个要求,我必须以日历形式显示当月的统计数据。该报告应该是动态的,并且应该显示特定月份的详细信息。
非常感谢任何帮助或建议。
I would like to create an end report, which shows a calendar(month) with aggregation for the specified data.
I am working on cognos 8.4, I have a requirement where I have to show the statistics of the month in a calendar form. The report should be dynamic and it should display the details of the particular month.
Any help or advice is highly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否尝试过创建交叉表?我会创建一个数据的 SQL 视图来获取如下内容:
select amount, DayNumber, DayofWeek, MonthName, MonthNumber, YearNumber, Weeknumber
来自 your_view
在 Report Studio 中过滤 YearNumber 和 MonthName(按 Monthnumber 排序)。然后创建一个交叉表,其中列为 DayofWeek,行为 Weeknumber。在交叉表内拖动金额字段。
请记住,Cognos 默认情况下会自动汇总所有内容,除非您覆盖该行为。
我想不明白的一件事是如何在交叉表中显示 DayOfMonth。这个问题很棘手,因为数据是字符串,并且在任何计算(MAX、SUM、AVG 等)中都不可分组。如果您能找到解决方案,请告诉我。干杯。
Have you tried creating a crosstab? I would create an SQL view of your data to get something like this:
select amount, DayNumber, DayofWeek, MonthName, MonthNumber, YearNumber, Weeknumber
from your_view
Within Report Studio filter on YearNumber and MonthName (ordering by Monthnumber). Then create a crosstab where columns would be DayofWeek and rows would be Weeknumber. Inside the crosstab drag the amount field.
Remember Cognos auto-sumarize everything by default unless you override that behavior.
One thing I cannot think to figure it out is how to display the DayOfMonth within the crosstab. That one is tricky since the data is string and it is not groupable in any calculation (MAX, SUM, AVG, etc). If you can find a solution for that, please let me know. Cheers.
您可以使用转发器表,该表将使用为您提供日期的查询,您可以在该查询中为用户选择的月份应用过滤器。完成该部分工作后,您可以将列表拉入转发器表中,然后使用从日期查询到列表查询的主从关系,然后您可以在表内设计您的列表。
You can use a repeater table, and the table will use a query which gives you the dates, you can apply the filter in that query for the user-selected month. After you have that part working, you can pull a list into the repeater table and then use master-detail relationship from the date query to the list query, then you can design your list inside the table.