Thought I had submitted this a couple weeks ago, but hasn't posted yet, so am re-submitting. Trying to get this report to pull by home room teacher by adding the parameter for users to select a homeroom teacher. I have the parameter in place, but the report still pulls all homeroom teachers in the building. Can you tell me what I need to do to fix this?
Here's the code (this is on our test server PS vs 7.10.1):
~[if#pageaction.~[gpv:action]#getresults]
Emergency List
~[x:insertfile;/scripts/custom-jquery-1.0.html]
~[x:insertfile;/scripts/custom-datatables-1.0.html]
~[x:insertfile;/admin/includes/template/reports-commonscripts.html]
(function($){
var reportdataURL ='/~[self]';
var pageseperator =' ';
var totalreports = 0;
$(function(){
$('#params_container').accordion({collapsible:true,autoHeight:false});
$('input:submit').button({label:"Submit"});
$('.datepicker').datepicker({
dateFormat: convertOracleDF('~[gpv:dateformat]')
});
$('#ui-datepicker-div').hide();//Bug in jQuery UI 1.8.9 causes datepicker div to be visible upon creation
$('#params').submit(function(){
clearError();
$("#reportresult").empty();
$("#reportresult").html('Loading ');
var settings = $('#params').serializeObject();
$.get(reportdataURL, settings
)
.done(processReportResults)
.fail(function(xhr, status, error){
$('#loader').hide();
displayError("Report failed to load. Status Message: " +status);
});
return false; //override regular form submission
});
});//end jquery.ready
function processReportResults(data){
$('#reportresult').html(data);
$('#reportresult table').addClass('display').dataTable({
"bPaginate": false,
"bFilter": false,
"bJQueryUI": true,
"sDom": 'T<"H"fr>t<"F"ip>',
"oTableTools": {
"sSwfPath":"/scripts/tabletools/swf/copy_cvs_xls_pdf.swf"
},
"aaSorting":[[0,'asc']]
});
}
function displayError(msg){
$('#error_container').html('Alert: '+msg+'').show();
}
function clearError(){
$('#error_container').empty().hide();
}
})(jQuery);
~[wc:commonscripts]
~[x:insertfile;/admin/includes/template/admin_reportheader_start.html]
Emergency List
~[x:insertfile;/admin/includes/template/admin_reportheader_end.html]
Emergency List
Home Room Teacher
~[tlist_sql;SELECT DISTINCT (ps_customfields.getstudentscf(students.id, 'IA_CLASSTEACHERNAME')) FROM students WHERE schoolid=~(curschoolid) ORDER BY (ps_customfields.getstudentscf(students.id, 'IA_CLASSTEACHERNAME'))]
~(gl)
[/tlist_sql]
Waiting for report parameters.
~[x:insertfile;/admin/includes/template/pds_copyright_footer.html]
[else#pageaction]
Student
Gr
Med
Gdn
Address
Home
Lives With
Mother/Legal Guardian
Father/Legal Guardian
Home Room Teacher
~[if.is.a.school]
~[tlist;students;schoolID=~(curschoolid);enroll_status=0;(ps_customfields.getstudentscf(students.id, 'IA_CLASSTEACHERNAME'))=~[gpv:g] ;alternatecolor;sortcmd;lastfirst;>]
~(lastfirst)
~(Grade_Level)
~(alert_medical;if.not.blank.then=Yes)
~(alert_guardian;if.not.blank.then=Yes)
~(Street)~(City), ~(State) ~(Zip)
~(Home_Phone)
~(decode;~(father_custody);1;~(Father_rel);Father;Legal Guardian; ;)~(decode;~(mother_custody);1;~(Mother_rel);Mother;Legal Guardian; ;)
~(Mother), ~(Mother_rel)
(w) ~(motherdayphone)
(h) ~(Mother_home_phone)
(c) ~(Mother_cphone)
~(Father), ~(Father_rel)
(w) ~(fatherdayphone)
(h) ~(Father_home_phone)
(c) ~(Father_cphone)
~(IA_classteachername)
[/if.is.a.school]
[/if#pageaction]
Recent comments