Jump to content

yatanveersingh

Members
  • Posts

    4
  • Joined

  • Last visited

yatanveersingh'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. please advice me how to achieve this, I am stuck and unable to procede. thanks Yatan
  2. hi', I am unable to set conditional expression in jasper report, I am able to get the jasper report style and able to set the font but after, I am stuck at creating the conditional style sheet using API,I am able to create new condition statement but uable to set it back to parent stylesheetThe set method is missing. //Creating new conditional statmentsJRConditionalStyle[] JRCS2=new JRConditionalStyle[4]; JRCS1[0].setStyledText(new Boolean(eventType.toString().equalsIgnoreCase("COH")));JRCS1[0].setBackcolor(clr2); //???????? How to set JRCS2 in JRSTYLE[0] where JRCS2 is the new conditional statments//JRSTYLE[0].setConditionalStyles(JRCS2); Code: try { JasperDesign jasperDesign = JRXmlLoader.load(JRXMLFile); System.out.println(".jrxml loded"); JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign); System.out.println(".jrxml compiled"); Color clr11=new Color(255100250);//"255100250" this colour code will come from DB Color clr2=new Color(255250250);//255250250 Color clr3=new Color(250100250);//250100250 Color clr4=new Color(100100250);//100100250 /*get stylesheets from jrxml*/ JRStyle[] JRSTYLE=jasperReport.getStyles(); //Able to get the conditional statments JRConditionalStyle[] JRCS1=JRSTYLE[0].getConditionalStyles(); JRCS1[0].setBackcolor(clr11); JRCS1[1].setBackcolor(clr2); JRCS1[2].setBackcolor(clr3); JRCS1[3].setBackcolor(clr4); //Creating new conditional statments //JRConditionalStyle[] JRCS2=new JRConditionalStyle[4]; //JRCS1[0].setStyledText(new Boolean(eventType.toString().equalsIgnoreCase("aa"))); //JRCS1[0].setBackcolor(clr2); //JRSTYLE[1].setStyledText(new Boolean(eventType.toString().equalsIgnoreCase("bb"))); //JRSTYLE[1].setBackcolor(clr3); /* JRSTYLE[2].setStyledText(new Boolean(eventType.toString().equalsIgnoreCase("ww"))); JRSTYLE[2].setBackcolor(clr1); JRSTYLE[3].setStyledText(new Boolean(eventType.toString().equalsIgnoreCase("rr"))); JRSTYLE[3].setBackcolor(clr1); */ //???????? How to set JRCS2 in JRSTYLE[0] where JRCS2 is the new conditional statments //JRSTYLE[0].setConditionalStyles(JRCS2);
  3. hi all, I want to design report where font and colour should change dynimically. The colour code should come from some Database or properties file. I am able to achieve this programmitically but not getting how to do this through iReport. please help me how to achieve this. thanks yatan
  4. hi', I want to create report where the data being displayed in the report for each column should be displayed in the different colour, and the colour code will come from database. this is something similiar to "highlight odd or even rows with a background colour" however here I require "different colors for each row" where the colour code for each row is coming from database. please advice me how to achieve this in iReport. thanks Yatan Post Edited by yatanveersingh at 01/15/2010 11:21
×
×
  • Create New...