Report Builder - Image/Text Box Formatting RRS feed

  • Question

  • Hi, 

    Im trying to format images in my header and text boxes in the body of my report based on the following condition, however, when I run the report, all images and text boxes populate on the report. 

    =IIF(First(Fields!RecEntity.Value, "BodyData")="IBXXXXXXX", true, false)

    What am I missing?

    Tuesday, November 24, 2020 8:12 AM


All replies

  • Hi,

    I suggest asking over at the dedicated SQL Server Reporting Services forum over here:

    (Please don't forget to mark helpful replies as answer, thank you)

    Best regards,

    Blog: https://thesystemcenterblog.com LinkedIn:

    • Proposed as answer by Guido Franzke Tuesday, November 24, 2020 10:35 AM
    • Marked as answer by Guido Franzke Wednesday, December 2, 2020 11:00 AM
    Tuesday, November 24, 2020 8:41 AM
  • =IIF(First(Fields!RecEntity.Value, "BodyData")="IBXXXXXXX", true, false)

    What am I missing?

    That you are using the FIRST function and so you get for all functions the same value.

    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Tuesday, November 24, 2020 8:50 AM
  • thank you Olaf, however, if I remove that function, then the report errors :

    The Hidden expression for the text box 'HeaderAEL' refers directly to the field 'RecEntity' without specifying a dataset aggregate.  When the report contains multiple datasets, field references outside of a data region must be contained within aggregate functions which specify a dataset scope. 

    Please note -My dataset query pulls the exact field result, wont that make the FIRST function the correct function to use?  

    Wednesday, November 25, 2020 6:57 AM