Hello Experts,
Right now I'm working on a report. I have taken two DataItems: Item Ledger Entry & Item Journal Line. Now I need to set four request page filters i.e. Item No., Location Code, Entry Type, Posting Date(Start Date, End Date).
For that I have taken five variables in C/AL Global i.e. Item No.(Code), Location Code(Code), Entry Type(option), Start Date(Date), End Date(Date).
I have also declared those fields on Request Page Designer.
Now I have written the following code:
Item Ledger Entry
OnPreDataItem():
SETRANGE(Item Ledger Entry.Posting Date, Start Date, End Date);
SETRANGE(Item Ledger Entry."Item No.", "Item No.");
SETRANGE(Item Ledger Entry.Location Code, Location Code);
SETRANGE(Item Ledger Entry.Entry Type, Item Ledger Entry.Entry Type :: "Negative Adjustment");
The code has run but whenever I enter any values on the request page the report doesn't shows any data. If I left those fields empty the report shows all the data. I have no clues how to correct it. Please Help me!
0
Answers
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/
Give the variables names that are different from the field names.
good luck.
Ok, I'll apply this..Thanks..!!
Apparently you have done something like this already, because otherwise you would not get all entries when entering no filter codes on the request page.