Search code examples
crystal-reports

Prevent textbox containing field with null value from taking up space


I have a textbox which is displaying the field Address2. If Address2 has a value, then no problem, but if it has no value, then the textbox is blank, but still takes up space in that portion of the report.

My problem is I don't want to put any blank space if the text box has a blank value for the Address2 field.


Solution

  • Right click the textbox and select Format Field

    Select the Common tab

    Click the Formula button next to the Suppress

    Change the formula to something like

    IsNull({REPORT;1.Address2}) or {REPORT;1.Address2} = ""
    

    Click Save and Close

    That should about do it.