Quantcast
Channel: Sage 100
Viewing all articles
Browse latest Browse all 36993

Forum Post: Crystal Report Suddenly Slowed to a crawl

$
0
0
I have a Crystal Report that is linking CI_Item, to IM_ItemWarehouse and also linking to IM_TransactionHistory all with Inner Joins. The criteria are the following:   {IM_ItemWarehouse.WarehouseCode} = "003" and {IM_ItemTransactionHistory.TransactionDate} in CurrentDate-92 to CurrentDate-1 and {IM_ItemTransactionHistory.TransactionCode} in ["WI", "BI", "SO"] and {CI_Item.DefaultWarehouseCode} = "003" and {CI_Item.BuyerCode} = {?Buyer/Planner} When I run this report, it runs in about 1-2 minutes, but if I change the select criteria to select items where the Buyer Code OR the Planner Code are equal to the user supplied parameter, the report doesn't work right or slows to a crawl. Here is what I tried: {IM_ItemWarehouse.WarehouseCode} = "003" and {IM_ItemTransactionHistory.TransactionDate} in CurrentDate-92 to CurrentDate-1 and {IM_ItemTransactionHistory.TransactionCode} in ["WI", "BI", "SO"] and {CI_Item.DefaultWarehouseCode} = "003" and {CI_Item.BuyerCode} = {?Buyer/Planner} or {IM_ItemWarehouse.WarehouseCode} = "003" and {IM_ItemTransactionHistory.TransactionDate} in CurrentDate-92 to CurrentDate-1 and {IM_ItemTransactionHistory.TransactionCode} in ["WI", "BI", "SO"] and {CI_Item.DefaultWarehouseCode} = "003" and {CI_Item.PlannerCode} = {?Buyer/Planner} This criteria just doesn't work.  It shows the items where the Buyer Code is equal to the parameter field but not the Planner Code.  If I put the Planner Code before the OR statement, then the items where the Planner Code appear but not the Buyer Code. I created a formula field that looks at the buyer code and planner code and combines them:  If ProcurementType = :"B" then BuyerCode Else PlannerCode and then put that criteria in the report and ran it and it does work, but it was taking more than 90 minutes to run.  Why is this the case? Thank you,

Viewing all articles
Browse latest Browse all 36993

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>