carlos1972 Posted December 22, 2023 Share Posted December 22, 2023 Buenos días, he creado un informe en jasperreports que visualiza una ficha con un campo "foto" (blob). Al realizar el preview del informe recupera perfectamente los datos y no devuelve ningún error. Pero al lanzar la ejecución del informe desde java netbeans devuelve el error: net.sf.jasperreports.engien.JRException: Unable to get value for result set field "foto" of class java.lang.object Link to comment Share on other sites More sharing options...
carlos1972 Posted December 22, 2023 Author Share Posted December 22, 2023 Just now, carlos1972 said: Buenos días, he creado un informe en jasperreports que visualiza una ficha con un campo "foto" (blob). Al realizar el preview del informe recupera perfectamente los datos y no devuelve ningún error. Pero al lanzar la ejecución del informe desde java netbeans devuelve el error: net.sf.jasperreports.engien.JRException: Unable to get value for result set field "foto" of class java.lang.object El error salta en la línea : jasperprint informe=JasperFillManager.FillReport(jrparametro,conn); si elimino el campo foto no da ningún error y se visualiza perfectamente Link to comment Share on other sites More sharing options...
Swapnil Pawar Posted January 3 Share Posted January 3 Hello, Please Confirm that the "foto" field is a Blob type in both your database and your Java code. If it is, ensure that you are handling Blob data correctly when populating the result set. Make sure you are using the appropriate data type and methods to retrieve Blob data from the result set. If the "foto" field is stored as a Blob in the database, make sure you are correctly handling the type casting in your Java code when retrieving the Blob from the result set. I hope this will help you, thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now