Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

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

(2) ShareShare
ReportReport
Posted on by 10
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 
 
 
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 77,515 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
    FH-09051731-0 10 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
    gdrenteria 14,174 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
    FH-09051731-0 10 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
    FH-09051731-0 10 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
    Suresh Kulla 44,123 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
    YUN ZHU 77,515 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

Announcing Our 2025 Season 1 Super Users!

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

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 231,064 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans