Share via

I am getting this error when linking 2 dataitems in a report using AL: The property value '"Customer No." = field("No.")' on property 'DataItemLink' is not valid. I'll really appreciate the help.

Anonymous
2023-11-04T08:14:38+00:00

Code:

report 50129 "Report for multiple tables" {//Make the report serachable fro Tell meUsageCategory = Administration;ApplicationArea = All;//Use RDL layoutDefaultLayout = RDLC;//Specify the name of the file that the report will useRDLCLayout = 'MyRDLReport.rdl';

dataset{dataitem(Customer; Customer){//Sort table view based on the No. fieldDataItemTableView = Sorting("No.");//Include the No. field in the filter tabRequestFilterFields = "No.";//print data only if at least one of the CustLedgerEntry and sales header items generates outputPrintOnlyIfDetail = true;

column(No_Customer; "No."){//Include the caption of No. fieldIncludeCaption = true;}

column(Name_Customer; Name){//Include the caption of No. fieldIncludeCaption = true;}

column(Phone_Customer; "Phone No."){//Include the caption of No. fieldIncludeCaption = true;}

column(Address_Customer; Address){//Include the caption of No. fieldIncludeCaption = true;}

column(EMail_Customer; "E-Mail"){//Include the caption of No. fieldIncludeCaption = true;}

}

dataitem(CustLedger; "Cust. Ledger Entry"){

DataItemTableView = sorting("Entry no.");// Set a filter on the child data item, **CustLedgerEntry** to select only the records where the// value of Customer."No." field and the "Customer Ledger Entry"."Customer No." field matches.DataItemLink = "Customer No." = field("No.");

column(EntryNo_CustLedgerEntry; "Entry No."){IncludeCaption = true;

}column(CustomerNo_CustLedgerEntry; "Customer No."){IncludeCaption = true;

}column(PostingDate_CustLedgerEntry; "Posting Date"){IncludeCaption = true;

}column(DocumentType_CustLedgerEntry; "Document Type"){IncludeCaption = true;

}

column(DocumentNo_CustLedgerEntry; "Document No."){IncludeCaption = true;

}

column(Description_CustLedgerEntry; Description){IncludeCaption = true;

}

column(CurrencyCode_CustLedgerEntry; "Currency Code"){IncludeCaption = true;

}

column(Amount_CustLedgerEntry; Amount){IncludeCaption = true;

}

column(OriginalAmtLCY_CustLedgerEntry; "Original Amt. (LCY)"){IncludeCaption = true;

}

column(RemainingAmtLCY_CustLedgEntry; "Remaining Amt. (LCY)"){IncludeCaption = true;

}

}

dataitem(DetCustLedger; "Detailed Cust. Ledg. Entry"){

DataItemTableView = sorting("entry no.");DataItemLink = "Cust. Ledger Entry No." = field("Entry No."), "Customer No." = field("Customer No.");

column(EntryNo_DetailedCustLedgEntry; "Entry No."){IncludeCaption = true;

}

column(EntryType_DetailedCustLedgEntry; "Entry Type"){IncludeCaption = true;

}

column(PostingDate_DetailedCustLedgEntry; "Posting Date"){IncludeCaption = true;

}

column(DocumentType_DetailedCustLedgEntry; "Document Type"){IncludeCaption = true;

}

column(DocumentNo_DetailedCustLedgEntry; "Document No."){IncludeCaption = true;

}

column(AmountLCY_DetailedCustLedgEntry; "Amount (LCY)"){IncludeCaption = true;

}

column(TransactionNo_DetailedCustLedgEntry; "Transaction No."){IncludeCaption = true;

}

column(JournalBatchName_DetailedCustLedgEntry; "Journal Batch Name"){IncludeCaption = true;

}

column(DebitAmountLCY_DetailedCustLedgEntry; "Debit Amount (LCY)"){IncludeCaption = true;

}

column(CreditAmountLCY_DetailedCustLedgEntry; "Credit Amount (LCY)"){IncludeCaption = true;

}

}

dataitem(SalesHeader; "Sales Header"){DataItemTableView = sorting("Document Type", "No.");DataItemLink = "Sell-to Customer No." = field("No.");

column(DocumentType_SalesHeader; "Document Type"){IncludeCaption = true;

}

column(No_SalesHeader; "No."){IncludeCaption = true;

}

column(PostingDate_SalesHeader; "Posting Date"){IncludeCaption = true;

}

column(PricesIncludingVAT_SalesHeader; "Prices Including VAT"){IncludeCaption = true;

}

column(Amount_SalesHeader; Amount){IncludeCaption = true;

}}//These labels will be used later as captions in the report layout.}labels{Sales_Document_Caption = 'Sales Documents';Total_Caption = 'Total';

}

}

Error:

The property value '"Sell-to Customer No." = field("No.")' on property 'DataItemLink' is not valid.

The property value '"Cust. Ledger Entry No." = field("Entry No."), "Customer No." = field("Customer No.")' on property 'DataItemLink' is not valid.

The property value '"Sell-to Customer No." = field("No.")' on property 'DataItemLink' is not valid.

Microsoft 365 and Office | Install, redeem, activate | For business | Other

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Anonymous
    2023-11-04T11:42:21+00:00

    I'm linking data items in a report.

    Will do that. Thank you.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2023-11-04T11:27:38+00:00

    Dear Abdulrahman Mahfudh,

    Good day! Thank you for posting in Microsoft Community.

    May I know if you are linking data items to define the query dataset in Dynamic 365 Business Central?

    If yes, to make sure you get the dedicated assistance, I sincerely recommend you post your concern in the dedicated channel Dynamic 365 Business Central forum, members and engineers over there are proficient in the knowledge of Business Central queries, they will focus on the specific situation on your side and provide specific suggestions for you.

    If my understanding of the scenario is not consistent with yours, feel free to point it out, I will continue helping you.

    Thanks for your time and understanding! We hope you have a nice day, stay safe and healthy always.

    Sincerely,

    Tina | Microsoft Community Moderator

    Was this answer helpful?

    0 comments No comments