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 31
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 
 
 
  • Verified answer
    FH-09051731-0 Profile Picture
    31 on at
    I added field to aging report but it shows the same data for all vendors
    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.  
  • Suggested answer
    YUN ZHU Profile Picture
    78,474 Super User 2025 Season 1 on at
    I added field to aging report but it shows the same data for all vendors
    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
  • FH-09051731-0 Profile Picture
    31 on at
    I added field to aging report but it shows the same data for all vendors
     
     
    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.
  • gdrenteria Profile Picture
    14,976 Most Valuable Professional on at
    I added field to aging report but it shows the same data for all vendors
  • FH-09051731-0 Profile Picture
    31 on at
    I added field to aging report but it shows the same data for all vendors
    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.
  • FH-09051731-0 Profile Picture
    31 on at
    I added field to aging report but it shows the same data for all vendors
    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.
  • Suggested answer
    Suresh Kulla Profile Picture
    44,984 on at
    I added field to aging report but it shows the same data for all vendors
    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. 
  • Suggested answer
    YUN ZHU Profile Picture
    78,474 Super User 2025 Season 1 on at
    I added field to aging report but it shows the same data for all vendors
    Hi, Try the following code, it looks like you are not adding to the existing Vendor DataItem, but adding another one.
     
    Thanks.
    ZHU

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,680 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,639 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans