Jump to content

asphator

Members
  • Posts

    8
  • Joined

  • Last visited

asphator's Achievements

Rookie

Rookie (2/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Hello e verybody, I just noticed that the problem I was encountering has been related as a bug. I would know if somebody found a way to solve this problem? The only one I found is to edit by hand the .jrxml file after each modification and file closure in iReport... My problem: - if I print reports through JasperSoft UI, reports work well and can be exported to PDF format - if I try to execute them through a Java script, I get the following error : JREx: Errors were encountered when compiling report expressions class file: Cannot cast from Integer to String value = (java.lang.String)(((java.lang.Integer)parameter_num_lane.getValue())); //$JR_EXPR_ID=12$ In iReport, if I try to change TextField's "Expression class" value from "java.lang.String" to "java.lang.Integer", as soon as I close the document, even by saving it, value is reinitialized to java.lang.String Or maybe have you a shorter way to export some reports automatically each morning to PDF, according to some conditions... Thanks for help Post Edited by asphator at 05/03/2012 16:00
  2. One solution has been found on this forum : http://www.developpez.net/forums/d1188243/logiciels/solutions-dentreprise/business-intelligence/jasper/error-cannot-execute-update-in-read-only-transaction/ Instead of using a stored procedure, it is possible to do it through a scriptlet ;)
  3. Up :) I precise that following solution did not worked with me : - http://jasperforge.org/plugins/espforum/view.php?group_id=112&forumid=102&topicid=49238 (I have already the latest pgsql driver) and I just found out that someone else already exposed the same problem here : - http://jasperforge.org/plugins/espforum/view.php?group_id=112&forumid=102&topicid=95462
  4. Hello, Problem is in the title. As it is not possible to execute two queries within a report, I made a stored procedure as following : CREATE TYPE type_seuils AS ( ratio_critical numeric(4,2), ratio_survey numeric(4,2), freq_critical numeric(4,2), freq_survey numeric(4,2) ); 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 LOOP RETURN NEXT record; END LOOP; RETURN; END; $BODY$ LANGUAGE 'plpgsql'; Without UPDATE query, all works well. But with it, I have this error message : cannot execute UPDATE in a read/only query. May someone help me to figure out how to bypass this? I've been searching for 2 days without any success :( Regards, Post Edited by asphator at 02/20/2012 08:40
  5. I answer myself : my stored procedure seems not to be a read/write transaction but only a read transaction (which is strange as read/write mode is the default one...). I am still looking after how to bypass this problem.
  6. 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
  7. Great !! I just have a bug when trying to edit timePeriod through jasper interface (it automatically put "year" as value, and impossible to modify it), but by editing directly the XML file, it works! Thank you for your help :) Post Edited by asphator at 02/07/2012 15:05
  8. Hello all, First, sorry for my english, maybe I will use bad words or expressions. Then, as I am not a Java developer, I ask for your help to solve the following problem : http://img11.hostingpics.net/pics/232765jasperreportlinechartcustomization.png I precise : my problem is not overlaping! My problem is I do not know how to display only 1 label of 2 (do I say it right?). Indeed, on this picture, there is not so much data, but in reallity, I have thousands of points to display and I want to show only around 10 labels on x-axis. I saw here someone doing it ( here: http://jasperforge.org/plugins/espforum/view.php?group_id=102&forumid=103&topicid=83170 ) so I know it is possible throug Customization Class, but I do not know how. May someone help me to figure it out? Best regards,
×
×
  • Create New...