English 中文(简体)
How to show a row total amount by group CG Group in Report
原标题:

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.

问题回答

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.

  1. Override fetch() method and select all necessary data on it
  2. Use instance of Map class to group the data
  3. Call send() method to print data.

Find AOT by words "send" and "fetch" to get more examples.





相关问题
iPhone KERN_INVALID_ADDRESS

Im not sure why I am recieving this error, and I m unable to track down the cause. This only happens on the device though, Simulator runs error-free as expected. Can anyone make sense of this crash ...

Creating an MS Access query based on system, status, and date

I am just learning Access and have been tasked with creating a database for system access. We need a report that shows what systems have been in a pending status for 0-30 days, 31-60 days, 61-90 days,...

Get history of a project in Visual Source Safe 2005

I would like to get a report of the changes made to all the files in a project. I know how to do it for a single file, but I don t know how to do it recursively. Have you tried to do something similar?...

How to show a row total amount by group CG Group in Report

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:...

Multiple ReportViewers in application?

I am developing a WinForms application and starting to dig into the reporting functionality. This is a smart client app, using SQL Server Compact Edition, which will be used both on and offline. ...

How to do a linear regression into a BIRT report?

How to make a linear regression on the chart displayed into your BIRT report. I have x and y data... but I don t see any function on eclipse BIRT to generate the linear regression... Any idea ? Many ...

How to specify HTML doctype in Oracle SQL*Plus HTML report?

I m producing an HTML report from a query using: set markup html on table "WIDTH= 100% BORDER= 1 cellpadding= 2px cellspacing= 0px "; Is there a way of including a doctype declaration such as: &...

Data report in VB 6.0

I m using data report in VB 6 and trying to display images from database. It retrieves the image but showing the same image for all output the code i m using are given below Dim rs As ADODB.Recordset,...

热门标签