Dataport Headers and lines!!!!!!!!

HanenHanen Member Posts: 281
Hi,

How can I export using datapart to a txt file:

for each payment I want to have:

Header: Payment Header
Lines (Details): All the lines related to the header: Payment Line

Using two fixed format: One for the header and one for the lines.


Thanks for help!!!!!!! :-k
Regards

Hanen TALBI

Comments

  • BeliasBelias Member Posts: 2,998
    you've noticed you can't indent dataitems in a dataport.
    in other words, you can't have:
    H1
    L1H1
    L2H1
    L3H1
    H2
    L1H2
    L2H2
    L3H2

    but you can only obtain

    H1
    H2
    L1H1
    L2H1
    L3H1
    L1H2
    L2H2
    L3H2

    Create 2 dataports, or export the data in a file through custom code.
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • SavatageSavatage Member Posts: 7,142
    If you need it in that way you could create a report that writes the info to a file.

    Use Applied Entries form to give you an idea of the code:
    Code
      SETCURRENTKEY("Closed by Entry No.");
      SETRANGE("Closed by Entry No.",CreateCustLedgEntry."Entry No.");
      IF FIND('-') THEN
        REPEAT
          MARK(TRUE);
        UNTIL NEXT = 0;
      
      SETCURRENTKEY("Entry No.");
      SETRANGE("Closed by Entry No.");
      MARKEDONLY(TRUE);
      SETRANGE("Customer No.",CreateCustLedgEntry."Customer No.");
    
    Use Create, Createoutstream, Textmode, Writetext functions.
  • HanenHanen Member Posts: 281
    Thank you for your answers, I will try that and I'll tell you the result :wink:
    Regards

    Hanen TALBI
Sign In or Register to comment.