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!

Passing Parameters From Main to Subreport?

Status
Not open for further replies.

vikoch

Programmer
Feb 6, 2008
38
US
I have a report-

Main report is create for students:
Creates exam questions sheet.
Select question#, question, multiple_answers,
from tbl1
based on domain(4 domains)(parameter fields)
example: selecting domain 1 - 5 questions
domain 2 - 10 questions
domain 3 - 10 questions
domain 4 - 7 questions
I select the questions randomly.

and I would like to create a

Subreport for instructors:
Creates exam answer sheet
Select question#, correct_answer
from tbl1

I would like to pass the parameters from main report to subreport and be able to get the same questions and correct answers as in the main report.

May be, there is better way to separate the correct answer from the "exam questions sheet" that students cannot see the answers and instructors can.

Thanks.
 
This can be done fairly easily in the Subreport Links. Set up the link by selecting the question# field from the subreport and link it to the parameter from the main report.

If it's more complicated than a simple field=parameter relationship, you can also get the parameters into the subreport by setting up "dummy" links with each of your parameters. This will create the parameter in the subreport. Then go to the Select Expert in the subreport and delete all of the dummy links from the formula.

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.
 
Thank you... but it did not work.
Is there any other idea?
 
vikoch,

Instead of saying something doesn't work, you should explain why. In particular, you could show us the content of your subreport record selection formula.

You also need to tell us in what section the subreport is located.

Also, specifically identify the actual parameters you are using in the main report.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top