tion1976
29th March 2023, 14:46
What is the meaning and solution for the error
Error: Unresolved reference to function 'function.str.replace_.is.not.supported.with.tiv.lower.than.1700

Is it regarding some the report script ? The header or what else?

I was trying to call
desc_cols(1,idx) = str.replace$(desc_articol, chr$(10), "")

Compilation Failed

rtditc24101eti2:
repgen '2td107U0 cbdcitc24101eti ' -c 'td107U0 cbdc' -o "D:/Infor/LN/bse/application/td107U_0_cbdc/otditc0/ritc24101eti0" -T 0 -z -qe "D:\Infor\LN\bse\tmp/tmp953277332" -x "D:\Infor\LN\bse\tmp/tmp433357342" -L
bic "D:/Infor/LN/bse/application/td107U_0_cbdc/otditc0/ritc24101eti0" -z -u -o rtditc24101eti0 -f "D:\Infor\LN\bse\tmp/tmp529614444" -qe "D:\Infor\LN\bse\tmp/tmp953277332"
rtditc24101eti ( 123): Error: ')' not expected. (While expanding macro 'nosupp')
rtditc24101eti ( 130): Error: ')' not expected. (While expanding macro 'nosupp')
rtditc24101eti ( 123): Error: Unresolved reference to function 'function.str.replace_.is.not.supported.with.tiv.lower.than.1700'.

3 ERRORS REPORTED.

bdittmar
29th March 2023, 16:53
str.replace$()
Syntax:
function string str.replace$ (const string string$, const string oldstr$, const string newstr$)

Description

Returns a (null terminated) copy of string$ that will have all instances of oldstr$ replaced with newstr$.

As this function returns a string value that can become larger than the input string, you have to use a variable that is large enough to store the result.


Arguments
const string string$ a string

const string oldstr$ the part to replace

const string newstr$ the part to replace oldstr$ with


Context
This function is implemented in the 4GL Tools and can be used in all script types. This function is available from TIV level 1700.

Preconditions
Note: The following preconditions no longer apply when get.tools.tiv() returns 2210 or higher.

In case one of the variables passed to string$, oldstr$, or newstr$ is declared as a multibyte string, then the variable passed to result$ must be declared as a multibyte string as well.
Example
string source(50)
string target(100)
string temp(10)

| 1 2 3 4 5
| pos 12345678901234567890123456789012345678901234567890
source = "the quick brown fox jumps over the lazy dog"

target = str.replace$(source, "dog", "cat")
| target now contains "the quick brown fox jumps over the lazy cat"

target = str.replace$(source, "the", "a")
| target now contains "a quick brown fox jumps over a lazy cat"

target = str.replace$(source, "o", "O")
| target now contains "the quick brOwn fOx jumps Over the lazy dOg"

target = str.replace$(source, " ", " ")
| target now contains "the quick brown fox jumps over the lazy dog"

target = str.replace$(source, "the", "")
| target now contains "quick brown fox jumps over lazy dog"

temp = str.replace$(source, "", "the")
| nothing replaced
| target now contains "the quick brown fox jumps over the lazy dog"

temp = str.replace$(source, "the", "")
| temp now contains "quick brow" as temp can contain only 10 chars


Regards

vahdani
30th March 2023, 01:51
TIV is short for "Tools Interface Version". TIV denotes the Version of Tools which is installed on your system. Every programming function needes at least a specific "Tools Interface Version" to function!

In your case the function str.replace$() needs at least the Tools Interface Version 1700. This is the Porting set 8.7a. You can check your Baan Installation. In your case the TIV is apparantly lower than 1700!!

So you cannot use the function str.replace$() or you have to upgrade your Baan installation to be able to use this function!

RieseUSA
30th March 2023, 02:51
Based on your Package VRC including 107, I am expecting that you are using LN 10.7 and that requires Porting Set 9.3a, which has the Tools Interface Version (TIV) 2300. This means that the str.replace$() function is available.

I am suspecting that the report is not new and was copied from on older version. The Tools Interface Version (TIV) on the Report settings is likely set to something less than 1700. That setting enforces that the report is compatible with older tools.

Check the Tools Interface Version (TIV) on the Report and if you are on LN 10.7, then update it to 2300. If it was less than 1700 before, this should resolve your problem.

tion1976
30th March 2023, 11:50
I changed the TIV from 0 to 2300, and the report compilation worked. Thanks RieseUSA