I have some sql which passes an id to a mysql function to return the text value. If this function returns null because the value does not exist, KoolReport table is displaying this as 0
I suspect this is because KoolReport cannot determine the type of variable it is.
Is there any way I can tell KoolReport that this field is actually text and nulls are valid.
The function is coded like this and accepts 1 integer parameter
BEGIN
DECLARE theTitle VARCHAR(50);
SELECT Title INTO theTitle FROM tbl_codes WHERE Id = Id;
RETURN theTitle;
END
My query passed into KoolReport is like this,
SELECT CONCAT(STU.LastName,', ',STU.FirstName) AS 'Name',
funcGetCode(STU.ClassId) AS 'StudentClass'
FROM tbl_students AS STU
Many thanks