Adding total to a report

yuppicideyuppicide Member Posts: 410
edited 2009-12-30 in Navision Attain
Navision 3.10..

Last one and I should be good for awhile...

How do I do a report total?

When I go to Purchase and Payables and then to Orders Received. I go to Posting and Test Report.

On that report it shows me Qty To Receive, but I would like it to have a total on the bottom so we don't have to manually add ourselves.

.. is there an easy way to figure out exactly what report I need to be in to edit?

Comments

  • DenSterDenSter Member Posts: 8,307
    Hit Ctrl+F2 when the report's request form pops up, but before running it. It's the same as Tools, Designer. It will show you the report number there.
  • yuppicideyuppicide Member Posts: 410
    So how do I get it to take all the QtyToHandle lines, add them up and show a total on the bottom? I can get it to show the last QtyToHandle, but not sum of all.
  • DenSterDenSter Member Posts: 8,307
    in the OnPreDataitem trigger:
    CurrReport.CREATETOTALS(QtyToHandle);
    
    As long as the section you are talking about is a footer section, just set the SourceExpr as the QtyToHandle variable, and the report should automatically take care of totals now.
  • SavatageSavatage Member Posts: 7,142
    Ok Here are the steps.

    Open the report & look at the dataitems. One of the will be "purchase line".
    Put your cursor on that dataitem & hit F9
    OnAftergerGetRecord add the CREATETOTALS function as listed below.
    OnPreDataitem ()
    CurrReport.CREATETOTALS(QtyToHandle);
    
    Once that line has been entered - hit escape to go back to the dataitems
    View->Sections
    From Puchase Line Body(2) copy the QtyToHandle field - Paste it on Purchase Line Footer (5)

    Save->Compile->Enjoy

    Edit - too slow :(
    PS - now that I look at it - there is already a CREATETOTALS function on Predataitem - just add your variable
    CurrReport.CREATETOTALS("Line Amount","Inv. Discount Amount",QtyToHandle);
    
  • yuppicideyuppicide Member Posts: 410
    Thanks. Got it.

    One last question..

    I saved the report as a new one with my total on it.. left the original one in tact..

    On my new report I've deleted some information I do not need.. now there's some additional space in the middle of my report. How do I get > PageCounter, Body (7) moved up a bit?
  • SavatageSavatage Member Posts: 7,142
    if you have cleared out some sections then just delete those sections.
  • yuppicideyuppicide Member Posts: 410
    Now I'm in a different place I'd like to add a report. It's showing me 0.00 every time.

    I have "Open PO Rpt by PO#". I resaved it as something else and modified the layout.

    In the Purchase Line I have the following:
    CurrReport.CREATETOTALS(OutstandExclInvDisc,OutstandingExclTax,
                    "OutstandExclInvDisc$","OutstandingExclTax$",Quantity,"Outstanding Quantity");
    

    Those last two are the ones I want to total at the end of the report.. Quantity and "Outstanding Quantity". They're in my C/AL Globals as well.

    In my Purchase Header, Footer (4) I have them as well. They always show 0.00 for totals.
Sign In or Register to comment.