I hope someone can help me, I have created a BAQ to calculate the profit of sales orders based on the part cost. I am able to get all of the information required until I add a calculated field for percent. When I test, only some results come back and the grid turns yellow.
Any help is appreciated! Thanks in advance.
Jennifer
Are you checking for possible divide by zero errors?
Change the field that calculates the percent from (in the very pseudo code …) (Price - Cost) / Cost
to (case when cost = 0 then 0 else (Price - Cost) / Cost end)
If the analyze button doesn’t tell you anything you can find the SQL error results in the event viewer on the server. My guess is that you are trying to divide by zero somewhere along the way. To verify, create a CASE statement that checks for the price to not be zero before you do your division.
If you post your BAQ script on the front of your BAQ screen the code can be analyzed further.