This may be very straightforward if you do this with SQL in a commmand table:
select a.Group, a.Section, a.Description,
b.GroupName
from GroupSection a
left outer join
(
select concat( format(b.Group, 0), '. ', a.Description) as GroupName, b.Group
from GroupSection b
where b.Section = 0
) c
on a.Group = b.Group
The concat
may change depending on your database provider. This reflects MySQL. perforing this against a table that reflects your sample data would produce the following:
{GroupSection.Group}|{GroupSection.Section}|{GroupSection.Description} |{GroupSection.GroupName}
3.00 | 0.00 | PRECAST CONCRETE PRODUCT | 3. PRECAST CONCRETE PRODUCT
3.00 | 50.00 | MISC PRECAST CONCRETE PRODUCT | 3. MISC PRECAST CONCRETE PRODUCT
3.00 | 99.00 | *Z* MISC PRECAST CONCRETE PRODUC| 3. *Z* MISC PRECAST CONCRETE PRODUC
4.00 | 0.00 | CEMENT SUPPLIES | 4. CEMENT SUPPLIES
4.00 | 50.00 | MISC CEMENT SUPPLIES | 4. MISC CEMENT SUPPLIES
4.00 | 99.00 | *Z* MISC CEMENT SUPPLIES | 4. *Z* MISC CEMENT SUPPLIES
This can easily be grouped in Crystal to produce your desired results.
BEGIN EDITS:
Check this out. It's a working SQLfiddle using your table structure. Only GroupSection is necessary to accomplish this part, so I ignored the other. You can play around with different queries to see what hapens, but as-is it will pass to Crystal the necessary derived field to group on in Crystal. You'll need to still group on the new field, GroupName, in Crystal.
As for the other tables, you can treat the command table the same way you any other table. Just make sure you add key/linking field to the command if its not there in your mockup.
Here's the fiddle: http://sqlfiddle.com/#!2/aa88d/5/0
and just in case the comments there make it too confusing to see the code, here it is with my annotations stripped out:
SELECT gs2.GroupName,
gs.sGroup, gs.Section, gs.Description
FROM GroupSection gs
left outer join
(
SELECT concat( format(inn.sGroup, 0), '. ', inn.Description) as GroupName, inn.sGroup
FROM GroupSection inn
WHERE inn.Section = 0
) gs2
ON gs.sGroup = gs2.sGroup