ianfouldsx-act.co.uk Posted May 15, 2015 Posted May 15, 2015 Hi, I'm using Jaspersoft Studio 6.0.1 final and I would like to get return values from a sub-dataset used in a table element within the main report.Looking at the settings there is clearly a feature that should allow this but it seems to be functiong in compeltely the wrong way, and the UI seesm to suggest it works the same way as parameters.From my understanding the flow should be as follows:Main dataset parameters -> (Paramters mapping) -> sub-dataset parametersSub dataset variables -> (Return Values mapping) -> main report variablesIf you look at the settings for a Table Dataset definition you will see 'Return Values which are configured just the same as those of a Sub-Report, however they seem to be working the wrong way:When you open up the 'Return Values' dialog and add new new value it seems ot be working the wrong way round, the 'From Variable' list is empty and expects you to type in a name - I think this should be a list of variables in the Sub-Dataset. The 'To Variable' lists the variables in the Sub-Dataset and not the variables in the Main Report, see what I mean about the wrong way round:You may think I've got it wrong - Jaspersoft must know what they are doing, right? - but if you type the name of a variable in your main report into 'From Variable' it wont compile and fails with an error 'Return value destination value not found'. If you then create a variable in the Sub-Dataset to match the name of the 'From Variable' and a variable in the Main Report to match the 'To Variable' the report compiles.You may think your now onto a winner - wrong! All you seem to get are null values at either end of the link, nothing seems to be propergating between the sub dataset and the main report in any direction.Another problem seems to be with the Incrementer Factory Class, having saved your return value as above it creates an empty attribute in the JRXML which fails to compile:<returnValue fromVariable="w_test" toVariable="amount_total" incrementerFactoryClass=""/>[/code]If you remove the incrementerFactoryClass attribute your report will compile, you can also manually change the to and from variabke names here to work the way it should, this also solves the 'Return value destination value not found' error but still nothing is propergated between the dataset and main report.I don't think I'm going mad, I may be though, but this seems like an unfinished, untested forgotten about feature that needs some work.I'd really like to be able to use it to save writing bunches of sub queries in my main report to return values that I get in my sub-datasets.I'd love to see this fixed please.
djohnson53 Posted May 15, 2015 Posted May 15, 2015 You should log a bug/enhancement ? Create new Bug ReportA well written post, though. Don't re-do it completely in the bug, You could refer to this page, Dataset Return Values Problem, for all of the images and such. Give a good and complete enough description to motivate the engineer to look at this post.
ianfouldsx-act.co.uk Posted May 18, 2015 Author Posted May 18, 2015 Many thanks for the comment.I've created a bug report here, http://community.jaspersoft.com/jaspersoft-studio/issues/4746. I did look for the bug report submission page in the menus but couldn't find it. I must have been suffering from temporary blindness as it's very obvious at the bottom of the page!
djohnson53 Posted June 3, 2015 Posted June 3, 2015 At the top of the page the tab is called 'Tracker'
excorpia Posted October 14, 2015 Posted October 14, 2015 Is this bug fixed? I have the same problem, I need to pass the result of a select count from a table to de main report.Another way to do the same?
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