Jump to content
Changes to the Jaspersoft community edition download ×

Duplicate values after parameter mapping


Recommended Posts

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.





Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

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-user-guide/v8/datasets-and-subdatasets

Link to comment
Share on other sites

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.



Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...