Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Grouping by Array with Subreports Post Reply Post New Topic
Author Message
madwin
Newbie
Newbie


Joined: 23 Aug 2013
Online Status: Offline
Posts: 4
Quote madwin Replybullet Topic: Grouping by Array with Subreports
     Posted: 23 Aug 2013 at 6:41am

Good day,

 I’ll do my best to explain things, but I can also provide more details based on the questions asked in return.  I appreciate your wisdom.

We have an existing class attendance report that currently runs for a single day, however, we want to adjust the report to print for a week at a time, but have the printouts maintain their daily format.  The report gives a listing of students grouped by Preschool Site and then Classroom, and each Classroom group has multiple sub-reports (Early Drop-Off Students, Regular Day Students, Extended Day Students, etc.), with the result being a page (or two) per classroom per date.  The print job would need to be in the order:

Class A Monday

Class A Tuesday

Class A Wednesday

Class A Thursday

Class A Friday

Class B Monday

Class B Tuesday

Etc.

I expect that to do this we would need a new Date group, so that the groups would be: Site -> Class Room -> Date.

We have been looking into Arrays, in an attempt to run the report for each day of the week in a single run.

My main question at this time: can anyone confirm that Crystal will allow an array that supplies information to a group (not the top group), and also allow that array to feed into multiple sub-reports?  The array would always have 5 dates.

Thank you,

Matt

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 23 Aug 2013 at 7:44am
i think you are over complicating your process
I am guessing you have a select criteria in your current report for some ate field = today and you are apssing some linked fields to the subreports to limit the data respectively but youa re also using a similar some date field = today in the sub report as well.
Is this guess accurate?
IP IP Logged
madwin
Newbie
Newbie


Joined: 23 Aug 2013
Online Status: Offline
Posts: 4
Quote madwin Replybullet Posted: 23 Aug 2013 at 8:11am
Something to that effect.  The main report has parameters for 'Date', 'Preschool Site', and 'Classroom' (One or All), and these are passed to the 5 subreports, and then the subreports limit the data based on the purpose of the subreport (Early Drop Off, Extended Day, etc.).  So, (assuming I understand things, which is not a great assumption), passing a date array directly to the subreports would have the subreports fire off 5 times on the same page, whereas I need each date of the array to be passed individually after a group change on date (with the date group occurring after the Classroom group).

I'll not refute your assertion that we overcomplicated things, but it worked up until we decided on this change.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 23 Aug 2013 at 8:23am

Sorry , the complicaed part was in the fix not the current report :)

in the main report change your grouping to include date at the top level. Change the parameter to a datre range.
Change the subreports to not use the main report parameter but rather link it on the date field inside the group
IP IP Logged
madwin
Newbie
Newbie


Joined: 23 Aug 2013
Online Status: Offline
Posts: 4
Quote madwin Replybullet Posted: 23 Aug 2013 at 9:24am
If Date is the top level grouping, how would I get the printouts to be grouped by classroom first?  Classroom A Monday, Classroom A Tuesday...


IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 23 Aug 2013 at 9:39am

Because you should have a classroom for each day. I assume you have some sort of calendar that is joined the classroom. or is this not the case?

IP IP Logged
madwin
Newbie
Newbie


Joined: 23 Aug 2013
Online Status: Offline
Posts: 4
Quote madwin Replybullet Posted: 23 Aug 2013 at 9:45am
I'm not following.  If the top level group is Date, then I'd expect the printout order would have to be, Class A Monday, Class B Monday, Class C Monday..., whereas we need all the Class A days (Mon - Fri), then all the Class B days.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 23 Aug 2013 at 9:48am
sorry misread your other post to want all of one days with classroom.
make it the second group uder classroom
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum