BIRT 支持小计列吗?
我们正在尝试使用 BIRT 来设计特定的交叉表报告,但运气不佳。数据,具有某些属性的值的时间序列,具有以下形状:
数据
AttributeA,AttributeB,AttributeC,Date,Value
A1,B1,C1,Jan-1-2010,25
A1,B1,C2,Jan-1-2010,25
...
我已经为数据源创建了一个多维数据集,并按所有效果很好的属性进行分组,但我不确定是否/如何我可以按日期进行总结。下面是我想要生成的示例:
报告
Jan Feb Mar Q1 Apr
A1, B1, C1 25 25 25 75 33
C2 25 25 25 75 33
C3 25 25 25 75 33
Subtotal: 75 75 75 225 99
B2, C1 50 25 25 75 33
C2 50 25 25 75 33
Subtotal: 100 50 50 150 66
A2, B1, C1 25 25 25 75 33
C2 25 25 25 75 33
正如您所看到的,我希望将前三个月内的值按月求和,然后我想要 Q1 总和,依此类推。如果不编写一堆 Javascript,这种事情可以用 BIRT 实现吗?如果是这样,有人可以指出我正确的方向吗?
We're trying using BIRT to design a specific cross-tab report and are not having much luck. The data, a time series of values with some attributes has the following shape:
Data
AttributeA,AttributeB,AttributeC,Date,Value
A1,B1,C1,Jan-1-2010,25
A1,B1,C2,Jan-1-2010,25
...
I've gone ahead and created a cube for the data source and grouped by all the attributes which works great, but I'm not sure if/how I can summarize by the date. Here's an example of what I'm trying to produce:
Report
Jan Feb Mar Q1 Apr
A1, B1, C1 25 25 25 75 33
C2 25 25 25 75 33
C3 25 25 25 75 33
Subtotal: 75 75 75 225 99
B2, C1 50 25 25 75 33
C2 50 25 25 75 33
Subtotal: 100 50 50 150 66
A2, B1, C1 25 25 25 75 33
C2 25 25 25 75 33
As you can see, I want my values summed by month in the first three months, then I want a Q1 sum, and so on. Is this kind of thing possible with BIRT, short of writing a bunchof Javascript? If so, can someone point me in the right direction?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

假设您的日期属性被 BIRT 识别为日期(例如,而不是字符串),则按季度添加小计应该相对简单:
在交叉表多维数据集生成器中编辑日期维度(通过
右键单击数据资源管理器中的组并选择
编辑)。
在“组和摘要”窗格中选择日期组(在
右侧),然后单击“编辑”按钮(位于窗格右侧)。在
在“添加/编辑组级别”对话框中,您应该看到一组级联的
日期摘要级别,已检查月份。检查季度
以及“添加/编辑”对话框和“交叉表多维数据集”均单击“确定”
建设者。
将修改后的多维数据集从数据资源管理器拖放到
布局设计师。新的交叉表应包括季度和
列中的月份标题。
选择“列区域”选项卡
交叉表的属性编辑器。单击添加...按钮(到
空小计列表右侧)并选择聚合于:
集团/季度。单击“确定”。
预览修改后的报告。您可能需要调整
格式。
Assuming your date attribute is recognised as a date by BIRT (instead of a string, for example), it should be relatively straightforward to add subtotals by quarter:
Edit the date dimension in the Cross Tab Cube Builder (by
right-clicking on the Group in the Data Explorer and selecting
Edit).
Select the date Group in the Groups and Summaries pane (on
the right) and click the Edit button (to the right of the pane). In
the Add/Edit Group Level dialog you should see a cascading set of
date summarisation levels, with Month already checked. Check Quarter
as well, and OK both the Add/Edit dialog and the Cross Tab Cube
Builder.
Drag and drop the amended cube from the Data Explorer into the
Layout designer. The new Cross Tab should include both quarter and
month headings in the columns.
Select the Column Area tab in the
Property editor of the Cross Tab. Click the Add... button (to the
right of the empty Sub Totals list) and select Aggregate on:
Group/Quarter. Click OK.
Preview the amended report. You will probably want to adjust the
formatting.