Options

[solved] Grouping in output text file

madmmadm Member Posts: 92
edited 2008-01-29 in Navision Attain
I have created a text file which export data from a customized table (similar to shipment lines).

The output file is fine, but for some of the entries there are mulitple lines - in the file I just want to show the document and total weight.

eg
doc no     date                qty
          1             01/01/01        20
           2            02/01/01        10
           3            03/01/01        30
           3            03/01/01         50
           4            02/01/01         60


the output file gives as above, but i wish to show
1             01/01/01        20
           2            02/01/01        10
           3            03/01/01         80
           4            02/01/01         60

If producing a report, I would use the grouping features, but this doesnt seem to work in a output file?

Comments

  • Options
    kinekine Member Posts: 12,562
    You cannot group in dataport, but if you use report you can write the data in OnPostSection if SHOWOUTPUT is true and you will have the file. Dataports are for "simple" data export. If you want to do more things around, you can use codenit, report etc. and variable with FILE type to write into the file.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    madmmadm Member Posts: 92
    kine wrote:
    You cannot group in dataport, but if you use report you can write the data in OnPostSection if SHOWOUTPUT is true and you will have the file. Dataports are for "simple" data export. If you want to do more things around, you can use codenit, report etc. and variable with FILE type to write into the file.

    Thanks for your reply.. I am actually using the report / FILE method...


    At the moment I have the file being created in the OnAfterGetRecord section..

    edit : i have just moved the file into onpost, but this only gives the last line?
  • Options
    kinekine Member Posts: 12,562
    It depends on how you set up the grouping. if you see on the screen the correct data, if you write the data into file in the correct sections OnPostSection trigger, you will have same output in file.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    madmmadm Member Posts: 92
    kine wrote:
    It depends on how you set up the grouping. if you see on the screen the correct data, if you write the data into file in the correct sections OnPostSection trigger, you will have same output in file.

    Thank you sooo much :) - now sorted
Sign In or Register to comment.