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

shetty.rohit010482

Members
  • Posts

    4
  • Joined

  • Last visited

shetty.rohit010482's Achievements

Newbie

Newbie (1/14)

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

Recent Badges

0

Reputation

  1. I wanted to avoid writing conditional styles, so while researching I found I can use scriptlets. Its a very powerful feature of Jasper report wherein we can call Java code from Jasper report. In the function I passed on necessary parameters and the best thing was I can put style tag and hence when jasper report is rendered all the field for which I have called the function gets highlighted based on my business scenario. I would like to thank you Ann for providing some wonderful suggestion that helped to resolve this!!
  2. Thanks Ann again for your response.YOU really are giving some very good suggestions. However, my senerio is little bit different here - Actually my List contains all the field Name whose bg color needs to be changed in the PDF. So lets suppose there are 50 fields I am displaying on the report, based on the list I just need to highlight the one which are present in the List. So what I understood as of now is - > I will define a style for every field > include Conditional style, this will have conditional expression as paramList.contains(" ") > include this style to the field. so I will have as many style present as no of fields, SO EVERY field will have different style. I cannt use multiple conditional tag in same style as the list contains name which I am comparing it against my hardCode Field name. But, I wanted a way out if I can limit the style tag definition to one and with only one conditional tag and all the field use that. Please let me know if the problem statement is still not clear? Thanks for looking into this!
  3. Thanks for the reply! Actually, the input condition to enable the conditional formatting is a List. If specific name is present in the list I need to highlight particular field. Now another question, can I pass fieldName(Just like Java reflection??) to style check in the condition if that name is present. If yes I will hightlight. That way I will have only one style and one conditionalExpression (not sure???) Appreciate all your help on this!
  4. Hi thr! I have a question related to highlighting data in my generated PDF from Jasper. I want to highlight field with yellow background color based on certain condition. I googled it and found that we can use conditional styling for this. Something like this. <style name="alternateStyle" backcolor="#FFFFFF" fontName="Times New Roman"> <conditionalStyle> <conditionExpression><![CDATA[new Boolean(<Some condition>)]]></conditionExpression> <style mode="Opaque" backcolor="#FFFF33"/> </conditionalStyle> </style> Now, I want to apply this style on more then 1 item ( propably 100 for me) but the input condition(<some condition>) is different for every field. So wanted to check if I need to create separate style tag for every field or I could reuse same styletag. Appreciate your help on this! Thanks, Rohit
×
×
  • Create New...