Duplicate values after parameter mapping

Hello everyone,

I've a problem with the table component in Jaspersoft. I place the table in the title band and with this no data is shown. If I use the "No Data" row of the table I get the information that no data is found. If I remove the table and print the data inside of a random band values are displayed.

I found information in this forum that it is necessary to do a parameter mapping if the table is empty. If I do that the the data is shown inside the table, but the curious thing is: the data is displayed twice (please see screenshot). 

Why did this happen? And how can this be solved? Thank you.




mpolo91's picture
Joined: Nov 30 2022 - 8:23am
Last seen: 4 days 17 hours ago

Could you provide your JRXML report template that shows duplicated values?

rpeguet - 1 month 3 weeks ago

2 Answers:

With the table component it is better to define a subdata set. Call it TableDataset and define it's query and its datasource connection (probably the same as the report).

If the subdataset query uses a parameter that needs to come from the main dataset (for example when you want to print a table for each row in the main dataset) then you may use the Parameter mapping of the dataset of the table (Select the table in your template > look for the Properties panel > under the Dataset tab > click the Parameters button, NOT the Parameters Map).

More info on Parameter mapping can be found in the Studio user guide under Dataset and Subdataset https://community.jaspersoft.com/documentation/tibco-jaspersoft-studio-u...

rpeguet's picture
Joined: Mar 8 2011 - 2:06am
Last seen: 10 hours 31 min ago

Hi @rpeguet,

what you describe is exactly what I do: Creating a subdataset for a table and adding the parameters like the way you describe it. Actually I use two tables with different datasets. One table is printed correctly, the other one prints values twice. My suspicion is that the sql query produces the twin values.  Just two be sure if there is no error with the settings in Jaspersoft, I add the general structure of the report. I'am new to Jaspersoft, it will be nice if someone of you can give me a review.



mpolo91's picture
Joined: Nov 30 2022 - 8:23am
Last seen: 4 days 17 hours ago