Dataport with two dataitem

doubtfiredoubtfire Member Posts: 60
I have three tables "Item" and "Sales Invoice Header" and "Sales Invoice Line".

"Sales Invoice Header" [No_] links with "Sales Invoice Line" [Document No_].
"Item" [No_] links "Sales Invoice Line" [No_].

I am creating a dataport to pull out invoices with items having '1000' to '3000'. How and where I could link the three dataitems together ? Thank you.

Comments

  • DeepDeep Member Posts: 569
    Use two record type global variables for balance two data items.
    do the necessary processing(setrange/setfilter whatever) and store the required data in other variables.

    Manually write the source expression in the properties of dataport field.
    Your job is done.
    Regards,

    Deep
    India
  • SavatageSavatage Member Posts: 7,142
    As far as I know you cannot link dataitems in a dataport, perhaps ver5???.

    You can use GET function & code to assign field values to variables and have that export3ed out.

    What fields do you really need from ITEM & SALES HEADER?

    Most people would create a report or codeunit to export data like this.

    Do you want it in TEXTfile or do you want to use the excel buffer?
  • DeepDeep Member Posts: 569
    As far as I know you cannot link dataitems in a dataport, perhaps ver5???.

    I dont know about 5.0, but I have made dataports in 4.0 SP3 using three tables, one as a data item and other two as variables. Then retrieving required data from the record variables in other variables, and then using them into source expressions.
    Regards,

    Deep
    India
  • SavatageSavatage Member Posts: 7,142
    that's what I meant by get & code :mrgreen:

    Just use Sales Invoice Line & from there you can GET the other info

    Item.GET("Sales Invoice Line"."No.");
    SalesInvHeader.GET("Sales Invoice Line"."Document No.");

    VarForItem := Item.XXXXX;
    VarForSIH := SalesInvHeader.XXXXX;
    etc
    etc.
  • DeepDeep Member Posts: 569
    Yess. The same.
    I am a functional rather than a technical, but I can code a little. :D
    Regards,

    Deep
    India
  • doubtfiredoubtfire Member Posts: 60
    Lot of suggestions. Thank you. I used to output to text file, but what is the way to Exel exporting ? Please explain in details. I believe if there is a way to do two, three, more tables should be ok too !?!? Thanks ALL.
Sign In or Register to comment.