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

Community site session details

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

Data Item link error

(1) ShareShare
ReportReport
Posted on by 8
Hi,
I'm creating a PO rdlcreport, where I want to show different QR codes.
One QR for the PO number and one for the line.
 
When I add the DataItemLink I get the below error.
 

    "message": "The property value '\"Document No.\" = FIELD(\"No.\")' on property 'DataItemLink' is not valid.",
    "source": "AL",
    "startLineNumber": 44,
    "startColumn": 28,
    "endLineNumber": 44,
    "endColumn": 57
}]
 
Here is my code:
 
.
report 50102 "Purchase Order Barcode"
{
    ApplicationArea = All;
    RDLCLayout = 'PurchaseOrder.rdlc';
    UsageCategory = ReportsAndAnalysis;
 
    dataset
    {
        // DataItem for Purchase Header
        dataitem("Purchase Header"; "Purchase Header")
        {
            DataItemTableView = sorting("No.");
            RequestFilterFields = "No.";
 
            // Columns for Purchase Header
            column(No_; "Purchase Header"."No.")
            {
            }
            column(Vendor_Name; "Purchase Header"."Buy-from Vendor Name")
            {
            }
            column(Status; "Purchase Header"."Status")
            {
            }
            column(PurchaseheaderBarcode; "Purchase Header"."PurchaseheaderBarcode")
            {
            }
 
            trigger OnAfterGetRecord()
            var
                barcodeGenerator: Codeunit "IWX Library - Barcode Gen";
                barcodeDotSize: Integer;
                barcode: Record "IWX Barcode" temporary;
            begin
                barcodeDotSize := 4;
                barcodeGenerator.GenerateQRBarcode(barcode, "Purchase Header"."No.", barcodeDotSize);
                "PurchaseheaderBarcode" := barcode.Image;
            end;
        }
 
        // DataItem for Purchase Line nested under Purchase Header
        dataitem("Purchase Line"; "Purchase Line")
        {
            DataItemLink = "Document No." = FIELD("No.");
            DataItemTableView = sorting("Line No.");
 
            // Columns for Purchase Line
            column(Line_No; "Purchase Line"."Line No.")
            {
            }
            column(Item_No; "Purchase Line"."No.")
            {
            }
            column(Description; "Purchase Line"."Description")
            {
            }
            column(Quantity; "Purchase Line"."Quantity")
            {
            }
            column(Unit_Price; "Purchase Line"."Direct Unit Cost")
            {
            }
            column(Line_Amount; "Purchase Line"."Line Amount")
            {
            }
            column(PurchaseorderlineBarcode; "Purchase Line"."PurchaseorderlineBarcode")
            {
            }
 
            trigger OnAfterGetRecord()
            var
                barcodeGenerator: Codeunit "IWX Library - Barcode Gen";
                barcodeDotSize: Integer;
                barcode: Record "IWX Barcode" temporary;
            begin
                barcodeDotSize := 4;
                barcodeGenerator.GenerateQRBarcode(barcode, "Purchase Line"."No.", barcodeDotSize);
                "PurchaseorderlineBarcode" := barcode.Image;
            end;
        }
    }
}
 
 
Any help is appreciated, thanks in adavance.
Alex
I have the same question (0)
  • Verified answer
    YUN ZHU Profile Picture
    93,872 Super User 2025 Season 2 on at
    Data Item link error
    Please put Dataitem("Purchase Line"..." inside Dataitem("Purchase Header"...".
     
    You can refer to the standard report below.
    report 1322 "Standard Purchase - Order"
     
    Thanks
    ZHU
  • AN-03061630-0 Profile Picture
    8 on at
    Data Item link error
    Hi Zhu,
    thanks so much for your reply, this helps.
     
    Regards,
    Alex

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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

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

#1
Sumit Singh Profile Picture

Sumit Singh 2,179

#2
OussamaSabbouh Profile Picture

OussamaSabbouh 1,999

#3
YUN ZHU Profile Picture

YUN ZHU 1,892 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans