itprog
22nd February 2023, 19:01
how do you turn a double into a string? str$() and cast() has not worked for me. I'm using LN and i'm tryng to create a calc field in a report extension.
I've tried something like this and I'm able to save the extension fine with no errors:

var1 = sprintf$("%-*.*f",10,2, double_var)

But as soon as I run the report i get the following error:
Error: Load DLL: Incompatible types in the link external "var1"

***double_var is the name of the variable that contains the double value***
***var1 is of type string***

Any help is greatly appreciated

OmeLuuk
23rd February 2023, 16:09
sprintf$("%-16.2f",numeric_var)