Sales Invoice Report

In report 206, I really need to group my sales invoice lines by Item category code. With a total “Line Amount” by Item actegory Code.

How can I do it?

I created a new variable call ItemCategory with Type = record = Item Category table

in my sales invoice lines report in Sales invoice line dataItem created this call

Sales Invoice Line - OnAfterGetRecord()

IF “Item Category Code” <> ‘’ THEN BEGIN

ItemCategory.SETFILTER(ItemCategory.Code,“Item Category Code”);


NameD := ItemCategory.Description
NameD := ‘’;


In report 206 I created a new session Sales Invoice Line Group Header. and put here both fields:

“Sales Invoice Line”.“Item Category Code” and NameD

But when I print the report nothing appear.



Any idear???

The Post sales procedure can be the same.

My question is on the print report. I must print the sales invoice lines grouped by Item Category Code.

Is it possible???


Hi, You need to create Key on table Sales Invoice Line for Item category code and then you can use Report wizard to populate the report. Hope this will resolve your problem.

Hy Amol

I had already created one Key on table Sales Invoice Line for Item category code, but the result was none. And I must use the same Report 206 structure, because this is a Sales invoice.

I need to know how to force my report to print my sales line grouped by Item category code. Foe example i have one invoice with 10 lines. 5 with Item category code = 01 and other 5 with Item category code = 02.

My report will be the same but on sales invoice line Body with only 2 lines.

Can you help me on that?

Hi Luana,

In the properties of your dataitem you have to put your new key in DataItemTableView, the Item category code in GroupTotalFields. In TotalFields you must have all the fields that you want to show in your GroupHeader section, these fields must be in the sumindexfields of your key.

Hello Damien

Thanks for your help. At this moment, on Sales Invoice Line GroupHeader, only Item category cod is ok, the Quantity,Unit Price,Line Amount does not appear.

I had alreadycreated in TotalFields Sales Line DataItem property created this fileds Quantity,Unit Price,Line Amount, these fields arein the sumindexfields of my sales Invoice Line new key.

But this fields does not appear im my report, why not?


Hi Luana,

The total will appear in the groupfooter and footer sections - not the header.

and in GroupTotalField propreties what you have ?


I am speaking about Quantity,Unit Price,Line Amount. All this fieldsbelongs to Sales line Invoice body, and now I need each one in a sum grouped by ItemCategoryCode.

If item category code appears OK in groupHeader why this ones doesn’t. I tried with variables, but without success :frowning:

I have Item Category Code. And at this moment the goupHeader is working, because all my sales invoice lines are on his group.

But the Quantity,Unit Price,Line Amount fields does not appear in the GroupHeader section. These fields must be sum for the same Item category Code.



In groupheader you can only have title of group based on group field, sums values will appear in groupfooter section

Thanks to All. You are right.

This was a good solution.

Merry Christmas and a Happy New Year

I have now my sales lines grouped bu Item category cod. Good

But I need to create a sales line record, only with a description. Do you think that is possible?

Thanks To all. I solved myself this question.