Suppress Printing of Invoice Comment Lines if blank

SUGGESTED

Thank you for your attention.

I have an Invoice Report which has a Data Field that retrieves Invoice Comments (line 1 & 2), however I would like to create a conditional filter/format so that IF either of the Comment Lines are blank, the relevant Field is suppressed and the space afforded it on the report is freed up/used by the next entry.  At the moment, if the Comments are blank, the report allows 2 extra line spaces as blank entries.

Is this possible?

I hope I explained this sufficiently. 

  • 0
    SUGGESTED

    Suppressing the the field is straightforward, simply select it, go the properties window (View -> Properties if the window is not visible) and click on the ... button in conditional formatting property. In the dialog that opens click the edit button, use advanced filter and enter 

    MyField = ""

    Replacing 'MyField' with whatever the name of your data field is and click OK. Then on the properties tab of the previous dialog change the suppress printing property to be true and click OK.

    That will stop the field from printing if it is blank, but probably isn't what you are after as this has no effect on the space used by the field and all it means is the printing did slightly less work by not trying to render the field. 

    If you want to reclaim space used by a field then the only way to do this is to conditionally suppress the section in which the field is placed. To do this click on the section, go the properties window and click on the ... button in filter property. In the dialog that opens click the use advanced filter and enter a similar formula to above

     MyField != ""

    Again replacing 'MyField' with whatever the name of your data field is and click OK.

    This will stop the entire section from being rendered when the field is empty but does also mean any other variables/fields in that section are also not rendered. This means that the approach typically works best if the section in question only contains the one field, or multiple ones that you want to suppress or not based on the same logic.

    Hope that helps