Dataport export of 2 tables

SusieNSusieN Member Posts: 3
My apologies if someone has answered this but I have searched and can not find any topics with quite this issue. I am new to Nav and like others trying to use a dataport to export two tables. My problem is that the two tables are essentially unrelated.

We use Resources as stock Locations. I want to, for each Resource code, export the current [Inventory] of a specific range of Items (filtered by Location=Resource). The dataport won't let me indent the Items under the Resource and I can not work out how to generate this 'loop' around the same set of Items.

Any assistance greatly appreciated! :)

Comments

  • krikikriki Member, Moderator Posts: 9,110
    I don't know how you want to be the layout of the records/columns.

    But I think you will need to program it:
    Fill up a temptable with all your data in the OnPreDataport-trigger.
    Then use the integer-table to loop your temptable on and export the fields of the temptable.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • SusieNSusieN Member Posts: 3
    Thanks kriki - I will give that a try, though never done anything so clever as creating a temp table so could be a challenge!!
  • krikikriki Member, Moderator Posts: 9,110
    SusieN wrote:
    Thanks kriki - I will give that a try, though never done anything so clever as creating a temp table so could be a challenge!!
    Good luck.
    BTW : learn it well. Temptables are used a lot in Navision and their use solves a lot of problems. Look also at the how-to forum, it can be useful for temptables.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • DaveTDaveT Member Posts: 1,039
    Hi Susie,

    You can use a process only report for this also and manually output the data using

    Textfile.CREATE( FileName ) in the onpredataitem
    and
    Textfile.WRITE( Info ) in the onaftergetrecord and

    Text.CLOSE in the onpostdataitem

    where Textfile is a variable of type file
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • David_SingletonDavid_Singleton Member Posts: 5,479
    SusieN wrote:
    Thanks kriki - I will give that a try, though never done anything so clever as creating a temp table so could be a challenge!!

    And just one thing.

    When you start using Temp Tables, before testing, open properties then check if you set the temp property.
    Then close Navision, get a coffee, come back open properties and check to make sure you set the temp property.

    Then get a college to open the object, and check to make sure the temp property is set,

    THEN you can start testing.


    PS: if they (we) haven't done it themselves, then we have all at least been near by when another developer wrote.

    TableXYZ.DELETEALL; (thinking the property was set). \:D/
    I have even seen someone do it on a live system, since "I was just writing a report".
    David Singleton
Sign In or Register to comment.