locked
Remove #ERROR text on rdlc textbox RRS feed

  • Question

  • Hi!


    I use LINQ to SQL for showing reports, everything works fine but when I do something like

    Fields!Order.Value.Customer.Address.StreetName  it will show The addressStreet value

    but if Customer or Address object value is null Textbox will output #ERROR message.

    How can I get rid of this, is there any way to override the Textbox control?

    Monday, May 19, 2008 1:21 PM

Answers

  •  Lauri wrote:

    Hi!


    I use LINQ to SQL for showing reports, everything works fine but when I do something like

    Fields!Order.Value.Customer.Address.StreetName  it will show The addressStreet value

    but if Customer or Address object value is null Textbox will output #ERROR message.

    How can I get rid of this, is there any way to override the Textbox control?

     

    =IIF (IsNothing(Fields!Order.Value.Customer.Address.StreetName.Value), 0, Fields!Order.Value.Customer.Address.StreetName.Value)

     

    If your field is nothing (null), then display 0. Otherwise, display the field.

    Monday, May 19, 2008 8:19 PM
  • Well, here's a thought. You could also use similar expression to control whether to show it or not using visibility. Similar expression, just if the condition is true (where the value is null), then set to true (hide it) or else false (show it). Just a suggestion. Good luck.

     

    Thursday, May 22, 2008 12:57 PM
    Answerer

All replies

  •  Lauri wrote:

    Hi!


    I use LINQ to SQL for showing reports, everything works fine but when I do something like

    Fields!Order.Value.Customer.Address.StreetName  it will show The addressStreet value

    but if Customer or Address object value is null Textbox will output #ERROR message.

    How can I get rid of this, is there any way to override the Textbox control?

     

    =IIF (IsNothing(Fields!Order.Value.Customer.Address.StreetName.Value), 0, Fields!Order.Value.Customer.Address.StreetName.Value)

     

    If your field is nothing (null), then display 0. Otherwise, display the field.

    Monday, May 19, 2008 8:19 PM
  • So in other words it's impossible to extend Textbox control in reporting services to remove #Error text

    Beacause if your field is nothing (null), then display 0. Otherwise, display the field. is not really solution, beacause I'm using business objects that retreave the data and this is really tedious to insert these IIF syntaxes.
    Thursday, May 22, 2008 12:34 PM
  • Well, here's a thought. You could also use similar expression to control whether to show it or not using visibility. Similar expression, just if the condition is true (where the value is null), then set to true (hide it) or else false (show it). Just a suggestion. Good luck.

     

    Thursday, May 22, 2008 12:57 PM
    Answerer