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!

Subreprot repeating

Status
Not open for further replies.

maengler2000

Technical User
Feb 2, 2012
7
US
I am using CRXI with SQL databases.

I have a report where the user chooses which department(s) to report on.

I pass these departments to the subreport.

My report is accurate with correct information however it repeats for as many departments I have passed.

Example.

They choose to report on dept 1,2,3 and 4.

I receive
Dept 1
info info info
Dept 2
info info info
Dept 3
info info info
Dept 4
info info info

Then this information repeats 4 times.

Based on reading different suggestions, I have a group inthe main report on the depatment and have placed the subreport into the group footer. Also, I have the subreport grouped by department.

Any suggestions on how to receive the data only once.

ME
 
Are you passing all four choices to the subreport? If the subreport is in the group footer you would typically send only the value for that group, and the subreport would not need groups because it would only run for one department.
 
Try linking the sub to the main report on the group field. (Edit->subreport links).

-LB
 
I should have included this in the original. The subreport is linked to the main report on the group field.

I do send all the departments to report on to the subreport. If I only send one department it works fine but the request is to be able to report on multiple departments.

 
maengler2000, just what are you doing?

If I were doing it, I'd use Edit > Subreport Links to send the department code. I would then check in the subreport selection (Reports > Selection > Record) to confirm that the linked Department Code was being used to select. Add such a selection if it were missing or invalid. Maybe check the SQL (visible under Database) if it were still failing.

Have you done this? If not, try it.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top