ayparraguirre Posted March 11, 2021 Share Posted March 11, 2021 Hello everyone,I have a fabric report and I need to view a sample of each color shown.I am coloring a TextField field, according to the hexadecimal value that is in the database.In Text Field Expression, I use: "<style backcolor = '" + $ F {HEXA1} + "' forecolor = '" + $ F {HEXA1} + "'>" + $ F {HEXA1} + " </style> "It is working in the Preview of IREPORT, but when I put it in the application (Java EE), the color does not appear and only shows the expression above.In the code of the generated html page it looks like this: <td colspan = "9" style = "text-align: center;"> <span style = "color: #FFFFFF; background-color: #FFFFFF;"> & lt; style backcolor = '# 7E7CA8' </span> </td>My call from ManagerBean is this:// report callDSReportReceitaCorSolic ds = new DSReportReceitaCorSolic(listareportenviocorcli);InputStream arquivo = FacesContext.getCurrentInstance().getExternalContext().getResourceAsStream("/envio_amostra_cliente.jasper");byte[] pdf = JasperRunManager.runReportToPdf(arquivo, null, ds);HttpServletResponse res = (HttpServletResponse) FacesContext.getCurrentInstance().getExternalContext().getResponse();res.setContentType("application/pdf");res.setContentLength(pdf.length);OutputStream out = res.getOutputStream();out.write(pdf, 0, pdf.length);out.flush();out.close();FacesContext.getCurrentInstance().responseComplete();Does anyone know how to show the color, as in the preview of IREPORT? Thank you 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