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

anand0303

Members
  • Posts

    7
  • Joined

  • Last visited

anand0303's Achievements

Rookie

Rookie (2/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Hi Cralevic, Thanks for your wonderful suggestions. I was able to implement this workaround and could see the backcolor getting set in the exported xls file. There seems to be an issue with iReport itself when we try to set the backcolor directly using expressions. I have tested the implementation in OpenOffice. Will test them in MSOffice too. Will get back in case I need any assistance. Thanks again. Regards
  2. Hi Cralevic, Thanks a lot for your assistance. I will try the way you have suggested and will surely get back to you accordingly. One small question, are you able to see the backcolor getting displayed if you set the preview type to XLS PREVIEW? Regards
  3. Hi Cralevic , Thanks for your reply. Do you mean 'field' when you say 'cell'? Do I need to provide the same field twice for the particular column with one of them having backcolor = red? Can you please provide some sample code for the same? That will be really helpful. Regards
  4. Hi, Please do refer to the attachments below. I have set a very simple expression in the textfieldexpression property for that particular field: "<style isDefault='false' mode='Opaque' backcolor='#FF0000'>" + $F{PLANNED_HOURS} + "</style>" The results of internal preview and the xls generated by ireport using openoffice installed on my machine are attached. Please advice.
  5. Hi all, Thanks for your responses. The values are getting displayed correctly and the null conditions are also handled properly. I have set two different properties here: backcolor and isbold. The isbold (and some others like forecolor etc) works absolutely fine. The issue occurs only with the backcolor property. Regards
  6. Hi all, I am trying to set the backcolor property of a particular field in my report using the following expression: ($F{BUDGETED_HOURS}.equals( "NA" ))? $F{PLANNED_HOURS}: ( $F{PLANNED_HOURS}.equals( "NA" )? $F{PLANNED_HOURS}: ( Double.parseDouble($F{PLANNED_HOURS}) > Double.parseDouble($F{BUDGETED_HOURS})? "<style backcolor='#FF0000' isBold='true'>" + $F{PLANNED_HOURS}.toString()+"</style>" : $F{PLANNED_HOURS})) As seen above, I have tried to set both the backcolor and isbold properties. When exported to excel file, I can see the text getting set to bold but cannot see the backcolor getting applied. I tried setting some more properties like FORECOLOR, UNDERLINE etc.. all of them gets applied except the backcolor. I am trying to view the exported xls in Openoffice. For this particular field I have set opaque = true and markup = styled. The logic for exporting to xls is as below: JRXlsExporter exporterXls = new JRXlsExporter(); exporterXls.setParameter(JRXlsExporterParameter.JASPER_PRINT,jp); exporterXls.setParameter(JRXlsExporterParameter.OUTPUT_STREAM, xlsReport); exporterXls.exportReport(); bytes = xlsReport.toByteArray(); response.setContentType("application/xls"); response.setContentLength(bytes.length); response.setHeader("Content-Disposition", "attachment;filename=Report.xls"); out.write(bytes, 0, bytes.length); out.flush(); out.close(); My ireport version is 4.0 Please help. Thanks in advance.
  7. Hi all, I have designed a report containing a set of 5 different fields. All these are STRING values. Among these are two fields named: BUDGETED and ACTUAL. I want to show the data corresponding to ACTUAL in red color if the value of ACTUAL is greater than BUDGETED when exported in excel format. The value itself should be displayed in red color or the excel cell should have a color red Can someone please help me in this? Thanks in advance.
×
×
  • Create New...