mbyrew Posted September 1, 2009 Posted September 1, 2009 I have a report that informs 'Student Contacts' of their ePortal usernames and passwords if they have been granted ePortal access. When run this report generates multiple copies of letters for Student Contacts who are linked with more than one Student. Does anyone know of a way to use the filters to restrict the return to a single contact? I have used the filter (Stucontact.Eportal='Y') which filters the letters to Student Contacts with ePortal access but this does not resolve the multiple copy issue. I have also tried to use this SQL extract (select DISTINCT ContactId from nsturelcontacts where setid='2009/2010' and eportal='Y') but this also fails to limit the returns. Any clues from anyone?
michael2k6 Posted September 1, 2009 Posted September 1, 2009 Hi, It sounds to me like you've got the same contact in there several times? Otherwise, what is the object type of the report? Sounds like you've got the object type set as student and you need it set to contact. If the object type is of student you'll get one report per student, or depending how you've set it up, one per student, per contact. If the type is of contact, providing the contact is only existing in the database once, it will only give you one page per contact. It is very common that a contact will exist in a database multiple times. Each contact has a unique ID which isn't on the student window. So if you enter a contact for a student and then enter the contact for their sister, for example, you'll have created two. The correct way to do this is to create a contact once, then in the student window on the contacts tab, click select, and choose the contact from the list. N.B - if it's a sibling or relative in a new years intake, check the form you've just recieved from the parent is the same as the details on the system - the form might contain newer information. Forgive me if you're already doing all this. If you don't know the object type of the report, you can either tell by looking at the reporting tree, or go to reports, reports, click advanced, view all reports, and then sort it by name, find the report and you will be able to view the object type. If you give me that information and attach the report you're using, i'll make one that works and attach one in return (if i can!). All the best Mic @ Serco
powdarrmonkey Posted September 1, 2009 Posted September 1, 2009 I have this problem but because we work in batches, I just weed out the duplicates. If you solve it, I'd be interested to know how - PM me if you don't mind. Thanks.
mbyrew Posted September 2, 2009 Author Posted September 2, 2009 Mic @ Serco wrote the following:- (please see my comments in green) Hi, It sounds to me like you've got the same contact in there several times? On some occasions yes this is true. The same contact will be present but with a different ContactID. However, when displaying the Id column in the Data window the same Row is repeated. Otherwise, what is the object type of the report? The Object Type is Student Contact Sounds like you've got the object type set as student and you need it set to contact. If the object type is of student you'll get one report per student, or depending how you've set it up, one per student, per contact. If the type is of contact, providing the contact is only existing in the database once, it will only give you one page per contact. A SQL query of teh current dataset reveals only a single instance of each ContactId. It is very common that a contact will exist in a database multiple times. Each contact has a unique ID which isn't on the student window. So if you enter a contact for a student and then enter the contact for their sister, for example, you'll have created two. The correct way to do this is to create a contact once, then in the student window on the contacts tab, click select, and choose the contact from the list. N.B - if it's a sibling or relative in a new years intake, check the form you've just recieved from the parent is the same as the details on the system - the form might contain newer information. This is always a big job to ensure that Sibling links are correct and some errors may appear, but I don't think that this is the case here. Forgive me if you're already doing all this. No problem - appreciate the help. If you don't know the object type of the report, you can either tell by looking at the reporting tree, or go to reports, reports, click advanced, view all reports, and then sort it by name, find the report and you will be able to view the object type. If you give me that information and attach the report you're using, i'll make one that works and attach one in return (if i can!). I'll include the Report in this reply. (The extension has been changed from .rp to .txt to allow upload.) Regards Martin All the best Mic @ SercoePortal Contact Letter.txt
michael2k6 Posted September 2, 2009 Posted September 2, 2009 Martin, Thanks for the reply. I'll have a look either this evening or tomorrow evening (i'll avoid doing it during the day while i'm working as it's not taken the propper support channel). As soon as i've had a look and come up with an answer i'll post back. Mic
mbyrew Posted September 2, 2009 Author Posted September 2, 2009 Thanks Mic. FYI, it has been logged on the h/d and currently has a status of being worked on. I had a theory tonight whilst putting my son to bed that it may be because there are Student values included within the report (Student Name and Class Group etc.) I'll investigate tonight. Regards Martin
michael2k6 Posted September 2, 2009 Posted September 2, 2009 Good theory. Let me know how that goes. When i've had a look whether i get anywhere or not i'll update the case so that it saves someone else trying the same stuff (if i can't work it out).
mbyrew Posted September 2, 2009 Author Posted September 2, 2009 (edited) My theory is a no go I'm afraid. Still get the same results regardless of Student Attributes on the page or not. Help desk ref: 5527-9999912 Martin Edited September 2, 2009 by mbyrew
michael2k6 Posted September 3, 2009 Posted September 3, 2009 I'm informed Gill resolved this for you this morning. Glad it's sorted out.
mbyrew Posted September 3, 2009 Author Posted September 3, 2009 (edited) Hello again. I've tried Gill's report which used the same filter as I originally had but I am still getting duplicate contacts. Maybe it's me (I don't know) I have reopened the case. If you see / speak to Gill, please let her know. Martin Edited September 3, 2009 by mbyrew
mbyrew Posted September 7, 2009 Author Posted September 7, 2009 It appears that this is not possible. As the student contact reports section actually filters on a per student per contact basis, resulting in duplicates. Also, the SQL filter does not work for contacts. I resolved the issue with a list report and a word mail merge.
SkywOrca Posted September 16, 2009 Posted September 16, 2009 You could use: c := Stucontact.Contact.Id; Stucontact.Eportal = 'Y' And ListLeft(Sort(Rempty(ListMerge(Stucontact.Student.Id, Stucontact.Student.Personal.Family.Students(ListContains(Contacts(Eportal = 'Y', Contact.Id), c), Id)))), 1) = Stucontact.Student.Id as the contents of your filter, which should only return a single student-contact link. It'll only work so long as your siblings are correctly linked and the contacts aren't duplicated and returns the first student Id alphabetically, but I assume the body of the letter is only referring to the contact itself and not the students. I realise this is a little after the fact, but just thought I'd point it out in case it's useful to you in the future. Incidentally, you should consider requesting a login to the Serco forums, they're pretty active and you'll often find people willing to lend a hand there. I tend to be far more active over there than here, which is why I didn't spot this thread until now.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now