Possible Bug win report:

Hi, i am creating a new report, i have my sql:

SELECT
VEN_CDGO as Codigo,
VEN_NMRO as Numero,
VEN_FCHA,
VEN_FCHASSTMA,
VEN_VLORTTAL as Valor,
VEN_FRMAPGO as FormaPago,
VEN_PROCSDO as Procesada,
VEN_OBSRVCION as Observacion,
TDO_CDGO as Tipo_documento,
VEN_ACTVO as Activo
FROM
my table

But i am getting an error when i generate the code: Fig. 1.

If i see the configutarion of my field “Valor” this is Currency, BUT it haven’t SQL Type. Fig 2.

If i Totalize This field, It show a message Fig. 3.

I think this error is caused by field VALOR. i need to know how fix it? (setting SQL TYPE)?
Or how can i fix this Bug?
[ATTACH=CONFIG]n64532[/ATTACH]

sc_error_sql_type.png

The table structure with data types would be helpfull I think.

Ok, rr my database is mysql, In this case the field for:
VEN_VLORTTAL as Valor is decimal(14,2)

Before i had same problem with the field:
VEN_FCHASSTMA, it is datetime. (It had Alias FECHA and SC did not generate the SQL type).

I think SC has some problems in reports witn SQLs and Alias for fields.

Hello,

Could your inform all data about the VEN_VLORTTAL(Currency) column?
Also inform the database that you’re using, please.

Hello,

Thank you! I’ll to try simulate it for you.

Hi, John this this my SQL Original, I Dont n’t know if the use of functions cause this problem:
I would lilke you tested with user functions.

SELECT
VEN_CDGO as Codigo,
VEN_NMRO as Numero,
VEN_FCHA,
VEN_FCHASSTMA,
f_get_ternombre(TER_CDGOCLI,“N”) as Tercero,
f_get_sucnombre(SUC_CDGO) as Sucursal,
f_get_bodnombre(SUC_CDGO, BOD_CDGO) as Bodega,
f_get_esdnombre(ESD_CDGO) as Estado,
f_get_lvdnombre(LVD_CDGO_CNCPTO) as Concepto,
VEN_VLORTTAL as Valor,
VEN_FRMAPGO as Forma,
VEN_PROCSDO as Procesa,
VEN_OBSRVCION as Observa,
TDO_CDGO as Tipo_docu,
VEN_ACTVO as Activo
FROM
my_table
WHERE …
ORDER BY 1

Could be a possible problem for the parser. Try to put this select on a View and try again.

Thanks you Giu.
My report could work well with a view. But, I can not create a view for each report,
Maybe SC Team can solve it for other versions.

Hi, any idea how solve it ?

🚀 Scriptcase 9.12 is now available! Check out the new features here 👉🚀 Next Monday (02/24), Scriptcase 9.12 will be released! Check out the new features before anyone else 👉