In a report I have 2 colums name Product Group code that sum Quantity in Purchase lines where Product Group Code is the same.
EX: In purchase lines I have
line Prod Product Group code quantity
01 100 AA 20
02 150 AA 30
03 200 BB 10
In my report I would have:
Product Group code Product Group code
50 ( = 20+30) 10
My problem is to get more than 1 line in the same purchase line with the same Product Group code.
In this example, for Product Group code = AA, I only get Quantity = 30.
How can I do It?
You need to group the report by Product Group Code and get the total in groupfooter…
That can be solved by groupint the product group code and totaling the quantity.
I have already done that, but all my data is printed on ItemLedger Entry Footer section.
But I stil only get the last record for the same Product Group Code
You should use Group Footer…
for that u hav to write code CurrReport.CreateTotals(qty) on Item ledger entry predataitem
!st U have to set a property in report for the grouping of Product Group Code and then as mohana suggested
If u are using two dataitems purch line and itemledger entry , If the field that u are grouping related to purch line table and u are printing the value in itemm ledger entry footer section u hav to group the field by setting property Grouping,dataitemtableview(the field u set grouping), groupfooter shud be create otherwise grouping cant be possible and write the code CurrReports.CREATETOTALS(thefieldwhichu want to sum) in Predataitem of itemledgerentry.
If u are using only singledataitem it is very easy to calculate, just use above methods except writing code currreport.Createtotals