ssrs query, subreport situation

I'm attempting to link an embedded subreport to my main report.  the table which the subreport comes from is connected via a relation table to the mortgage table which is my main report.   I'm attempting to use a parameter on the subreport of mortgage.loannumber which is connected to the relation table and then in the relation table, the nameaddrcd is connected to the nameaddr.nameaddrcr table.  Hoepfully I explained that well.  I keep getting errors when i run it, so I'm trying to create a third dataset and my code is.

SELECT loannumber
FROM mortgage inner join
             relation ON mortgage.loannumber = relation.loannumber AND nameaddr.nameaddrcd =  relation.nameaddrcd

Hopefully this is possible and i'm somewhat going in the right direction.
thanks and have a good one.

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.

The subreport is really just another report that runs with the first report.
Most of the time you just pass a parameter from the main report to the subreport and then it runs using your parameters that you passed. Ideally if you can use a Stored Procedure to do all the work on the SQL side then the reports just print out the answers.
What are you looking for in your question above? I am not sure of what you need from the EE group.
tomscottAuthor Commented:
How do I make the parameter roll over to the subreport. I started off trying that but it keep erroring. Thanks
This page should tell you what you nned to know about passing the parameter to the subreport.

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
CompTIA Security+

Learn the essential functions of CompTIA Security+, which establishes the core knowledge required of any cybersecurity role and leads professionals into intermediate-level cybersecurity jobs.

I dont know much about ssrs query. But there will be a way of passing parameter while configuring report. Or you may create a link with query parmaters like ?loannumber=23
Look in the subreport properties on the main report. Ther is a parameters property there.
Click and add your parameter there that is going to be passed to from the main report
tomscottAuthor Commented:
while it helped me get closer to a solution, I still am having problems with what I'm trying to do, I think it might be my fault in the way I'm trying to explain what I'm trying to accomplish.
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

From novice to tech pro — start learning today.