I have a function that loops through a recordset doing bespoke customisations. For some reason it appears to have stopped working and I cannot see where the problem is.
Can anyone help?
The code is:
Public Function Localisation(UKString As String) As String
Dim LocalString As New System.Text.StringBuilder(UKString)
Dim i as Integer
If UKString = "" Or IsNothing(UKString) Then
i = 0
For i = 1 to Report.Parameters!Localisations.Count()
If UKString.Contains(Report.Parameters!Localisations.Value(i)) Then
It uses a hidden multiselect dataset as the list of customisations, and the sp that produces the set unions a dummy value to ensure that the code always has a set to loop, even if that's just one record. I know this returns data correctly, so the problem isnt the dataset.
The problem is on the LocalString.Replace line, but no matter what I try, I can't get it working again. I had it running previously, but not now.
Any help would be appreciated.