Picture - Empty URI

2 posts, 0 answers
  1. Brian
    Brian avatar
    35 posts
    Member since:
    Mar 2016

    Posted 18 Sep 2018 Link to this post

    This has been asked before but all answers are around extending the functionality of Telerik Reports (which I can't do).

    When using the standalone designer, I have a picture box that retrieves the value from a database field. Sometimes that field is null or empty text (''). When this occurs, the report renders with a nasty message.

    How can we have it just hide that picture box?

    I have tried to use conditional formatting with no luck (=IIF(isnull(Fields.PicPath,'') = '',1,0).....and then turn off visibility if it is a 1).

    So...no code answers please. This is for the standalone version. How do you resolve this?

    Note I can modify the SQL query as needed as well and have tried to send it Null values as well as '' (empty text) and nothing appears to satisfy Telerik.

    Help please.

  2. Brian
    Brian avatar
    35 posts
    Member since:
    Mar 2016

    Posted 20 Sep 2018 in reply to Brian Link to this post

    Fixed it myself.

    For those that are curious, using the built in conditional formatting expressions just would not handle things. I am not sure if the expression was just to complicated for it or not.

    The end result was to build the expression in SQL to return a new field with a 1 or a 0 where 1 = the path to the file is null. From that I was able to use the builtin conditional formatting to simply say if the field = 1, then turn off the visibility.

    Lesson learned, do most of your calculations ect within SQL first.

     

    Please close this thread as it is resolved.

Back to Top