Options

Dataport Export

albrecht-vetalbrecht-vet Member Posts: 5
I want to create a dataport in which i only get out the different sums

Item Quantity Price Cust.No
12345 50 100 1
12345 50 200 1
12345 50 300 1

As export i would like to have onlay one line with the following data.

Export 12345 150 600 1

How can i realize this, because what must i do ?
If you can help, it would be great.

Best regards from

albrecht

Comments

  • Options
    Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    This is a nice one.

    I think there are (at least) 2 ways of solving this.

    One way is to make a dataport on the table you want to export, and make some code to export the first combination, with the sums, and to skip the rest of the records with the same values.

    Another option, maybe more simple, is to first store the values in a temporary table. You can make your dataport on the integer table and export the values from the temptable.

    I hope I explained it right, and I think there are more possibilities. :D
  • Options
    albrecht-vetalbrecht-vet Member Posts: 5
    Hello all,

    the problem is not to export the every line ( that's no problem ).

    The problem i have is to export the cumulated data in one line

    for one debitor ( see example ).

    I need more help
  • Options
    Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Yes, I know. This is what I am trying to explain to you. :-s

    The problem is that a dataport has no groupfooters.

    The most simple thing I think is to make a function in your dataport what compresses the records in a temporary table.

    For example;

    If you have to records A B 100 and A B 200 you create a record in the temp table A B 300.

    Your dataport can run on the integer table. Set a filter on the count of the temporary table.

    On the first integer do a find on the temp table, after that a next(1).

    Put the temp table fields in the dataport fields.

    I hope that this explains it more clearly. :D
Sign In or Register to comment.