Crystal Reports Hiding Columns

£可爱£侵袭症+ 提交于 2020-01-30 12:08:11

问题


I have a crystal report with several columns.i need to hide a column and remove the blank space based on a condition.currently what i have done is.i have dragged and dropped the fields inside TextObject and tick the "Suppress Embedded Blank Field Lines" and "Can Grow".it'll hide the detail field and also remove the blank space but the issue is header is still visible.

condition to hide a column is if the field data is null or empty


回答1:


Try creating a formula for your conditionally displaying column heading. Something like:

SomeFieldLabel:

If DistinctCount({@SomeField}) > 0 Then "The Column Label"

or

If Not IsNull({@SomeField}) And {@SomeField} <> "" Then "The Column Label"

Then create a text object with {@SomeFieldLabel} and all your other labels, and select Suppress Embedded Blank Field Lines.

You may need to experiment to find the right condition – one which evaluates to True whenever the field is present in your detail records, and False the rest of the time.



来源:https://stackoverflow.com/questions/7343275/crystal-reports-hiding-columns

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