Jump to content
We've recently updated our Privacy Statement, available here ×

ayparraguirre

Members
  • Posts

    4
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by ayparraguirre

  1. 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 call DSReportReceitaCorSolic 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
  2. Thanks Leo, I managed to solve it this way: "<style backcolor='"+ $F{HEXA} +"'>"+ $F{HEXA} +"</style>"
  3. Thanks for the way, but I'm new to IReport and I don't know how to do it! How do I make this html tag in textFieldExpression? My field comes from the database as $F{HEXA}, for example ... '# 000080'
  4. Hello everyone, I have in the database, in the color table, the RGB value for each color. In the color report, I need to show color data and a colored rectangle with the RGB found. How to dynamically change the background color of this rectangle, for each color shown? IReport 3.5.1
×
×
  • Create New...