[SOLVED] FPreport print date base64 encoded lazarus / 5-Lazarus Extra Components ---------------------------------------------------------------------- dseligo · 2025-09-15 17:23 I have SQL like this (DB is SQlite): Code: MySQL  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i select date(insert_date_time) as insert_datefrom sometable Column insert_date_time in SQlite is defined like this: Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i insert_date_time datetime default (datetime(current_timestamp, ''localtime'')) Memo in FPreport is created like: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   Memo := TFPReportMemo.Create(FDataBand);  Memo.Layout.Left := ALeft;  Memo.Layout.Width := AWidth;  Memo.Layout.Top := ATop;  Memo.Layout.Height := AHeight;  Memo.Font.Name := AFont;  Memo.Font.Size := AFontSize;  Memo.TextAlignment.Horizontal := AHorAlignment;  Memo.Text := '[insert_date]'; These are values I get in FPreport (exported to PDF): Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i MjAyNS0wNy0wMw==MjAyNS0wNy0xMw==MjAyNS0wNy0xNQ== MjAyNS0wNy0xOA== With this: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i WriteLn(Que ry1.FieldByName('insert_date').AsString);WriteLn(Query1.FieldByName('i nsert_date').FieldDef.DataType); I get (for first row): Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i 2025-07-03ftMemo What could be the cause? I tried this on FPC 3.2.2 on Windows 11 and Android. ---------------------------------------------------------------------- anse · 2025-09-15 18:07 SQLite does not care much about defined column data types, and not even about results of functions like DATE() - most of them just return strings (which could be the cause of ftMemo), and the underlying driver you use does not really get information about the originated data type. ---------------------------------------------------------------------- dseligo · 2025-09-15 19:03 I don't mind string. Question is why FPreport encode this string in base64. And how do I prevent this. ---------------------------------------------------------------------- rvk · 2025-09-15 19:14 Probably because FPC considers TEXT from SQLite as memo and not as string. Same reason you get (memo) in a tdbgrid. I find this a wrong choice which was introduced some years ago. TEXT should have stayed a field type ftstring (as it was before). Similar topic here https://forum.lazarus.freepascal.org/index.php?topic=62022.0 You can cast to a varchar or use gettext to return string (same as the solution for tdbgrid). ---------------------------------------------------------------------- dseligo · 2025-09-16 10:48 Quote from: rvk on September 15, 2025, 09:14:18 pmProbably because FPC considers TEXT from SQLite as memo and not as string. Same reason you get (memo) in a tdbgrid. I find this a wrong choice which was introduced some years ago. TEXT should have stayed a field type ftstring (as it was before). Similar topic here https://forum.lazarus.freepascal.org/index.php?topic=62022.0 You can cast to a varchar or use gettext to return string (same as the solution for tdbgrid). Thank you for the link, solution from answer #5 (from paweld) worked. Casting doesn't work for me.