Split a delimited string to extract individual string values

Stimulsoft Reports.WEB discussion
Post Reply
mdshoaibpathan
Posts: 5
Joined: Thu Jul 16, 2020 6:46 am

Split a delimited string to extract individual string values

Post by mdshoaibpathan »

Hi Team,

Is there any way/method in Stimulsoft reports designer functions where we can split a delimited string into array of strings and then access each individual array element.
Length of each string in delimited string is dynamic and is not constant. Hence, we are not able to use Substring function.

We are using Stimulsoft Dlls 2019.1.1.0 version and couldn't find any function under "Functions" in the Dictionary in the report designer.

For example, inputvalue= "abc|defg|hijkl|aab". Expectation is to extract each individual value and map it to different textboxes in the report.

Could you please assist on this. Please let me know in case you need any more information from my side.

Thanks,
shoaib
Lech Kulikowski
Posts: 7336
Joined: Tue Mar 20, 2018 5:34 am

Re: Split a delimited string to extract individual string values

Post by Lech Kulikowski »

Hello,

There are no standard functions for that task.
As a way, you can add your own function in then use it in the report.

Thank you.
mdshoaibpathan
Posts: 5
Joined: Thu Jul 16, 2020 6:46 am

Re: Split a delimited string to extract individual string values

Post by mdshoaibpathan »

Hello,

Thanks for your response. I found it in various other blog posts on stimulsoft forum where most of the answers pointed me to add my own method. Could you please guide me how can I do that? I mean where in report designer UI, I can add my own function? If you could please share a screenshot showing where to add new function, it would be of great help. Thanks in advance.
Lech Kulikowski
Posts: 7336
Joined: Tue Mar 20, 2018 5:34 am

Re: Split a delimited string to extract individual string values

Post by Lech Kulikowski »

Hello,

In the NET-based products, you can add your own function on the Code tab.
In other products, it can be added from code before calling the designer.

Thank you.
Post Reply