Dataport - export record multiple times

keitholsonkeitholson Member Posts: 5
edited 2002-02-06 in Navision Financials
I have a "Quantity" field (type: Integer and not a flow field) in a table that I am exporting records from.
I would like to export a record 2x if the quantity is 2, 3x if its 3 etc.
The records would all export to the same file, but ones with quantities greater than zero would export extra lines with the same information.
Can some one point me in the right direction for accomplishing this?
Thanks in advance.
K. Olson
Enterprise Solutions, LLC
www.ents-utah.com

Comments

  • wonmowonmo Member Posts: 139
    You can accomplish this by adding code to the OnAfterExport trigger for the dataitem. For example:

    IF State = 'CA' THEN
    IF X < 3 THEN BEGIN
    NEXT(-1);
    X := X + 1;
    END;
    ELSE
    X := 1;

    You can modify the code where the 3 would be the integer field in question. Also, you will have to set X as a global integer variable. Hope this helps.
  • keitholsonkeitholson Member Posts: 5
    Thanks for the help.
    It worked well.
    K. Olson
    Enterprise Solutions, LLC
    www.ents-utah.com
Sign In or Register to comment.