Options

NAV2013: How to print total invoice amount in footer

Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
edited 2013-08-30 in NAV Three Tier
On report 206, a Footer was added to print a bank transfer strip (translated from dutch "overschrijvingsstrook"). This Footer contains the bank details of the receiver (= the NAV company that created the invoice), along with a structured reference (such as "+++090/9337/55493+++") and the total invoice amount.

How do I print this invoice amount in the footer of a RDLC-report, knowing that this NAV company makes invoices with and invoices without VAT? How can I transfer the correct field from the invoice lines dataset to the Footer?
No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)

Answers

  • Options
    clauslclausl Member Posts: 455
    Use Code.GetData or ReportItems!, this way you have the right value printed in your Footer.

    /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 :-)
  • Options
    Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    The needed fields are not displayed in the Expression window after I type =ReportItems! as Expression value for a textbox in the footer, so I guess I'm stuck with Code.GetData? I presume I first need to use Code.SetDate somewhere? Where?

    EDIT: I added + Chr(177) + Cstr(Last(Fields!TotalAmount.Value)) to the Expression of textbox CustAddr, and used =Code.GetData(56,1) as Expression of the textbox in the footer, but nothing gets printed.
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • Options
    Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    If ReportItems! does not work, then Code.SET/GETdata won't work either I guess.

    Can you make a screenprint from the field that you want to transfer?
  • Options
    Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    The total invoice amount needs to be printed in the footer, so this can be either the field TotalAmount or TotalAmountInclVAT.

    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • Options
    Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    In order to use ReportItems! the cell you want to move to the footer needs to have name or you need to point to the technical name Visual Studio gives it.

    Then you can use it like this.
  • Options
    Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    In order to use ReportItems! the cell you want to move to the footer needs to have name or you need to point to the technical name Visual Studio gives it.
    Right on! When using =ReportItems!textbox85.Value in the footer, the value gets printed. Now I need to use a iif-construction to print either the amount with or without VAT.
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • Options
    Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Glad it works.

    Another option than iif is to add the business logic in C/AL and add the field hidden to the body. This keeps your business logic in one place rather than partly in NAV, partly in VS.

    Whatevery works for you off course.
  • Options
    Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    I ended up with 2 textbox controls placed on top of each other, and using an expression to toggle the Visibility.

    Thx all for the hints. This is a great forum ;-)
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • Options
    Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
Sign In or Register to comment.