Dataset Return Values Problem

0

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 parameters

Sub dataset variables -> (Return Values mapping) -> main report variables

If 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=""/>

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.

ianfoulds@x-act.co.uk's picture
Joined: Nov 15 2013 - 11:03am
Last seen: 3 weeks 17 hours ago

You should log a bug/enhancement ?  Create new Bug Report

A 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.

djohnson53 - 4 years 5 months ago

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!

ianfoulds@x-act.co.uk - 4 years 5 months ago

At the top of the page the tab is called 'Tracker'

djohnson53 - 4 years 4 months ago
show 1 more...

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?

excorpia - 4 years 3 days ago

0 Answers:

No answers yet
Feedback
randomness