mpolo91 Posted January 31, 2023 Posted January 31, 2023 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.
Raphaël Peguet Posted February 2, 2023 Posted February 2, 2023 Could you provide your JRXML report template that shows duplicated values?
Raphaël Peguet Posted February 2, 2023 Posted February 2, 2023 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
mpolo91 Posted February 2, 2023 Author Posted February 2, 2023 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.
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