I am completely new at AL programming and am doing a little testing in my business central sandbox.
On my report's request page I would like to add a field in which I can choose a customer and then only show data for the chosen customer in the report.
I have successfully added the field but fail to properly configure the DataItemTableView, so the data passed to the report layout is pre-filtered.
This is the field I added ("ChosenCust_Code" is the variable I want to store my user-chosen value in):
Caption = 'Customer to notify:';
ToolTip = 'Specifies the customer to create the overdue notice for.';
ApplicationArea = All;
TableRelation = Customer."No.";
In my data item, I tried to use the following line to filter the data based on the user-chosen value:
DataItemTableView = where("No." = const(ChosenCust_Code));
"No." is the field in my data item table (PK) which should align with the ChosenCust_Code variable.
I have searched the web for half an hour now and figured I might be faster just asking here.