VB.NET 2003 - Crystal Report - select records to be totaled

I have a report that sorts and groups the data by a job number and job type.  After each change in group a total line is printed.  What I would like to do is have a total for each job type, placed at the end of the report.  I tried using a formula field but I am getting zeros.  Below is the formula I have been playing with, however, it does not work

Shared numbervar prod;
if {jobhead.DETLSTEPTYPE} = "Production" then
sum({jobhead.DETLSTEPEXTTIME})

robertjmackayAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

PockyMasterCommented:
You can create  new value (calculated) which exists for each group, where in you multiply the {jobhead.DETLSTEPEXTTIME} with 1 if DETLSTEPTYPE = production or with 0 if isn't.

Then just sum that value.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
robertjmackayAuthor Commented:
worked, I added the supress property on the detail and worked great
 Thanks
Rob mackay
0
PockyMasterCommented:
You're welcome!
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

robertjmackayAuthor Commented:
Is there a way I can have this calculate on the detail liner without actually placing the field there.  The detail line is full and in order to put the field there, I had to goto a second line, and adding spaces between the details
0
PockyMasterCommented:
I have no way to test it here at the moment, but you can try it without adding the field. It might just work. But you can just suppress the field , or add it to a detail line and suppress the whole line's output.
0
robertjmackayAuthor Commented:
I didn;t have to put it on thde detail line at all.  Thanks again .. .well done
0
PockyMasterCommented:
No problem :D
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.