Crystal Reports Hiding Columns

前端 未结 1 836
日久生厌
日久生厌 2021-01-26 18:09

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

相关标签:
1条回答
  • 2021-01-26 18:38

    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.

    0 讨论(0)
提交回复
热议问题