This is a migrated thread and some comments may be shown as answers.

How to use the output of split string function

7 Answers 530 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Abhishek
Top achievements
Rank 1
Abhishek asked on 26 Aug 2017, 12:52 PM

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 ?

7 Answers, 1 is accepted

Sort by
0
Abhishek
Top achievements
Rank 1
answered on 28 Aug 2017, 04:41 AM
Anybody knows how to do this ?
0
Accepted
Nasko
Telerik team
answered on 30 Aug 2017, 01:57 PM
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
0
Accepted
Nasko
Telerik team
answered on 30 Aug 2017, 02:14 PM
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
0
Abhishek
Top achievements
Rank 1
answered on 31 Aug 2017, 12:12 PM
Thank you Nasko !
0
Nick
Top achievements
Rank 1
answered on 29 Jan 2018, 11:40 PM

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!

 

0
Nasko
Telerik team
answered on 01 Feb 2018, 12:40 PM
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
0
Nick
Top achievements
Rank 1
answered on 01 Feb 2018, 05:10 PM

Hello Nasko.

 

Thank you very much for your help.

 

Tags
General Discussions
Asked by
Abhishek
Top achievements
Rank 1
Answers by
Abhishek
Top achievements
Rank 1
Nasko
Telerik team
Nick
Top achievements
Rank 1
Share this question
or