Jump to content

Recommended Posts

Posted

I am running a report based on pupils on roll, which pulls back the emails for parents/carers. In the output, it always puts the priority 2 email first, and then the priority 1. I can't figure out a way to sort it so that priority 1 shows first - it doesn't offer up priority as a sort field, even though it's one of the fields I pull for the query. Is there a way?

 

 

Capture0.JPG

 

Capture.JPG

Posted

I'm not sure that report makes sense, does it? You are fetching all the contacts, then running a subreport of each student attached to each contact, so a student with a Mother, Father and an Uncle will appear on the report three times already and then for each student you are getting their parents priority.

 

If you make a Student report and then have a contacts subreport, each student will be shown once and each of their contacts will be listed once (there will be duplicates if the student has a sibling with the same parents). You can then order by priority in the contacts subreport. Something like this...

 

sims_report.jpg

  • Thanks 1
Posted

That is working better, thank you! Priority 1 is appearing first, which is helpful.

 

 

However, I have added filters for FSM = Y, priority = 1, parental responsability = Y, and email = not null.

 

Capture3.JPG

 

 

The FSM filter is working, it's pulling back rows that fail the other filter rules:

 

Capture4.JPG

 

 

Any idea why?

Posted

I think this is because you are asking for students who are eligible for FSM (which isn't all students, so this bit appears to work) where contacts exist, parental responsibility is true, priority is 1 and the email address is not null. If you think about it, ALL (most) students will have at least one contact that has PR, has P1 and has an email address. Your filter as it stands, IS working, it's just returning all (most) of your students because they all (most) meet that criteria.

 

What you probably want is to filter on the Contacts rather than the Students. Remove the current filter except the FSM part, go back one step to the 'Select Data Fields' part of Report Designer, click on 'Contacts' and then click on this little fella... define_sims_sub_report.jpg and set your filter up against the Contacts rather than the Students. You probably want to untick 'Include records with no such Contact' as well so that it only returns students that meet the Contact criteria, unless you want to identify the students who don't meet that criteria too.

 

Does that make sense?

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...