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

Dynamic Passing Variables to Subreport???

Status
Not open for further replies.

jazerr

Programmer
Dec 13, 2000
152
US
I am in CR8 MSSQL 2000...

If there are 20 students in a school...


The main report is based on a parameter that is defined as the school code. It returns data for any person assigned to that school, including their unique id's (personcode).

I need to display a subreport for each student.

I have the report Grouped by personcode.

I have the subreport linked from the Personcode to the same field in the subreport.

The report returns the correct data on the main report, but is only displaying data in the subreport for one of the students.

Help...
 
Is the subreport located in the group header or group footer? It should be.

Also, are you sure that you need a subreport?
Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
The subreport is in the Group header, and yes, I am absolutely sure I need a subreport...
 
Do you mean that subreport print mulitple times, once for each student? And prints the same student's data over and over each time?

Which student does it print, the first in the report? First in the group? Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Ok, I should give a bit more info...

I am trying to generate a report for all the students in a given school. So the only variable I am passing to the report is a school code (I can only pass one into the report because we are exporting as PDF, and it won't reliably accept more than one variable/parameter).

I want the report to display a multiple record subreport once for each student. The main report needs to feed the parameter to the subreport for each record in the main report.

Currently the main report displays the correct data for as many students as are in the school, so thats good. But the subreport is only displaying data for the first student in the main report, and it only displays once...thanks...
 
This is what I would expect if the subreport were in the REPORT header as opposed to the GROUP header.

If the subreport is located in the group header, than it should print once for every group in the main report.
Are you sure the subreport is located in the Group header?
What is the group field of this group header?
How many times does this group header print in the main report? Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top