Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Name Variable using Field Value

Status
Not open for further replies.

melven

MIS
Apr 7, 2011
11
US
Hi,

Can I name a variable using a field value? How do I do this?

Thanks,
Mel

CR Developer 2008 v12

CR Developer V 12.2, .NET
 
Example -

I have open order data listed by date needed.

Week Order Product Quantity
1 303 ABC 10
1 313 BLOCK 22
1 323 HEAD 15
2 333 ABC 22
2 343 PIPE 13
3 353 PISTON 55
3 363 ABC 40
3 373 ELBOW 4

And I have inventory data listed by product in the following format.

Product Inventory Quantity
ABC WIP 5
ABC Outside 1
ABC Hold 0
ABC FG 10

I add those up in the report, Total=16.

Now as the report populates, I need to subtract out inventory from the product orders. In week 1 subtract 10 from inventory 16 leaving 6. In week 2 subtract 6 from 22. Week 3 should show the full 40.

The way I have in mind to do this is create a variable when each order comes up, name it after the product, and compare product and variable names at each order so I can subtract out inventory when needed.

Can I use the Product field value to name a variable?

Thanks,
Mel



CR Developer V 12.2, .NET
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top