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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pass values between groups

Status
Not open for further replies.

djieon

Technical User
Aug 19, 2008
107
0
0
GB
Hi all,

I have four pieces of data

Main Job Number
Sub Job Number
Estimated Value
Invoiced Value

So the main job number always ends in '0' (EG 123456/0) and on the main job the estimated value is stored

However all invoices are raised on the sub jobs... (EG 123456/1, 123456/2 etc...)

I am trying to write a crystal that looks the estimated values versus the running total of the invoices values, however I am struggling because the main job never has an invoice raised on it I cant get the main job estimated total and the sum of all invoices raised to date to appear on the same line or in the same group etc...

Can anyone help?

thanks in advance

David.
 
I'm assuming there is one field used for both main and sub jobs, and I'll call it {table.jobno}. Create a formula like this and insert a group on it:

//{@Job}:
Left({table.jobno},instr({table.jobno},"/")-1)

Next create a formula like this:

//{@Estimated Cost}:
Stringvar x := {table.jobno};
If val(mid(x,instr(x,"/")+1))=0 then
{table.amt}

//{@Invoice Amt}:
If val(mid(x,instr(x,"/")+1))>0 then
{table.amt}

Insert sums on each formula at the group level.

-LB
 
Hi LB,

The main job and sub job number is a different field...does that make a difference?
 
Try grouping the main job number and ignore the formulas. I think the sub job numbers will all appear within that group. Then just insert a sum on the invoiced amount at the group level. Place the estimated field in the group section, too. Then suppress the details.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top