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

Passing values from an array to subreports

Status
Not open for further replies.

terrym777

Technical User
Jun 14, 2010
31
0
0
US
Hi, I hope someone can help me figure out how to approach this problem. I have a main report that has one grouping by classname. Currently the report passes one parameter date to 5 subreports. I now need to modify this report by giving the user the option to run this for one day of the week or for an entire week. This is the current layout:

GH1 - Class name
D - suppressed
GF1a - Subreport 1
GF1b - Subreport 2
GF1c - Subreport 3
GF1d - Subreport 4
GF1e - Subreport 5

I have created a stringvar formula DayOrWeek if they selected to run this for a week and it does produce the following result:
9/9/2013, 9/10/2013, 9/11/2013, 9/12/2013, 9/13/2013

So my question is how do I get this report and the 5 subreports to run for 9/9/2013 and then run the entire report and the 5 subreports again for 9/10/2013, etc.

Thanks for your help.
 
Have you tried passing a date range to the sub-report then process the date range through the use of a group that groups by date of one week intervals?
 
Any further suggestions? Basically, I'm trying to get the main report to process all 5 subreports with one date and then repeat the process if the user wants to run the report for a weeks worth of data.
 
Add a Group on the Date field, move the sub-reports to the new Group Footer, and link the sub-reports on the date as well as the client. Array variable avoided.

Cheers
Pete
 
Thank you for replying but I still don't see how doing it this way will work in my case. Let me explain further:

Main Report
GH1 - Class name
D - Suppressed
GF1a - Subreport 1 - Parents report
GF1b - Subreport 2 - Early Attendance report
GF1c - Subreport 3 - Regular Attendance report
GF1d - Subreport 4 - Afternoon Attendance report
GF1e - Subreport 5 - Extended Day Attendance report

Parameters: Site, Date, Class Room
Need to add parameter - Day or Week option whereby the user can still run this for 1 day of the week but mostly they now want to run this report ONCE for each day of the week.

All 5 subreports have to run at the same time for one day of the week and then it needs to loop to run again for the next day. So somehow in the main report I need to pass one date and run all 5 subreports and then I need to pass the next date to all 5 subreports, etc, for the entire week.

The main record selects by checking to see if the parameter date is within a records start and end date range (data field, for example, looks like this: 9/3/2013 - 6/19/2014. So I don't have one field that I can group on for each day of the week equal to a specific date.

Hope this helps to explain it a little more.

Thanks,
Terry
 
I think you are making this unnecessarily complicated. I would use a Date Range Parameter so the user can pick the range.

Then, add the group and do as per my previous suggestion.

Any reason why such an approach won't work?

Pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top