Hide space between elements of a report

好久不见. 提交于 2020-01-16 00:34:25

问题


I have one report with various subreports. These subreports are within a table cell. When the subreport doesn't have any data available, I hide the components (tables, textbox, charts) in that subreport. However, this creates some blank space and I need to eliminate this space.

I already used the properties ConsumeContainerWhiteSpace and KeepTogether, but the blank space is still there.

Any suggestions to remove the blank space?


回答1:


To hide or show an entire row based on another reports results will be difficult, if not impossible. You will need to get this data in your parent report somehow.

I would create a cut down version of your subreport's query that returns row count for every subreport, but within the parent report. Might look like this:

UserID   RecordCount
  Abby       3
  Bob        0
  Carl       1

If you are using SSRS 2008r2 you can then use a lookup function to set row visibility. For example the row visibility expression might be

=IIF(Lookup(Fields!UserID.Value,
       Fields!UserID.Value,
       Fields!RecordCount.Value,
       "LookupDatasetName") > 0,
    false,
    true)

If an earlier version of SSRS, then join that dataset into the dataset for your table.



来源:https://stackoverflow.com/questions/13647994/hide-space-between-elements-of-a-report

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!