Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Keeping track of multiple variables through report Post Reply Post New Topic
Author Message
cmross
Newbie
Newbie


Joined: 05 Nov 2014
Online Status: Offline
Posts: 10
Quote cmross Replybullet Topic: Keeping track of multiple variables through report
    Posted: 08 Jul 2015 at 9:15am
I have a report that is broken down into multiple manufacturing orders per project by priority, and those manufacturing orders list the parts that are needed to be pulled from inventory. Parts can be asked for in multiple manufacturing orders, but not every manufacturing order is the same. Each part has an on-hand quantity associated with it and I'd like to figure out a way to subtract the quantity needed from the on hand quantity and have it trickle down the report. This way, I can tell if I have enough parts on hand to pull for EVERYTHING on the manufacturing orders. I'll try to show an example below:

For simplicity, all parts have a starting on hand quantity of 6 (this would be a field from the database per part):

{JOB}      {PART}    {NEED} {LEFTOVER}
AAAAAA     12345       2        4
AAAAAA     23456       1        5
AAAAAA     34567       5        1
BBBBBB     01234       7        -1
BBBBBB     12345       3        1
BBBBBB     56789       1        5
CCCCCC     12345       1        0
CCCCCC     34567       6        -5
CCCCCC     56789       4        1

(Sorry if it's not lined up right, but hopefully the concept is there). So then I could filter the report such that it shows I can pull all of the parts for job AAAAAA, but not BBBBBB or CCCCCC because there wouldn't be enough of ALL parts leftover once I pulled for AAAAAA. What I can't figure out is how to start with an on hand quantity per part, subtract the quantity needed per part and then bring that leftover quantity down to the next manufacturing order instead of the original quantity on hand.

I've tried making a subreport grouped by part with the manufacturing jobs in the details and using a variable to subtract it out, but then when I link it to my main report using the manufacturing order, it always reverts back to the original quantity on hand and not the quantity from the previous manufacturing order. I dabbled a little bit with an array (not totally familiar with how to use these). Since Crystal doesn't do multi-dimensional arrays, I tried to make a string out of the part and the quantity to see if I could keep track of it that way throughout the report, but when I try to drag a field into the array it gives me an error: "The result of a formula cannot be an array".

I'm not sure if I'm doing something wrong or thinking about this wrong, but any input would be greatly appreciated.
IP IP Logged
cmross
Newbie
Newbie


Joined: 05 Nov 2014
Online Status: Offline
Posts: 10
Quote cmross Replybullet Posted: 14 Jul 2015 at 2:56am
Anybody have any ideas, please?
IP IP Logged
otto
Groupie
Groupie


Joined: 17 Mar 2014
Online Status: Offline
Posts: 53
Quote otto Replybullet Posted: 15 Jul 2015 at 6:02am
could you please post your desire result layout?
IP IP Logged
cmross
Newbie
Newbie


Joined: 05 Nov 2014
Online Status: Offline
Posts: 10
Quote cmross Replybullet Posted: 15 Jul 2015 at 9:17am
Basically what I had shown in my original post, however I would just filter/conditional suppress the section/details of the jobs that I can't pull from (in this example, I would show AAAAAA and hide BBBBBB and CCCCCC). I just need to know if there is a way to carry values through the report that are linked to values in a field.
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.016 seconds.