I found this solution on the forum for splitting text. Where do I put the column where I have the text?

Stimulsoft Reports.NET discussion
Post Reply
RayDgo
Posts: 1
Joined: Wed Sep 10, 2025 1:18 am

I found this solution on the forum for splitting text. Where do I put the column where I have the text?

Post by RayDgo »

My column is called {Concept.description}, which is where I have the text I want to split into four parts.
I hope you can help me. I've attached images showing the code for this solution and the error when previewing it.
Translated by google.

Public Function ExtractValue({Concepto.descripcion} As String,aPlace As Integer) As String
Dim retStr As String = String.Empty
Dim tempStr() As String
tempStr = {Concepto.descripcion}.Split(",")
If tempStr.Length > aPlace Then
retStr = tempStr(aPlace)
End If
Return retStr
End Function

... And then from a text component I can add the expression
{ExtractValue(FanGroups.SoundPowerLevelsInlet,0)}
Function in code
Function in code
StimultSoft01.jpg (123.02 KiB) Viewed 1304 times
Component to display the result.<br />Compile error.
Component to display the result.
Compile error.
StimultSoft02.jpg (139.99 KiB) Viewed 1304 times
Lech Kulikowski
Posts: 7424
Joined: Tue Mar 20, 2018 5:34 am

Re: I found this solution on the forum for splitting text. Where do I put the column where I have the text?

Post by Lech Kulikowski »

Hello,

Your function is declared incorrectly. You cannot pass the column directly. You need to define something like
Public Function (columnValue as String, ...)

and then pass the column within the function
{ExtractValue(Concepto.description, FanGroups....)}

Thank you.
Post Reply