View Report

felixfelix Member Posts: 2
Good morning !!

I have a problem with view report.
I developed a report to do the total amount monthly but there is a problem because I need of a individual total for every month.

Currently the view report is how following reported:

MONTH
TOTAL

september
0.01
september
0.02
september
0.01
october
0.07
october
0.08

I used the following instruction in "Table.Body - OnPreSection() "

CurrReport.SHOWOUTPUT := CurrReport.TOTALSCAUSEDBY
= "Table".FIELDNO("Date");

but the result is not just because I would the view in this way :

Month
Total
september
0,04
october
0,15

Thanks a lot and sorry for my bad english.
Regards. ](*,)

Comments

  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Thanks for posting in the forum!

    As I mentioned in the pm I don't am much of a reporting guy but I think I would try use the date table as dataitem for this.
  • ara3nara3n Member Posts: 9,257
    You need to add a groupfooter section and add
    CurrReport.SHOWOUTPUT := CurrReport.TOTALSCAUSEDBY
    = "Table".FIELDNO("Date");

    Add in section the text for month and amount,
    and in property of that table set the option totalgroupfieldsby Date
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • kinekine Member Posts: 12,562
    !Warning! You cannot do grouping based on Date field if you want group by months without more C/AL code! Because it will call the groupfooter for each date! You need another mechanism how to call the footer. For example mentioned Date table as master dataitem...
    Another solution is to add month no. into your table...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.