Problem in Report

Hello Expert,

I have certain problem while making the Sales invoice i need the data according to product group code wise and Unit of Measure wise

for eg if have have product group code let suppose A

now suppose i have following item in this group

item name qty unit of measure

item 1 5 bags

item 2 5 bags

item 3 2 packet

now i want data in this form

10 bags 2 packet

for this i write this code but its not working properly it give this output (12 packet)

IF CurrReport.TOTALSCAUSEDBY = FIELDNO(“Sales Line”.“Product Group Code”) THEN
BEGIN
PCS := PCS +’ ‘+ FORMAT(“Sales Line”.Quantity) +’’;
PCS := PCS + ’ ’ + “Sales Line”.“Unit of Measure” +’,’
END

can any one have idea how to make this

Hi Shailesh,

You are grouping by product category - are the item different categories?

You could sort/group unit of measure or use a temporary file and the loop this and print the summary

Coding in the Sections trigger is always a challenge. I think I’d do the summarization in a function triggered by the OnAfterGetRecord trigger of the header. You might be able to add some custom fields to the ItemUOM table and populate a temporary version of it for the summarization. Then add a data element for your temporary table that follows your line element. Like every snowflake, lots of ways to skin the cat.

What is problem if you done it with grouping just make a key with grouping field and then grouping on both field and print data on group footer.

thanks for the response

but i have the group( documnet type,item category cod,product group code,unit of measure) them by this key

but nothing is working

item category code are different.

your key must be combine these field (documnet type,product group code,unit of measure);

your key must be combine these field (documnet type,product group code,unit of measure);