问题
I am not too familiar with SQL Server Report Builder and have had prior experience with Crystal Reports, whereby you could declare a variable in the header of the report, set that variable using a sub-report, and then reference that variable in the main report, so I am having issues adapting to SQL Server Report Builder.
I have a tablix that displays data. In one of the tablix columns I've embedded a sub-report. I would like to hide the tablix row based upon a value surfaced by the sub-report. Is there any way to do this using SQL Server Report Builder?
回答1:
You can not pass a variable or parameter from a sub-report to the parent report in ssrs. You can only pass variables to sub-reports from the parent report in the form of parameters.
You will need to set up logic in the parent report to know in advance if the column holding that child report should be rendered or configure the sub-report to be able to print as blank and toggle the visibility there.
来源:https://stackoverflow.com/questions/24066644/sql-server-report-builder-hiding-tablix-rows-based-on-value-in-subreport