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

sanbez

Members
  • Posts

    296
  • 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 sanbez

  1. <?xml version="1.0" encoding="UTF-8"?> select 1.12 Profit, 'not null field' descr from dual</p><p> union all select null, 'null field' from dual PROFIT DESCR $F{PROFIT} == null ? "N/A" : new DecimalFormat("#,##0.00").format($F{PROFIT}) $F{DESCR}
  2. Check this report in your environment. In my case it's worked perfect (JR 4.8.0) <?xml version="1.0" encoding="UTF-8"?> select 1.12 Profit, 'not null field' descr from dualunion all select null, 'null field' from dual PROFIT DESCR $F{PROFIT} == null ? "N/A" : new DecimalFormat("#,##0.00").format($F{PROFIT}) $F{DESCR}
  3. 1. The operator && is undefined for the ar... Give more stack trace. This message inappropriate arguments. In this message give info about current type arguments in operator &&
  4. "yavisieren" is a variable? Then use $V instead $F And replace & to && Result: $V{REPORT_COUNT}.intValue() % 2 == 1 && $V{yavisieren}
  5. Use built-n variable $V{REPORT_COUNT}
  6. What means termNuber? It is not described in questions. As I understand, you want print "test" if field "Term2 Prog" == null. Do I understand correctly?
  7. replace "new Double(($F{totallines}" to new "BigDecimal(($F{totallines}" in all occurences. Method multiply is not applicable for Double.class, оnly for BigDecimal. Which type of field $F{totallines} ? If this = java.lang.int, then replace last $F{totallines}) to Integer.toString($F{totallines) If this = java.lang.Integer replace last $F{totallines} to $F{totallines}.toString()
  8. Check in iReport Tools/Options/ClassPath Which version of jasperreports-X.Y.Z.jar in this classpath? After upgrade iReport to new version installer may save old classpath in new iReport with uncompatible libraries (previous version jasperreports-x.y.z.jar)
  9. Make change in org.jfree.chart.plot.PiePlot.java in methods "drawLeftLabels" and "drawRightLabels": drawLeftLabels // was: // labelBox.setBackgroundPaint(this.labelBackgroundPaint); // now: labelBox.setBackgroundPaint(lookupSectionPaint(leftKeys.getKey(i))); drawRightLabels // was // labelBox.setBackgroundPaint(this.labelBackgroundPaint); // now labelBox.setBackgroundPaint(lookupSectionPaint(keys.getKey(i))); and rebuild jfreechart-1.0.12.jar you get: But it will act on all reports PieChart (and PieChart3D)
  10. Upgrade this. You lose a lot of functionality, staying in the old version
  11. Which version of jasper? In iReport 4.0.0 and later you may use Table and set "Column print when" condition. In this case all values on column will be hidden, and others columns shift left (there is no empty space).
  12. Interesting questions! Only one private field present in org.jfree.chart.plot.PiePlot /** The color used to draw the background of the section labels. */ private transient Paint labelBackgroundPaint; source for draw labels: for (...) { TextBox labelBox = new TextBox(block); labelBox.setBackgroundPaint(this.labelBackgroundPaint); } Probably, it is possible write own class extends org.jfree.chart.plot.PiePlot and override 2-3 methods of this class. But is it possible "deceive" jasper and use my own class instead org.jfree.chart.plot.PiePlot ?
  13. There are no differences in the construction of crosstab by sql query or collection java-beans. See related sections in "iReport 3.7.pdf" (Shamsuddin Ahammad) for example.
  14. Set expression as "<b>Today is:</b> " + $F{DATE} and set in properties of textfield "Markup"="html"
  15. Which type of calculation setting on cell of table? Try to use Calculation = Sum in value expression for data cell. And it may be required to write: Incrementer (implements JRExtendedIncrementer) and IncrementerFactory (implements JRExtendedIncrementerFactory) classes on java I am make this for calculation sum on crosstab where cell of crosstab is complex data. And it's work fine. I am think that for cell of table it's also will be work (for calculation in cell = "Sum" and set your incrementer)
  16. Sorry, I did not understand your question exactly 1. If you want pass into subreport only thee fields from main report. Use subreport DataSource expression (instead $F{SubRep}) new JREmptyDataSource() and pass $F{nroCuenta} (and others) as parameters into subreport (in iReport it's below dataSource expression) After that display this params in Title section of subreport 2. If you want pass collection (many rows) into subreport, then Subreport expression must be like: new MyClass(...) where myClass must "implements JRDataSource" interface (realization methods next() and getFieldValue(JRField field))
  17. Can you change DataSource expression for subreport in main report? And define DataSource expression and connection type parameters into "Use Datasource expression". Which type of Datasource you use for subreport? Is it JavaBeanCollection? Or something else?
  18. Initially, I would have tried to display empty subreport (without dataSource, only with static Title in subreport). Can you check this simple case? In subreport properties set property "Wneh no data"="All sections, No detail" and to see on result of execution.
  19. In some cases JR can't found subreport for execution. To avoid this problem define standart parameter of main report SUBREPORT_DIR and use it for subreport expression, for example: $P{SUBREPORT_DIR} + "r1080Subreport.jasper"
  20. jkaur Wrote: I can't see what the problem is! I am too. :) Telepaths went on vacation Can you put jrxml and class for subreport datasource (if this in java) ?
  21. add path into iReport options: Tools/Options/ClassPath for example: D:\work\Subversion\repMiniASCUE\main\Project\Reports\classes and in JavaBeanDataSource window define full path to class: ru.rtec.reports.miniascue.r1070.MaxPower
  22. // define parameters, displayed in title Map<String, Object> params = new HashMap<String, Object> params.put("dvlmclltitl", yourVariable1); params.put("dvlmcllcntn", yourVariable2); // .... and so on for all parameters // define collection for DataSource List<MyBean> listForDataSource = new ArrayList<MyBean>(); // .... put all result of query in this list // here must be your code: listForDataSource.add(new MyBean(reqdscdnm1, reqnm1, reqdesc1)); listForDataSource.add(new MyBean(reqdscdnm2, reqnm2, reqdesc2)); .... JasperFillManager.fillReport(jasperReport, params, new JRBeanCollectionDataSource(listForDataSource)); } // end of filling report Write MyBean.java with getters (Jasper use getters as fieldname) for example: public class MyBean { private String reqdscdnm; private String reqnm; private String reqdesc; public String getReqdscdnm() { return reqdscdnm; } public String getReqnm() { return reqnm; } public String getReqdesc() { return reqdesc; } // constructor public MyBean(String reqdscdnm, String reqnm, String s3) { this.reqdscdnm = reqdscdnm; this.reqnm = reqnm; this.reqdesc = reqdesc; } In described case you have one "record" (in fact list of parameters in Title) and some records in detail section Sorry for innaccuracy :(
×
×
  • Create New...