lisaws Posted October 19, 2017 Share Posted October 19, 2017 I want to increase the max length of the group_concat function for my report. Normally (not in Jasper) I would do the following:SET SESSION group_concat_max_len = 10000;[/code]But if I add that to the beginning of my Jasper report query, I get an error when running the report ("An error has occurred..."). Is there any way to set SQL system variable such as this in Jasper iReport?I am using Jasper iReport 5.2.0 and MySQL db. Thanks. EDIT: also, I've tried a workaround to avoid using group_concat which uses user-defined variables, for example:SELECT resultFROM (SELECT @result := '', (SELECT result FROM (SELECT @result := CONCAT_WS(';', @result, field2) AS result, LENGTH(@result) AS blength FROM some_table ORDER BY blength DESC LIMIT 1) AS sub1) AS result) AS sub2; [/code]But I am getting the same error, " An error has occurred. Please contact your system administrator. (6632)". I am guessing this is because Jasper doesn't allow SQL variables? Link to comment Share on other sites More sharing options...
reportdev Posted October 19, 2017 Share Posted October 19, 2017 If you would have been using Oracle, I would have suggested going the route of using plsql blocks. Link to comment Share on other sites More sharing options...
Solution hozawa Posted October 19, 2017 Solution Share Posted October 19, 2017 Unfortunately, you'll need to set in the mysql config file instead of as a session. Link to comment Share on other sites More sharing options...
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