Page 1 of 1

Split a delimited string to extract individual string values

Posted: Wed Sep 02, 2020 7:09 pm
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

Re: Split a delimited string to extract individual string values

Posted: Thu Sep 03, 2020 10:35 am
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.

Re: Split a delimited string to extract individual string values

Posted: Thu Sep 03, 2020 12:29 pm
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.

Re: Split a delimited string to extract individual string values

Posted: Sun Sep 06, 2020 6:19 pm
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.