Crystal Reports SubReport Placement

I have a subreport that through a series of variables and formulas is performing a vlookup of sorts.  It's working great - EXCEPT - due to the placement of the subreport, my final column is pulling it's value from the subreport below it.

So, looking at the screenshot attached , the column CRU EFF is looking into the subreport.  Based on the date in Eff M-YY, it's pulling the matching record for that date (through variables and record selection in the subreport).  It then looks at the material type in cru and pulling the corresponding index number from the subreport  data table.  First group of data should be cru-CRU HR, eff m-yy, 10-2014, CRU EFF, 32.55
What I'm seeing is that the second row of records on my main report is pulling the data from the subreport above it.  It should be pulling it from the one directly below it.  It's very clear what it's doing when you look at the third set of records.  Based on the date of 1-2015 and cru of CRU GV, it should be populating 35.80 on column CRU EFF - instead it's grabbing the CRU GV pricing from the subreport occurrence above it.
I've shuffled this subreport in every possible area of the report, but everywhere else only pulls records corresponding to the first record (dated 10-2014).    I've even tried sticking it in the details section right next to the CRU EFF field to see what I get - still doesn't work.
Any suggestions are greatly appreciated!

Tina KSystems SpecialistAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Tina KSystems SpecialistAuthor Commented:
Never mind - my light bulb came on.  I created a details b section and moved all my data fields there.  Moved the subreport to details a.  Works like a charm.  Can't believe I struggled with that all morning.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
As way of an explanation.

Crystal uses a multiple pass method for rendering the report.  Subreports are rendered in the last pass through the report and are the last things evaluated in the section.  Therefore the values returned from the subreport are NOT available until the section after the subreport.

Tina KSystems SpecialistAuthor Commented:
Subreport must be positioned to run prior to details of main report being populated due to needing values assigned to variables.  Inserting an additional detail section and inserting the subreport in details A solves the problem, along with specifying that the variable values are assigned 'while printing records'.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.