GroupTotalFiels based on user input

vdbholland
vdbholland Member Posts: 3
I want to create a report with this lay-out:

Dataitems:
Item
Sales Invoice Line

There are linked with (No.).
The results is all the 'Sales Invoice Line' records from a certain Item.

Depending on user input (in the Request Form) I want to group the 'Sales Invoice Line' records by "Document No." or by "Shipment Date" in GroupTotalFields

I present the totals (Unit Cost (LCY),Amount) in a groupfooter.

I wanted to change the GroupTotalfields value in the ONPREDATAITEM code but that is impossible.

However, I don't have any other idea how to handle this.

Can you help me further?

Comments

  • Mbad
    Mbad Member Posts: 344
    You can play around with the totalscausedby function in the showoutput, but in the end it may be cheaper to make 2 reports.
  • vdbholland
    vdbholland Member Posts: 3
    Thanks! I thought already about it...

    :cry:
  • lubost
    lubost Member Posts: 633
    It is possible to do it in one report, but you need to create two sets of dataitems and use currreport.break command to skip one of them.

    Mbad's hint is better.