How to use the output of split string function

8 posts, 2 answers
  1. Abhishek
    Abhishek avatar
    7 posts
    Member since:
    Aug 2017

    Posted 26 Aug 2017 Link to this post

    I want to split a particular string with a slash (/) operator and use the output in the textbox. The first part needs to be formatted in bold and the other in italic. The string I want to split is "International Delivery Note / Note de livraison internationale" .

     

    How should I do this in the telerik report designer for visual studio ?

  2. Abhishek
    Abhishek avatar
    7 posts
    Member since:
    Aug 2017

    Posted 27 Aug 2017 in reply to Abhishek Link to this post

    Anybody knows how to do this ?
  3. Answer
    Nasko
    Admin
    Nasko avatar
    1051 posts

    Posted 30 Aug 2017 Link to this post

    Hello Abhishek,

    The Split function returns a string array. You can send this string array to a User Function or to the Join(separator, strings) function which accepts an array. Note that it is not possible to use regular and italic text inside a single TextBox item. This can be done only inside an HtmlTextBox item which accepts HTML as its value. Thus, you can create your own user function which accepts the initial string and returns the formatted string in HTML.

    Regards,
    Nasko
    Progress Telerik
    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
  4. Answer
    Nasko
    Admin
    Nasko avatar
    1051 posts

    Posted 30 Aug 2017 Link to this post

    Hello Abhishek,

    Please find attached a small sample demonstrating how to use the HtmlTextBox and the Split function to achieve the desired result. During design-time there will be a parse error, since we are mixing expressions with HTML, so don't mind that. Run the report to see the actual result.

    Regards,
    Nasko
    Progress Telerik
    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
  5. Abhishek
    Abhishek avatar
    7 posts
    Member since:
    Aug 2017

    Posted 31 Aug 2017 in reply to Nasko Link to this post

    Thank you Nasko !
  6. Nick
    Nick avatar
    12 posts
    Member since:
    Jun 2017

    Posted 29 Jan 2018 in reply to Nasko Link to this post

    Hi Nasko.

    Sorry, we use an older version of Telerik Reporting. I cannot open the attached file. May I ask you to type your code here?

    Thank you!

     

  7. Nasko
    Admin
    Nasko avatar
    1051 posts

    Posted 01 Feb 2018 Link to this post

    Hello Nick,

    Please find the report definition attached as a plain text file. Note that you can also download a Trial license for the latest version of Telerik Reporting and open the report with the report designer.

    Regards,
    Nasko
    Progress Telerik
    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
  8. Nick
    Nick avatar
    12 posts
    Member since:
    Jun 2017

    Posted 01 Feb 2018 in reply to Nasko Link to this post

    Hello Nasko.

     

    Thank you very much for your help.

     

Back to Top