Jump to content
Changes to the Jaspersoft community edition download ×


  • Posts

  • Joined

  • Last visited

shrije's Achievements


Enthusiast (6/14)

  • First Post Rare
  • Collaborator Rare
  • Conversation Starter Rare
  • Week One Done
  • One Month Later

Recent Badges



  1. i could make it work with jfreechart. IReport demo samples have one to use jfreechart on jasper templates. Here one can use jfreechart with histogram to show the chart. Getting the sample data for histogram was a challenge since it does not publish one on their site but i managed to get one from the source code sites.
  2. I use iREport version 3.7.0. It does not seem to support histogram yet. Do the latest version of iReport support it or I should try the jfreechart APIs to do the same as mentioned in your reply. Regards, Shrirang
  3. It will stll with the same template since jasperPrint is the one which will be different for different reports in your case. Just that you have to provide different datasources to the same jasper file to get the jasper print object to finally append them.
  4. Cuurently i feel there is no way to vertically align image or text in a band. I have a detail band with dynamic records. I have to place an image on this band such that depending on the no of records the image appears vertically centered.
  5. Please find the below code. One report corresponds to the one jasper file. Appending one report with another can happen with the code given below. It will be an as-is append. Code: for( int i = 0; i < listOfInputjasperpath.size(); i++ ) { try { JasperPrint jasperPrint = JasperFillManager.fillReport( listOfInputjasperpath.get( i ) + ".jasper", params ); listOfJasperPrint.add( jasperPrint ); } catch( JRException e ) { throw new RuntimeException( "Exception related to Jasper Filling Data " + e ); }
  6. To solve the issue as discussed, i extended JRXmlDataSource overridden getFieldValue(). It works for all the types of fields with class java.langString. It does not work when i use this fields in the text box having a different type other than java.lang.String. Atleast it didno work with the type i was using (java.io.InputStream). Below is the code for the same. Initially if i return blank string it would throw JRExpressionEvalException.When i return new String(" "), it does not throw any excpetion but does not render the image for me too as in my example. I tried to debug but the code is dynamically generated so i was having diffculty debugging it. Code:public class BIXmlDataSource extends JRXmlDataSource{ /** * <p> * Create a new instance of BIXmlDataSource. * </p> * @param document * @throws JRException */ public BIXmlDataSource( Document document ) throws JRException { super( document ); } public Object getFieldValue(JRField jrField) throws JRException { Object object = super.getFieldValue( jrField ); if(jrField.getValueClassName().equalsIgnoreCase( "java.lang.String" ) && object == null ){ return new String(" "); }else return object; }<image onErrorType="Blank"> <reportElement x="0" y="0" width="55" height="27" isRemoveLineWhenBlank="true"/> <box> <pen lineWidth="1.0"/> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <imageExpression class="java.io.InputStream"><![CDATA[new ByteArrayInputStream(Base64Decoder.decode($F{pin-legend}))]]></imageExpression> </image>
  7. The issue number is 0004774. I found it in tracker. Thanks.
  8. Thanks. I will implement the suggestion. I fail to remember the url to add the feature request for this item. Is it just through a new forum topic?
  9. Blank when not null works when the field is alone part of the text field. But the problem is when i have to add a label to the text field as in "Diagnosis :" + ${field} In such cases, i have to check if each field is empty as part of the expression. I could also add label field and text field seperately. But at time i need the text appearing justified along with the label as in: Diagnosis: This is a Comment. This is a Comment.This is a Comment.This is a Comment.This is a Comment.This is a Comment.This is a Comment.This is a Comment.This is a Comment. During such times, having blank when null at the report level makes work light a lot. On a seperate note adding "additional detail bands in reports " was a boon for our kind development since we used to add groups in order to get bands otherwise in the previous versions. I have used jasper reports for quite some time now and the change i see has been phonomenal.
  10. I use jasper reports 3.7.0 with XML Datasource. I transform javabeans to xml using castor api and then use the xml as datasource for my reports. When any field in the javabean is zero-length string or null, the xml nodes for such fields are not created in the xml and thus they show up as "null" in the reports. I used the blanket property in jasper "When Resource Missing Type" as "Type Empty" but this would not work since the field does not have any value or may be it is not meant for the same. Also blank when null would not work if set for each field. Is there any other way to avoid this?
  11. Chart with customised legend. I need to customise the chart as shown in the attachment. Please let me know how i can get the + sign on the bar of the graph.
  12. Hi I have a requirement where the fonts to be supported for PDF are open type fonts with the file extension *.otf. I wonder if these are supported in jasper reports 3.7.0 as I tried to install them though iReport it gave a compatibility error. I am attaching one such font file with this post.
  13. You need to create Group and place city field in the group with the evaluationGroup as the name of the Group say CityGroup. You do not need seperate bean for this. Same bean will render the values for group as well as the other fields in detail. Shrirang
  14. I will check that in future. Sorry for the confusion. But the issue with subreport is fixed now. I looked at the samples with the JR source code and could figure out. Shrirang
  15. I am in great trouble. I created around 10 odd templates to completion and then i was trying to use maven plugin to compile the jrxml files to get the jasper files as installation artifacts. But the plugin from codehaus did not support groovy language expressions. Actually the groovy language must have been set by default. Now when i turn the language property to java my old expressions dont work and strangely i am not somehow able to fix the issue. My question is do we have a plugin which compiles jrxml files in groovy language. How can i get it ?
  • Create New...