Linking tables in a dataport

meemzmeemz Member Posts: 5
hi there
I am exporting orders from sales header (36) and sales line(37) to csv.
I have managed to filter the sales headers to just the order no.s i need but i keep getting the entire sales line table!

I tried to create an array to store the order no.s here -

Sales Header - OnBeforeExportRecord()
SalesHeaderArr:="No.";

Then tried this in the sales line -

Sales Line - OnBeforeExportRecord()
j += 1;
SETRANGE("Document No.",SalesHeaderArr[j]);

-help? :-k

Comments

  • HalMdyHalMdy Member Posts: 429
    To link two tables in a Dataport, as in a report :

    - Increment Right the "Sales Line"
    - In the properties of the "Sales Line" , fill in DatatemLink

    And then you take only Sales lines from the Header ...

    Hope I have understood your problem and clarified it as well
  • meemzmeemz Member Posts: 5
    I did try that but if you indent anything in a dataport then it says you have to change the file format to UPXML ??
    I want to be able to see what i have exported thats why i was trying to export to csv.
  • AlbertvhAlbertvh Member Posts: 516
    Hi Meemz

    on your salesline dataitem on the the predataitem insert the following code

    COPYFILTER(Salesheader."No.");

    Hope this sorts you out.

    Cheers

    Albert
  • meemzmeemz Member Posts: 5
    Nice one bruvva!
    Worked like a dream!
    thanks!
    :P
Sign In or Register to comment.