I am working in Crystal Reports X. I am trying to modify a report that displays component shortages using Bill of Materials/Inventory tables from Great Plains (SQL). Our Purchasing Agent has asked me to modify the report to show multiple formulas (BOMs) simultaneously with the intent to sum component parts at the bottom of the report so they have a handle on all the raw material needs.
So, that means working with parameter arrays. I need to be able to enter a list of multiple formulae (BOMs) and enter a list of multiple different quantities associated with each different formula. For example, I enter formula1, formula2, formula3, and quantity1, quantity2, quantity3, each of those six data points being unique.
Here is the formula I am using to try to calculate extended quantities for each line item listed for each BOM:
I get this error:
"A loop was evaluated more than the maximum times allowed."
I would really like to solve this and I am not really much of a programmer. Any help would be deeply appreciated.
Richard Jehn
So, that means working with parameter arrays. I need to be able to enter a list of multiple formulae (BOMs) and enter a list of multiple different quantities associated with each different formula. For example, I enter formula1, formula2, formula3, and quantity1, quantity2, quantity3, each of those six data points being unique.
Here is the formula I am using to try to calculate extended quantities for each line item listed for each BOM:
Code:
global numbervar lQty := 1;
global numbervar Demand := 0;
While lQty < count({?Item}) and Demand = 0 Do (
If ({BM00111.ITEMNMBR} = {?Item}[lQty]) then Demand = ({BM00111.Design_Qty}*{?Qty}[lQty]);
lQty = lQty + 1;
If lQty = Count({?Item}) Then Exit While;
);
Demand
"A loop was evaluated more than the maximum times allowed."
I would really like to solve this and I am not really much of a programmer. Any help would be deeply appreciated.
Richard Jehn