Hello, I am encountering a strange problem. I made a report and tested it through preview mode : it worked fine. I made a jasperreport, imported my report into it, and tested it again through preview mode : it worked fine too. Then, when I test my report from Jasperserver IHM, I have an SQL Statement error occured when I click on "Apply" button. May someone have and idea of where the problem can be from? I suppose there is a problem with my Stored Procedure, because even if I call it with strong values : select * from func_seuils(1,2,3,4), it works in previews and DB but not from jasperserver IHM. Or is there a way to display the query that crashed instead of a useless error message with no precision? Thanks for your help :( Edit Here is the SQL query : SELECT ratio_critical, ratio_survey, freq_critical, freq_survey FROM func_seuils( $P{ratio_critical}, $P{ratio_survey}, $P{freq_critical}, $P{freq_survey} ) And here is the declaration of "func_seuils" function : CREATE OR REPLACE FUNCTION func_seuils(rc numeric, rs numeric, fc numeric, fs numeric) RETURNS SETOF type_seuils AS $BODY$ DECLARE record type_seuils; BEGIN UPDATE seuils SET ratio_critical = coalesce(rc::numeric(4,2), ratio_critical), ratio_survey = coalesce(rs::numeric(4,2), ratio_survey), freq_critical = coalesce(fc::numeric(4,2), freq_critical), freq_survey = coalesce(fs::numeric(4,2), freq_survey); FOR record IN SELECT ratio_critical, ratio_survey, freq_critical, freq_survey FROM seuils LIMIT 1 LOOP RETURN NEXT record; END LOOP; RETURN; END; $BODY$ LANGUAGE 'plpgsql' VOLATILE; Post Edited by asphator at 02/16/2012 15:17 Post Edited by asphator at 02/16/2012 15:37