Question

I'm creating a report with a table that is grouped by a department code. There's a page break at the end, so each page only has data for that department code. Outside of the table, I want to have a textbox that contains the department code for that page/group.

I've tried using a hidden column with the data, but the textbox only ends up showing the last page's department code on every single page. I imagine I'm missing a simple solution, but I can't figure it out and Google seems to be failing me.

Was it helpful?

Solution

the problem is that you are just setting the report to break at certain points in the data instead of, say, rendering a sub-report multiple times by passing a parameter to it. the data only exists inside the scope of the table.

what you could do is set up a sub report that accepts a department parameter and generates data for one department. in the sub report you could then add the header by referencing the parameter that's being passed. then in your main report you create a table with a dataset of unique departments. group by the department in the table, and drag the sub report into the table and set the parameter. if you do it right you should get the same effect, but with the department header.

if you need more clarification, feel free to ask.

OTHER TIPS

Could you maybe add a column to the table that just looks like its outside of the rest of the table to the user, but is actually in the table. Maybe pad a couple of blank cols then show the data.

If you are handling the page break in the logic of the table you will probably have to keep the data in the table.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top