count number of invoice docs in Sales Invoice Line table

johnsogjjohnsogj Member Posts: 103
I'm creating a report where I am trying to get a count on the number of invoice documents for a given day. I run the report on the Sales Invoice Line table for a specific day (shipment date) and I'd like to be able to show on the output the number of unique invoice documents generated on that day. can anyone help me with the code?

thanks

Comments

  • DaveTDaveT Member Posts: 1,039
    Hi johnsogj,

    It's not so easy without a bit on coding on the sale invoice line table so I would suggest creating a variable for the sales invoice header and using it.

    e.g.
    "sales invoice header".setrange( "shipment date", MydateFilter );
    if "sales invoice header".findset then
       "No. of Invoices" := "sales invoice header".count;
    
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • johnsogjjohnsogj Member Posts: 103
    oh yeah! great idea. thanks
  • johnsogjjohnsogj Member Posts: 103
    it worked perfectly. thanks
  • DaveTDaveT Member Posts: 1,039
    Hi

    Glad to help - :mrgreen: can you put [SOLVED] in the title on the first post
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
Sign In or Register to comment.