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

Subrpt data added into the Main rpt only main rpt data is for prev ee

Status
Not open for further replies.

scotton

Technical User
Jun 20, 2005
27
US
The crystal report is a letter to all ee's showing their total compensation package. The first page of the letter is the main report and the two subrpts are for the retirement plans and benefit plans. I created subformula's in both subrpts and main formula's in the main report. The main formula's work except they show the data for the previous employee and I don't understand why because they are displayed on the same group footer as the two subreports. Here's my main formula's:
//@MainFormula
//RetireTTL
WhilePrintingRecords;
Shared CurrencyVar RetireTTL;
RetireTTL

//@MainFormula2
//Returns the value that was stored in the shared currency variable called
//PayTTL in the subreport
WhilePrintingRecords;
Shared CurrencyVar PayTTL;
PayTTL

Any idea why the data is showing the previous employees retirement and benefit contribution totals?

TIA,

Sarah
 
Shared variables can only be referenced in the section following the one containing the subs, so add a footer_a and put the subs there, and then reference them in footer_b.

-LB
 
That worked! Now the group footer b is displaying at the top of the next page! How do I get it to display correctly? I am playing around with the section expert and nothing's working. Ugh.
Thank you for your help, I'm sure I can figure out how to make it look "pretty".

Thank you lbass!
 
Where do you want the GFb to display? What do you think is causing it to move to the next page? Is the sub the problem? If you don't need it to display, there is a way to make it disappear.

You can also add "keep together" in the section expert to the higher order Group Footer Section (above GF_a) if the issue is that GF_b should be on the same page as GF_a.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top