How to hide a row when there is not data to be displayed in ReportViewer? RRS feed

  • Question

  • I'm using Microsoft.Reporting.Winforms and has tryed to hide a row with the formula below:

    =Trim(IIF(Fields!Comment.Value=Nothing,"",Fields!Comment.Value)).Length = 0

    or using only =Trim(Fields!Comment.Value).Length = 0

    But when the report begins to load, the viewer displays this error message:

    "An error occurred during local report processing"

    "An object reference was not set to an instance of an object"

    If I remove the formula all goes right.

    I'm using WPF and .NET 3.5.1. The reportviewer is in a windows form into a windows forms control library because, when I was using WindowsFormsHost control to host the report viewer in a WPF window, I had erratic errors in the report exhibition.

    Does somebody know where I'm wrong?



    • Edited by Codelines Friday, February 27, 2015 4:44 PM
    Friday, February 27, 2015 3:09 PM