@panosdk
Can you please provide a compile-able short demo and maybe some sample data? Without a compile-able source code, most people can only guess but if we can run, debug and inspect into your source code, we can solve your problem - I believe - in just minutes. Simply providing some lines isn't very helpful, it won't run if I simply copy/paste them into my computer.
You can use:
Lazarus main menu > Project > Publish Project
or:
Create a new folder, copy and paste all the necessary files (sample data files) except: the binary (exe file), *.bak, lib and backup folders. Compress the folder and send the zip to the forum.
If you're not willing to publicize the whole project, you can provide a simplified version that still can show the issue.