INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

#### Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

# pass values between groups

## pass values between groups

(OP)
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?

David.

### RE: pass values between groups

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

### RE: pass values between groups

(OP)
Hi LB,

The main job and sub job number is a different field...does that make a difference?

### RE: pass values between groups

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

#### Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

#### Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Close Box

# Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!