Jasper Studio does not Recognize CAST in MS SQL


Could you help me 

Jasper does not recognize the sentence CAST in the bellow:

SELECT dbo."Productos"."Codigo Producto",
dbo."Productos"."Descripcion Producto",
dbo."Almacenes"."Codigo Almacen",
dbo."Productos"."Control E",
dbo."Num_Series"."Num Serie",
CASE WHEN dbo."Num_Series"."cestado" < 3 THEN '1' 
ELSE CAST(dbo."Num_Serie"."cestado" AS varchar(30)) END AS CESTADO
FROM dbo."Productos"
FULL OUTER JOIN dbo."Num_Series" ON 
dbo."Productos"."ID Producto" = dbo."Num_Series"."ID Producto" 
FULL OUTER JOIN dbo."Almacenes" ON 
dbo."Num_Series"."ID Almacen" = 'NULL' 
dbo."Productos"."Tipo Producto" = 1) 
AND ( 
dbo."Num_Series".cestado < 3)

Thanks in advance.





jalvarez_2's picture
Joined: Mar 14 2017 - 10:45am
Last seen: 6 years 3 months ago

I didn't check it in MS-SQL server but at report level why don't you try casting using java expression ? 

sadakar - 6 years 6 months ago

Because that isn't really a normal situation in SQL. The JASPER SQL interface should support this really. Also, it would be really nice if you gave us an example of how that would work inline. 

jbarger.consultant - 4 years 1 month ago

0 Answers:

No answers yet