Error in Production when linking to PDFReport

I have a grid with a field that is a link to a pdfreport. I create this link usingthe following macro:
sc_make_link (pdfreport_WRecibos.php, NRecibo={NRecibo});

The PDFReport has a parameter, NRecibo. This works perfectly when I try it in my development station, but when I deploy to the remote web server, I get this error:

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘’ at line 1

The development version and production are connected to the same database, so the error I think should appear in both cases. Production server has PHP version 7.3.19

I am using scriptcase version 9.04.0031.

Could you please help with this issue?