Purchase Lines group by No.

In Purchase Invoice Report I want togroup my Purchase Invoice Lines By No., for that I have Done:

In Purchase Line Table created a New Key No. With Quantity,Unit Cost,Line Amount on Sum Index Fields.

On Report Purchase Lines DataItem created on DataitemTabkleView = SORTING(No.) ORDER(Ascending)

And GroupTotalFields = No. and TotalFields = Quantity,Unit Cost,Line Amount

But the result in my report is not Good, no group is done:(

But on report

Did you add GroupHeader and GroupFooter sections?

Now I have the group Footer, and all lines type = Item are OK, but I still have body session for lines Type = Resource. But this line :: Resource does not appear in My report.

Evem If I put this in Body session report:

Purch. Inv. Line, Body (3) - OnPreSection()
CurrReport.SHOWOUTPUT((“Purch. Inv. Line”.Type = “Purch. Inv. Line”.Type:: Resource)
AND (“Purch. Inv. Line”.Quantity <> 0));

Well you’re only grouping by number, not type and number. That number could be a resource, an item, a G/L account, etc. I would either group on both fields, or or at the very least sort by them.

I would imagine currently they are showing as a line in your GroupFooter, unless you have a showoutput that will only show items.

I Creat a new key in Purchase Invoice lines.

And use that new Key in my report data Item. But the Resource line does not appear :frowning:

Did you group by Type and No.? There’s no reason for the line not to show up unless you have some sort of filter that is removing the data from the record set, or a statement that makes it so the output doesn’t show up.

Have you used the debugger to check if either of those is the case?

Matt I really need to Know why Resource line does not appear in My report :slight_smile:

I Tried every Thing I know

Thanks

Matt

The group is By Type and No., and the DatItem is order By Type and No…

I Created 2 Group Footer session in report and each one is printed for Item Type and For Resource Type.

But The Resource Line does not appear in report print :frowning:

Then step through the debugger, line by line, and determine where the problem is. As stated before, there are only so many things it can be. Either it is filtered out of the data set, or not shown because of a SHOWOUTPUT. You’re asking everyone to figure out what is wrong with your custom report, with no view into the code or the data, and that’s next to impossible to do.