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

Summary Question

Status
Not open for further replies.

jilllawson

Technical User
Joined
Oct 19, 2004
Messages
8
Location
US
I am using Crystal Version 9 with MAS90.

I have a report on billable hours per engineer, it also includes a subreport for that engineers non-billable hours.

It looks like this:
Engineer 1
Billable:
Enterprise Enginering
01/01/05 Corporation A 4.00 780.00
01/10/05 Corporation 2.00 390.00
01/31/05 Corporation C 4.00 780.00

Advanced Network Engineering
01/01/05 Corporation D 1.00 150.00
01/10/05 Corporation E 1.00 150.00
01/31/05 Corporation A 0.25 37.50

TOTAL HOURS: 12.25


Then the subreport looks like the above, but reports on NON-BILLABLE hours for the selected engineer.

My question is, is it possible to add the total hours from the billable report to the total hours on the non-billable report (a.k.a. my subreport)? So I can get a grand total of hours?

Thanks!
 
You can pass values from main reports to subreports and vice-versa using a shared variable.

An example would be the following:

Main Report (assumed to be grouped by engineer), in the
Engineer Group place a formula such as:

shared numbervar Billable:=sum({table.billablehours},{table.engineer})

Now in the subreport, providing it's placed after this formula, you can reference the value in the subreport using:

shared numbervar Billable;
sum({subreporttable.nonbillable},{{subreporttable.engineer})+Billable

Again I'm assuming that the subreport is grouped on the engineer, if not, and you're linking by engineeer instead, it's be something like:

shared numbervar Billable;
sum({subreporttable.nonbillable})+Billable

This should give you the basics.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top