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!

Values from subreport to main report repeated if value 0 2

Status
Not open for further replies.

IceRuby

Technical User
Jan 20, 2004
85
AU
Hi there
I have written a report to display persons (resources) allocated to Orders and how many hours they actually work on Order.
e.g.
Allocated Actual
Hrs Hrs
GH#1 Order No. 12345
GH#2 Resource. RH345 11.00 8.00
RH349 10.00 12.00

I have had to setup a subreport for the actual hours as there may be multiple allocation data entries to single actual date entry and/or reverse (multiple actual hrs data entries to single allocatedion data entry) Appreciate any thoughts of how to get around issues like this as come across problem all the time.

Tables are
Main report:-
Resource - linked to allocations left join
Allocations
O/S Order Header -linked to allocations left join

Subreport:-
Resource - linked to actuals left join
Completed Order Header - linked to actuals left join
Actuals

I am passing the actual values into the main report via a subreport. If the passed actual value from subreport is 0 crystal is not displaying 0 is it displaying the last actual value.

Allocated Actual
Hrs Hrs
GH#1 Order No. 12345
GH#2 Resource. RH345 11.00 8.00
RH349 10.00 12.00
RH448 5.00 0.00**

**0.00 should be displayed but crystal displaying 12.00 (last passed value)
Using a shared number value "ledgertotal" and formula
whileprintingrecords;
shared numbervar ledgertotal placed in GH#2 of report.
Drill down correct displaying actual value of 0.
Using Crystal version 9.0

Appreciate your thoughts, thanks in advance.

 
I would try adding a reset formula in the main report:

whileprintingrecords;
shared numbervar ledgertotal := 0;

I'm not sure about the placement of this in the main report without testing, but I would try GF#2, so that it resets for each new GH#2.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top