Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: How do I?? Array? Post Reply Post New Topic
Author Message
JGARDNER-AIT
Newbie
Newbie
Avatar

Joined: 27 Jan 2010
Location: United States
Online Status: Offline
Posts: 11
Quote JGARDNER-AIT Replybullet Topic: How do I?? Array?
    Posted: 27 Jan 2010 at 9:06am
Hello - Im a new user to this forum and have basic CR skills.
 
I have a report grouped by part number, due date and order number to identify our manufacturing shortages and supply coming in. Our ERP system does not hard allocate therefore we are trying to do this in a CR. I was able to create a running total for every group of part numbers. Im trying to create a formula to identify a negative value in my running total and display its next purchase supply order record and due date to allign in the same row as the part number with the negative running total. Trick is its by part number, therefore I dont want the formula to pull another part numbers supply data. I appologise if I'm not using the correct terminology. But how I would describe in excel, I would use a index/match formula to find the next purchase order. Our shortage report when exported is 32,000 lines long.
 
If you scroll down I pasted in an example, but there is a huge gap of spacing to the bottom of the page.
 
Anyones help would be greatly appreciated.
 



















































































































































Column Letters: D J P K L M V W
Column PrtNum OrderNUm DueDate DueQty OnHand RunTTL SupplyOrder# SupplyOrderDate
Shortage 123456 500 1/25/2010 -1 2 1 Ok Ok
Shortage 123456 501 1/26/2010 -3 -2 700 1/28/2010
Shortage 123456 502 1/27/2010 -2 -4 700 1/28/2010
Supply 123456 700 1/28/2010 5 1 No Data Since it’s a Supply Row
Shortage 123456 503 1/30/2010 -3 -2 N/A N/A
Shortage 999999 505 1/25/2010 -10 1 -9 715 1/28/2010
Shortage 999999 506 1/26/2010 -3 -12 715 1/28/2010
Shortage 999999 507 1/27/2010 -10 -22 716 1/28/2010
Supply 999999 715 1/28/2010 20 -2 716 1/28/2010
Shortage 999999 509 1/30/2010 -3 -5 No Data Since it’s a Supply Row
Shortage 999999 515 2/5/2010 -20 -25 716 1/28/2010
Supply 999999 716 2/5/2010 30 5 No Data Since it’s a Supply Row
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 01 Feb 2010 at 1:37pm

you probably can't....  well... it won't be pretty or efficent, but this is what I would do.

Create a subreport to get the next delivery for the part, given the date of the present row.  Create a formula to give your running total, and when it is negative, you can use the value from the subreport, and get the next one (it might be the same)...probably a more efficent method would be to run the subreport once per group and return an array of dates (through a shared array) and then when your formula returns a negative quantity, search the array for the first that works.
 
it's a general outline, but hopefully it is enough to get you started.
 
HTH
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.047 seconds.