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

Subreport 9 shared variable in a group picking incorrect value 1

Status
Not open for further replies.

crzycrystlgrl

Technical User
Nov 6, 2004
20
US
Hi. I am new to this site. Cheers to anyone reading this post...
Crystal 9...Using running totals in subreport
and then declaring a shared variable in the subreport (the running total field is placed in a group)

ex.
WhilePrintingRecords;
Shared CurrencyVar IndyChargesDOS;
IndyChargesDOS := {#IndyByDOS}

when referenced in the same group in the main report...picks up the last running total from the subreport and repeats it. I made a section b (which is where the shared variable sits + the subreport is in section a....

Any suggestions would be greatly appreaciated...
thanks
-Cynthia
 
Create a formula in the main report that resets the shared variable, and place it in a section above the subreport:

whileprintingrecords;
Shared CurrencyVar IndyChargesDOS := 0;

-LB
 
Thanks lbass...but I forgot to mention that I had already done that and it doesn't seem to work...

I think crystal has problems determining which variable from my groups to place in the main reports group...

The only thing I can think of is writing a formula which is specific to a particular 2 groups so it can be identified in the main report in correlation with the same two groups....
only thing is this is a ton of formulas and I would have to believe I am either doing something wrong or don't know of another way....?
Hope all of that made sense..
thanks again
Cynthia
 
You should be linking the subreport to the main report on the main report group field. Go to edit->subreport links-> and move the group field from the main report to the right. I'm assuming that the subreport is using a running total for the same group.

-LB
 
LB-
you are fantastic! I knew I was missing something...!
I really appreaciate your answer and you have saved me hours of unecessary work!!
_Cynthia
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top