如何在报表中按组 CG 组显示行总金额
我正在使用 Axapta 3.0 和 X++ 语言。
我正在根据现有报告制作报告。新报告仅按组 CG 组显示总计行,而不是像旧报告那样显示所有详细信息行。
考试:可用报告
CG Code Amount Current 1-30days 31-60days 61-180days >180days
1.1 50 10 100 30 10 5
----------
1.1 30 20 60 35 20 20
----------
1.1 20 30 80 7 80 60
----------
1.2 30 50 50 1 100 80
----------
1.2 40 70 90 5 75 15
----------
2.3 100 20 20 150 20 30
----------
3.1 60 10 10 80 10 4
----------
3.1 30 60 5 100 5 60
新报告作为示例:
CG Code Amount Current 1-30days 31-60days 61-180days >180days
1.1Total 100 60 240 92 110 85
----------
1.2Total 70 120 140 6 175 95
----------
2.3Total 100 20 20 150 0 30
----------
3.1Total 90 70 15 180 15 64
我看到可用报告的代码有 SQL 语句,因为
select AmountMST from CustTransOpen where
custTransOpen.AccountNum == CustTable.AccountNum
&& custTransOpen.TransDate <= balanceAs
&& CustTransOpen.TransDate >= compareDate1
&& CustTransOpen.TransDate <= compareDate2
:
select sum(AmountMST),StatisticsGroup from SKV_CustAging3
group by StatisticsGroup
where SKV_CustAging3.TransDate <= balanceAs
&& SKV_CustAging3.TransDate < compareDate1;
我创建了视图以从名称为 SKV_CustAgỉng3 的 2table(Custtransopen、Custtable)获取数据,然后我还将 SQL 写入组 CG Group,如下所示 也尝试使用“部分组”来计算每个 CG 组的总计金额,但报告仍然显示详细记录,并且部分组的末尾显示总计。
在我看来,我想按 CG Group 组显示行总计,与上面的新报告示例相同。
有没有办法让每张CG只显示一条记录总和?
请帮助我。我是新来的官员,所以我对 Axapta 没有太多经验。谢谢。
I am using Axapta 3.0 with language X++.
I am making a report based on available report. The new report only shows a total row by group CG Group instead of showing all detail row as old report.
Exam: Available report
CG Code Amount Current 1-30days 31-60days 61-180days >180days
1.1 50 10 100 30 10 5
----------
1.1 30 20 60 35 20 20
----------
1.1 20 30 80 7 80 60
----------
1.2 30 50 50 1 100 80
----------
1.2 40 70 90 5 75 15
----------
2.3 100 20 20 150 20 30
----------
3.1 60 10 10 80 10 4
----------
3.1 30 60 5 100 5 60
New report as sample:
CG Code Amount Current 1-30days 31-60days 61-180days >180days
1.1Total 100 60 240 92 110 85
----------
1.2Total 70 120 140 6 175 95
----------
2.3Total 100 20 20 150 0 30
----------
3.1Total 90 70 15 180 15 64
I see the code of available report has SQL sentence as
select AmountMST from CustTransOpen where
custTransOpen.AccountNum == CustTable.AccountNum
&& custTransOpen.TransDate <= balanceAs
&& CustTransOpen.TransDate >= compareDate1
&& CustTransOpen.TransDate <= compareDate2
I have created view to get data from 2table (Custtransopen, Custtable) with name SKV_CustAgỉng3, then I also write SQL to group CG Group as:
select sum(AmountMST),StatisticsGroup from SKV_CustAging3
group by StatisticsGroup
where SKV_CustAging3.TransDate <= balanceAs
&& SKV_CustAging3.TransDate < compareDate1;
I aslo try to use "Section Group" to total amount every CG Group but the report still shows detail record and The end of section group shows total amount.
In my opinion, I want to show a row total amount by group CG Group the same example new report above.
Are there any way to show only one record sum total for every CG?
Please help me. I am new officers to make this report, so I don't many experience about Axapta.Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试重写报告的 send() 和 fetch() 方法。 Axapta 调用 fetch() 来获取将要打印的记录,Axapta 为报告中打印的每一行调用 send() 方法。 Axapta 开发人员指南包含此方法的详细信息。
通过单词“send”和“fetch”查找 AOT 以获取更多示例。
Try to override send() and fetch() methods of your report. Axapta call fetch() to fetch records which will be printed and Axapta calls send() method for each row, printed in the report. Axapta developers guide contains a detailed information for this methods.
Find AOT by words "send" and "fetch" to get more examples.