Processing-Only Report: Grouping according to some logic

Hello!
I have a problem making a report. Let me summarize as follows (just an example, the real thing is a bit more complex, but I can figure the rest out… I hope!):

I have a table which contains 5 fields:

Item No.
Posting Date
Reason Code
Entry Type
Quantity

I need to make a processing-only report which maps lines from this table into another, applying some logic:

  • If “Entry type” is among certain values (let’s say 1,4,5), lines must be mapped as they are
  • If “Entry type” is among other values (let’s say 2,3,6), I need to sum all quantities grouped by “Item No.”, “Posting Date” and “Reason Code” and move just one line into the target table (containing “Item No.”, “Posting Date”, “Reason Code”, the summed quantity and ignoring the “Entry Type”)

My question is: Is there an efficent/standard way to achieve this, without parsing all the lines and summing “by hand”? I thought of using TotalFields and GroupTotalFields, but can’t figure how to group just according to some values of “Entry Type”…

Thank you very much in advance for your help!

Hi Davcic,

I would suggest two dataitems for the table - 1st to process the types 1,4,5 and the second 2,3,6 grouped. It can be acheived in one dataitem but more complex and harder to debug - keep it simple (Especially for the next guy)

Hope this helps.

Thank you very much for your suggestion! I think I’ll go that way!

Gald to help [:D]