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!

Shared Variables & Subreport

Status
Not open for further replies.

ChrisH1

IS-IT--Management
Joined
May 23, 2006
Messages
36
Location
GB
I have a subreport with the following formula

"whileprintingrecords;
Shared CurrencyVar myTotal : = sum ({cash recieved}, {SLPAYHST.JOB})"

I then placed the following formula in the main report within RFb (the subreport is in GF2a)

"whileprintingrecords;
Shared CurrencyVar myTotal;
myTotal"

I want the RFb to show the grand total cash recieved. However, it currently displays the total for the last record from GF2a.

Can anyone highlight what I am doing wrong (first time I have used variables)

Im using CV8
 
Change the subreport formula to:

whileprintingrecords;
Shared CurrencyVar myTotal : = sum ({cash recieved})

You were stating to return the sum for the group.

-k
 
Or if the links are somehow filtering, you'll want:

whileprintingrecords;
Shared CurrencyVar myTotal : = MyTotal+sum ({cash recieved}, {SLPAYHST.JOB})

-k
 

Thanks for the response.

The latter option fixed the problem.

Cheers for the help
 

I have just exported this to excel and have found that the cash recieved total doubles in excel but looks fine in crystal.

Any ideas ?
 
Ugh...you're not the first to have this sort of problem.

I'd apply the service pack first:


If you have CR 8 you're probably out of luck, they only go back to 8.5

If you're certain that it's always doubling you can obviously use a parmaeter to determine that it's for export and divide by 2 accordingly.

Since it works in Crystal, you apparently have exposed an export bug.

-k
 
If you're certain that it's always doubling you can obviously use a parmaeter to determine that it's for export and divide by 2 accordingly."

Could you please advise how I would achieve the above.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top