There is no matching overloaded method for 'Replace(String,String,Number)'

Stimulsoft Reports.JS discussion
Post Reply
Mateus Garrido Kern
Posts: 45
Joined: Wed Sep 04, 2019 5:19 pm
Location: Curitiba/PR (Brazil)

There is no matching overloaded method for 'Replace(String,String,Number)'

Post by Mateus Garrido Kern »

Hi,

I had this error when trying to perform a replace on a string:
Expression in Text property of 'Text29' can't be evaluated! Parser error: There is no matching overloaded method for 'Replace(String,String,Number)'
And this is the Expression for the Text29:
{Replace(root_retorno_abertura.texto,"{NumeroFolhas}",TotalPageCount)}
In the Design Preview works very well, but in my Angular project using javascript presents this error.
Attachments
My Preview Designer works very well
My Preview Designer works very well
Screenshot_3.png (50.16 KiB) Viewed 1287 times
My Designer Stimulsoft
My Designer Stimulsoft
Screenshot_2.png (62.59 KiB) Viewed 1287 times
My Console Log Error
My Console Log Error
Screenshot_1.png (52.25 KiB) Viewed 1287 times
Mateus Garrido Kern
Email: mateus.kern@digibyte.com.br
Mateus Garrido Kern
Posts: 45
Joined: Wed Sep 04, 2019 5:19 pm
Location: Curitiba/PR (Brazil)

Re: There is no matching overloaded method for 'Replace(String,String,Number)'

Post by Mateus Garrido Kern »

How can I solve this problem?

Thank you
Mateus Garrido Kern
Email: mateus.kern@digibyte.com.br
Mateus Garrido Kern
Posts: 45
Joined: Wed Sep 04, 2019 5:19 pm
Location: Curitiba/PR (Brazil)

Re: There is no matching overloaded method for 'Replace(String,String,Number)'

Post by Mateus Garrido Kern »

Hello,

I solved this problem using 'ToString()' function, like this:
{Replace(root_retorno_abertura.texto,"{NumeroFolhas}",ToString(TotalPageCount))}
Thank you
Mateus Garrido Kern
Email: mateus.kern@digibyte.com.br
Lech Kulikowski
Posts: 6238
Joined: Tue Mar 20, 2018 5:34 am

Re: There is no matching overloaded method for 'Replace(String,String,Number)'

Post by Lech Kulikowski »

Hello,

Thank you for the information.
Post Reply