Show total in header (RDLC)

asmilie2basmilie2b Member Posts: 122
edited 2014-04-07 in NAV Three Tier
I have a report for which I need to show the total (which shows in the end of the body), also in the header.
I am unable to find a way to do so, and wonder if I am not missing something simple.

I have tried
* Using code.getdata to get the value of the field, below is the declaration of the value it references:
Cstr(Fields!Gen__Journal_Line__Total.Value)
That just shows up blank

* Using the below
=ReportItems!Grand_Total

That shows #error on the report.

Bruce Anderson

Answers

  • clauslclausl Member Posts: 455
    Hi Bruce,

    I usually prefer to have the total in the top of the Body, but I can see scenarios where you also want to have the total in the Page Header.

    I have created a demo report which shows how this is done.



    You can find this solution here on my OneDrive: http://1drv.ms/1jhnEl1

    If you have any questions just let me know.

    /Claus Lundstrøm
    Claus Lundstrøm | MVP | Senior Product Manager | Continia.com
    I'm blogging here:http://mibuso.com/blogs/clausl and used to blog here: http://blogs.msdn.com/nav
    I'm also offering RDLC Report Training, ping me if you are interested. Thanks to the 700 NAV developers that have now already been at my training. You know you can always call if you have any RDLC report issues :-)
  • asmilie2basmilie2b Member Posts: 122
    Hello Claus,

    You are right, putting it in the body would be much simpler, but then I will need to do something with the titles of the rows. I currently have them in the header because they need to show on every page. If I put the report total in the body then it will be between the table column titles and the rows of dataw which would look strange.

    Many thanks for putting the sample together! I tried to load it into NAV 2013 R1 with VS 2010. But in VS 2010 it tries to convert it, then the below fatal error.

    --
    Bruce

    Bruce Anderson
  • clauslclausl Member Posts: 455
    Hi Bruce,

    As a Sunday service I have downgraded the report to NAV 2013. :)

    The NAV 2013 Report is found here on my OneDrive:
    http://1drv.ms/1hhYvIb

    Enjoy what is left of your weekend in Sydney.

    /Claus Lundstrøm
    Claus Lundstrøm | MVP | Senior Product Manager | Continia.com
    I'm blogging here:http://mibuso.com/blogs/clausl and used to blog here: http://blogs.msdn.com/nav
    I'm also offering RDLC Report Training, ping me if you are interested. Thanks to the 700 NAV developers that have now already been at my training. You know you can always call if you have any RDLC report issues :-)
  • asmilie2basmilie2b Member Posts: 122
    Hello Claus,

    Many thanks that was it! So GetData did the trick, but I needed to have "Format(Sum())" around the Field! call. This is the syntaxt that worked for me in the GetData definitions.

    Cstr(Format(Sum(Fields!Gen__Journal_Line__Total.Value,"DataSet_Result"),"#,0.00"))

    Very humbling your assistance with this. Sorry to make you busy on your weekend!

    Bruce Anderson
Sign In or Register to comment.