Distinct data in a Navision report

xina_manxina_man Member Posts: 116
Hi there!

Is it possible to disctinct data in a report??? I Want to make a report that shows the customers that we've shipped itens on a certain date, but when I have more than one shipment in a day it repeats the customer in the report.

Can I disctinct data in the report and show the costumer only once?

Many thanks

Answers

  • SavatageSavatage Member Posts: 7,142
    by distinct i assume you mean GROUP.

    Why not Group by Customer No?

    How do you want it

    Date
    ->Item
    -->Customer
    ?
  • xina_manxina_man Member Posts: 116
    By "Distinct" I mean that some data from a table must only appear once in the report an not many times.

    I assume that group by is similar to sort by. What i realy need is to show only once the customer code even if there are many posted shipments.

    Many Thanks
  • David_SingletonDavid_Singleton Member Posts: 5,479
    xina_man wrote:
    By "Distinct" I mean that some data from a table must only appear once in the report an not many times.

    I assume that group by is similar to sort by. What i realy need is to show only once the customer code even if there are many posted shipments.

    Many Thanks

    Group is nothing like sorting. Grouping is (As Harry said,) exactly what you need. :mrgreen:
    David Singleton
  • DenSterDenSter Member Posts: 8,305
    To group by a field first you have to sort by that field, so there is a connection.

    You could put the data in a groupheader section and don't include a body section.

    Maybe a more elegant way would be to have a Customer dataitem and indent the details from there. You could even get fancy and include a body section, but only when the user wants to print detail.
  • SavatageSavatage Member Posts: 7,142
    DenSter wrote:
    You could even get fancy and include a body section, but only when the user wants to print detail.

    Adding to the fancy part......
    (Simple Fancy Lession1)
    Create A Variable called "PrintDetail" type Boolean
    View->Sections
    On the "Body" add code
    OnPreSection()
    CurrReport.SHOWOUTPUT(PrintDetail);
    

    View->request form
    add a checkbox sourceexp = PrintDetail

    the user can then see the body details or not depending on the request form.

    (Simple Fancy Lesson2)
    Adding a progress bar :lol:
    Variables:
    Window Dialog
    TotalRec Integer
    CurRec Integer
    OnPreDataItem()
    Window.OPEN('Processing @1@@@@@@@@'); 
    TotalRec := COUNT;
    
    OnAfterGetRecord()
    CurRec := CurRec + 1; 
    Window.UPDATE(1,ROUND(CurRec / TotalRec * 10000,1));
    
    OnPostDataItem()
    Window.CLOSE;
    

    (Simple fancy lesson3) :lol::lol:
    Adding Message & Annoying beep
    OnPostReport()
    Message(All Done! Boyeee!);
    BEEP(1000, 300);
    

    But Seriously : Understanding Grouping will take you to a whole new level of reporting.
  • SavatageSavatage Member Posts: 7,142
    You can find many examples of what you are looking for in the other reports. For example an aging report. Prints 1 customer and all the open entries - you can pick detail or not.

    there are many reports that are already done and you can use them as a templates for your reports and learn from them.
  • Alex_ChowAlex_Chow Member Posts: 5,063
    Grouping is also explained in detail on the development manual on the product CD.
Sign In or Register to comment.