duckduck123d Posted September 7, 2021 Share Posted September 7, 2021 I'm trying to make the next report but even if the structure is done right, the second subreport don't display nothing.I read this is because the subreport don't find any rows so It don't show nothing, but I tried everything and It doesn't recognize the parameter I'm trying to give to him.The structure Is like that:Main report -> Subreport (connected by id sheet) -> Another subreport (connected by id_row_sheet, which Is obtained from the query of the subreport)The thing Is the main report makes a query which returns, for example 4 rows, then for every row of the subreport Is shown and the intention Is that inside this subreport, I do another query which gives me more rows and with the other subreport inside of it show them all this rows. How can I add a subreport inside another subreport?QueriesMain report:SELECT * FROM table WHERE id_sheet = $P{id_sheet} (is prompted)Result example: 1 row Subreport inside Main report:SELECT id_row_sheet FROM another_table WHERE id_sheet = $P{id_sheet} (same field)Result example: 4 row Subreport inside subreport:SELECT * FROM another_other_table WHERE id_row_sheet = $P{id_row_sheet} (Obtained from the previous query)Result example: 2 rows for every row of the subreport Link to comment Share on other sites More sharing options...
gustavofarias Posted September 7, 2021 Share Posted September 7, 2021 Adding a subreport to a subreport is no different from adding a subreport to a main report.What you need to do is make sure that all the parts work by themselves before they can work together. Also, if they work standalone you will know that the problem is when you pass parameters.Main -> sub1 -> sub2Try testing sub2. When it work, try sub1 -> sub2. When it work try Main -> sub1 -> sub2When you work incremental like this you will know exactly when you do a step that fails what was already working. Link to comment Share on other sites More sharing options...
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