If I have an item number 0126015500 and it has sub-assembly parts as 0126015500-001 and 0126015500-002. Is there a way to group by 0126015500 with the sub assembly parts below?
Create formula and group on that (not as efficent performance wise, but not terrible). If you find that you are taking a performance hit .. then we can explore a sql expression.
There are different options for this, If your item number field varies in length then we will have to take another path...
Now, first the Crystal formula:
{Item.Item} [1 to 10]
//extracts first 10 characters of the field
//new formula
//if item is of variable length
numbervar p := if InStr({Item.Item},'-') = 0 then length({Item.Item})
else InStr({Incident.Subject ID},'-')-1 ;
I have a similar problem to Laurie, but in my case, the sub assembly parts are generated by a stored procedure in SQL Server. We are using Crystal 9. What I'm trying to accomplish is have a group footer for each item that has a total of the cost for each level of that item.
Our ERP software already has a costed bill of materials report that outputs the item and all the sub assemblies that go into it, but does not group them with within Crystal. The output is similar to below:
level Item#
DetailA 0 PartA-main item
DetailA 1 PartA sub assembly #1
DetailA 1 PartA sub assembly #2
DetailA 2 sub assembly for preceding assembly
DetailA 1 PartA sub assembly #3
DetailA 0 PartB-main item
DetailA 1 PartB sub assembly #1
DetailA 1 PartB sub assembly #2
DetailA 2 sub assembly for preceding assembly
....etc.
The level and item number is a string that is created by the stored procedure and output into crystal. It is also only one field.
The report containcs the following fields: description, source(purchased or manufactured), quantity, lot size, unit of measure, material cost, labor cost, overhead cost and outside cost.
The part numbers aren't any sequence where I can group easily...I've been able to get a total for the level for each individual item, but haven't yet figured out a way to sum them....I used a formula to grab the material, labor, overhead, and outside cost numbers depending on what level the item is. An example of the formula is:
if ({Rpt_IndentedCostedBillofMaterialSP;1.indenture}) startswith " 0"
then {Rpt_IndentedCostedBillofMaterialSP;1.tOvhd}
level item material overhead
labor outside
0 701632-ff2
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.