本文介绍了报告时间表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在 SSRS 2008 R2 中创建一个报告,该报告显示培训课程的日历".

I need to create a report in SSRS 2008 R2, which shows a "calendar" of training sessions.

举个例子:

我有一个会话,它有一个开始日期和一个结束日期,还有一个开始时间和一个结束时间.我想创建一个表格,其中的列是一个月的天数,而行是小时,在我的例子中是上午 8 点、上午 9 点......

I have a session that has a start date and an end date, and has a start time and an end time.I wanted to create a table in which the columns were the days of the month, and the lines were hours, in my case, 8 AM, 9 AM ...

目标是这样的:

我有一张表格,我可以在其中获取所有会话,包括开始日期、开始时间和结束时间.

I have a table where I can get all sessions, with a start date, with the start time and the end time.

我再次担心以下几个方面:

My concern relapsed on the following aspects:

  • 您需要一张包含年、月、日的表格吗?
  • Ace 小时数怎么样?我还应该有一些桌子吗?还是直接在报表中创建表格?

我没有解决此问题的想法,想了解一些意见,如果可能,请在 Reporting Services 中执行此操作.

I'm out of ideas to solve this problem, and would like to know some opinions and if possible do this in Reporting Services.

问候.

第一次

我有这个带有数据会话的表:

I have this table with data sessions:

idSession  | nameSession | startDate  |        startTime      |        endTime       |
    1      |   module 1  | 2013-01-01 | 2013-01-01 09:00:00   |  2013-01-01 09:00:00 |
    2      |   module 2  | 2013-01-01 | 2013-01-01 14:00:00   |  2013-01-01 18:00:00 |
    3      |   module 3  | 2013-01-02 | 2013-01-01 09:00:00   |  2013-01-02 09:00:00 |

推荐答案

我已经创建了一个类似的报告,但很费劲.最终,我为列和行标题(小时和天)创建了一个主报告,并带有一个显示详细信息的子报告.所以我创建了一个数据集来列出每个小时的值(select '8:00' union select '8:30' union...等)并将其用作我的行值.列标题是根据提示的日期计算的——因此第一列将是选定的日期,第二列是选定的日期加上一天等,总共有 6 列,因为我们通常在星期一运行报告.星期六嵌套的详细报告根据从主报告传递的小时和日期值从 db 表中进行选择.

I have created a similar report, and it was a struggle. Ultimately I created a main report for the column and row headers (hours and days), with a subreport to show the detail. So I created a dataset to list each hour value (select '8:00' union select '8:30' union...etc) and used that as my row value. The column header is calculated based on a prompted date--so the first column would be the date selected, the second column is the selected date plus one day, etc. for a total of 6 columns since we typically run the report for Mon-Sat. The nested detail report selects from the db table based on the hour and date values passed from the main report.

这篇关于报告时间表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-11 13:27