web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

I added field to aging report but it shows the same data for all vendors

(2) ShareShare
ReportReport
Posted on by 33
I am just learning the development of BC.
 
I added the payment terms code to an "Aged Accounts Payable" custom layout report. I copied the 322 report code and used it as the basis for my custom report. Here is the "column" code I added to the top of the "dataitem" section:
 
 
 dataset
    {
        dataitem(Vendor; Vendor)
        {
            PrintOnlyIfDetail = true;
            RequestFilterFields = "No.";
            column(Payable_TermsCode; "Payment Terms Code")
            {
            }
 
 
The other columns continue below this code.
 
I then added the field to the .rdlc report and when I run the report the field shows in the correct position and shows one of the payment terms codes. However, it shows the same payment term for all of the vendors. How do I get it to link this field so that it show the payment terms code for each different vendor and where should I add that code?
 
 
Thanks 
 
 
I have the same question (0)
  • Suggested answer
    YUN ZHU Profile Picture
    95,754 Super User 2025 Season 2 on at
    Hi, Try the following code, it looks like you are not adding to the existing Vendor DataItem, but adding another one.
     
    Thanks.
    ZHU
  • Suggested answer
    Suresh Kulla Profile Picture
    50,247 Super User 2025 Season 2 on at
    Are you using First when you reference the field in the Rdlc, that is a common error to see the same value for every vendor. 
  • FH-09051731-0 Profile Picture
    33 on at
    Suresh,
     
    I tried the "First" statement selection and it did not appear to change the outcome.
     
    I also included a screenshot showing all the payment terms codes showing the same "CM" code.
    Screenshot 2025-02-18 094643.png
    Screenshot 2025-02-18 095506.png
  • FH-09051731-0 Profile Picture
    33 on at
    YUN ZHU, 
     
    I used your suggestion and I had the same result as per the attached screenshot.
     
    It is not getting the correct payment terms code from the payment terms table that is linked to the vendor table.
    Screenshot 2025-02-18 101708.png
  • Gerardo Rentería García Profile Picture
    25,388 Most Valuable Professional on at
  • FH-09051731-0 Profile Picture
    33 on at
     
     
    Thank you. I did originally use the example from Erik Hougaard. But his example was adding a field to the table that will reside in the table. I believe my "payment terms" field on the vendor table is actually a link to the list of payment terms on the "payment terms" table.
     
    I have added the field to the table and to the .rdlc report, and I know that the field is good and returns a value from the payment terms list. The issue is that the field is not linked to the specific payment terms code for each vendor. It only returns one code "CM" for all vendors.
     
    I need a way to link the field to the specific payment term for each vendor. And if there is a link to be written, I am not sure if the link should be nested within the "column" statements or it should be outside in more of a global context.
  • Suggested answer
    YUN ZHU Profile Picture
    95,754 Super User 2025 Season 2 on at
    Please use the following method to ensure that your data is correct.
    Dynamics 365 Business Central: Save report dataset to Excel from the request page (Report Inspector)
     
    Because this seems to be a layout problem, if you want to display different headers on rdlc, you generally have to use the following method, which is very complicated.
     
    Hope this helps as well.
    Thanks.
    ZHU
  • Verified answer
    FH-09051731-0 Profile Picture
    33 on at
    For all of you that responded, thank you!
     
    I figured out the problem. It turns out that I was testing this in the Microsoft sandbox company. That company has all of the vendor payment terms set to the same value. They did not vary the value for each vendor. So when I finally checked the different vendors I noticed they had the same value, and that is why the same value showed on my updated report after adding the field.
     
    So a quick note... don't assume Microsoft varied the data in its demo company.  

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,132

#2
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 675 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 665 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans