Hello,
I am working on a report that shows a list of items and the number of quantity of that particular item that we have left in our warehouse. If it Quantiy is more than 0, then I need to output the location code, bin code, quantity and unit of measure code.
CLEAR (BinContent."Location Code")
CLEAR (BinContent."Unit of Measure code Code")
CLEAR (BinContent."Bin Code")
CLEAR (BinContent.Quantity)
If Qauntity <=0 THEN
CurrReport.SHOWOUTPUT(false)
ELSE
BinContent.SETCURRENTKEY("Item No.");
BinContent.SETRANGE("Item No.", Item."No.");
if BinContent.FINDSET then
repeat
unti BinContent.next =0;
This code works perfectly if there is only one Location code in BinContent. However, there are times, when an item can be stored in two different location and can have two different bins. If thats the case then I need to show both of the locations in the report. How can i tell the system to write every single location. I know findset will find all of them but i am just not sure how to write every single line. Currently it only writes the last line.
My 2nd issue: there are times when we do an item in the warehouse so quantity is more than 0, but we dont have the location code for the item (we dont know where the item is stored currently in the warehouse). If thats the case, i want that item to get skipped.
I tried this.
If BinContent."Location Code" ='' THEN
CurrReport.skip;
that didnt work though.
Answers
1) how do i read all the lines from findset and write them to my report because currently it only writes the last line.
2) if the location code is empty i want it to skip the record becuase currently it throws and error.
report:- item turnover
Location code <>''
Qty > 0
etc..
http://www.BiloBeauty.com
http://www.autismspeaks.org
RIS Plus, LLC
I figured it out. Its was as simple as creating the Bin content dataitem under the item dataitem....that took care of most of my issues.
Thanks guyz
Therefore, If the quantity is more than 0, and the bin is empty...i want it to return false so i can display an appropriate error message. so I created a body with a label and i am trying to use showoutput true or false based on this condition if findset returns true or false.
whats the code to see if its returns true or false??? Is it as simple as
This code is situated in the body section of the report.
if Quanity > 0 THEN
if "Bin Content".FINDSET = true THEN
CurrReport.SHOWOUTPUT = FALSE
For your question on syntax you will need to use the C/SIDE Reference Guide. Click on the Help menu and click C/SIDE Reference Guide. You can find all C/AL keywords in there, and it specifies the parameters and return values for all of them.
RIS Plus, LLC
Can you explain when you say "can't find". Should all items have a bin in your company? If so, filling that value in and preventing future new item entry errors should be something you need to look at also.
For example on insert of the item table you can force Blocked to be true.
On validate of the blocked field you can use TESTFIELD to check all the fields you deem mandatory. If one fails the user will be unable to unblock the item until the problem has been corrected and therefore can't be used in the system causing havoc.
http://www.BiloBeauty.com
http://www.autismspeaks.org