Format in combination not working

2 posts, 0 answers
  1. Kris Nobels
    Kris Nobels avatar
    15 posts
    Member since:
    Aug 2009

    Posted 03 Oct 2016 Link to this post

    I need to format some text with codition, but it fails

    {IIf(Fields.UiModel.IsCompany = "Yes", =Format("{0} {1}", Fields.UiModel Fields.UiModel.Customer.Firstname,Fields.UiModel.Customer.Surname), Fields.UiModel.Customer.Companyname)}


    The problem is in the format, but i can not get this to work...

    I need some expert on this

    I get this error

    An error has occurred while processing Report 'Factuur':
    textBox18.Value expression [{IIf(Fields.UiModel.IsCompany = "Yes", =Format("{0} {1}", Fields.UiModel
    Fields.UiModel.Customer.Firstname,Fields.UiModel.Customer.Surname), Fields.UiModel.Customer.Companyname)}] is not valid:
    Error evaluating embedded expressions: Unexpected token inside an expression at index 57

  2. Stef
    Stef avatar
    3610 posts

    Posted 05 Oct 2016 Link to this post

    Hello Kris,

    This is an embedded expression, niot starting with a "=", but surrounded by "{}". Thus inner curly brackets must be escaped by being doubled - Embedded Expressions.

    I hope this information helps.

    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top