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. Solution with subreports: Main DataSource based on second query. At this case main report contaion field $F{employee_id} Make subreport with parameter $P{emp_id} and put subreport into detail section of main report. Subreport query like this: select last_name, salary from employees_db_1 where employee_id = ${emp_id} Pass field of main report $F{employee_id} into subpreport as value of parameter $P{emp_id}. ...but... I think that subreport is over-powered solution of this problem. You can use one query select db1.last_name, db1.salary from employees_db1 db1, employees_db2 db2 where employee_nick_name = $P{employee_nickname) and db2.employee_id = db1.employee_id Subreport is not need at this case
  2. Set positionType on frame = Fix Relative To Top. Probably it's enouth for reesolving problem. In addition you can set position for subreport = Fix Relative to bottom (I suppose it not need)
  3. Show what you try (jrxml) and explain which field you want calculate
  4. You mast use Table component (jr:table) and set for column of table (jr:column) Column Print When expression like: $F{myFIeldStudentLastName} != null Example here: community.jaspersoft.com/wiki/how-suppress-table-column-report
  5. 1. Insert static text in title band of Charge_Type_Entries_Report (subreport). Is it will displaing? 2. Show values $P{Logo} and $P{0}. You can display it in main report.
  6. 1. Question: (Subreport using java beans) jrxml: <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> ??? I am don't see expression like 'new JRBeanCollecitionDataSource(collection)' for subreport. 2. Why subreport placed in title of main report? If you want display Entry in subreport then subreport must be placed in detail band whith dataSousrceExpression like new JRBeanCollectionDataSource($F{entries})
  7. Why you wrote at jaspersoft and stackoverflow the same wrong (uncorrect) question? You can't get right answer with this description. You're wasting people's time. You must correct mistakes and show fields declarations. And show result with $F{source}.equals("Periodic Report")
  8. Why 7 digids? You start only with 4 :) I guess that one of the possible values of $F{RACE_CODE} is "abcxyz" (you don't write example of data). Is it right? In this case you can use expression like this (java code example): public static void main(String[] args) { String RACE_CODE = "abcxyz"; System.out.println(RACE_CODE.indexOf("abc") == -1 ? "0" : "1" + (RACE_CODE.indexOf("lmn") == -1 ? "0" : "1") + (RACE_CODE.indexOf("pqr") == -1 ? "0" : "1") + (RACE_CODE.indexOf("xyz") == -1 ? "0" : "1")); }[/code]
  9. $F{RACE_CODE} == 'abc' && $F{RACE_CODE} == 'xyz' always false. >>For one person there can be multiple RACE_CODE assigned to it. Report field have only one value. Question is unclear
  10. 1. I am don/t understand which reason make string parameters? You can use dates in query. 2. Order parameters sometimes is important. Place parameters in tree in order when dependent parameters after parent: date_from, date_to, from_date, to_date Good luck
  11. It is wrong (or not full) description of problem. In first message you say about "Type mismatch: cannot convert from boolean to Object" Now: "Type mismatch: cannot convert from long to Object." Why you wrote about difference errors? You don't show stacktrace. You don't show definition $F{invoiceHeader} in jrxml. Telepaths are on vacation :) Probably you can try change getInvoiceId() {return long} to getInvoiceId() {return Long} But this is only an attempt to guess without seeing anything
  12. subj Tibco Jaspersoft Studio Version 6.01.final Workspace settings project window tortorize diff I choose menu items File->Convert Line Delimiters To -> Windows (CRLF,...) [default] R1020.jrxml not changed. Date modification file not changed. After change EOL at R1020.jrxml by notepad++ tortorize diff After any change report by JasperSoftStudio EOL return to UNIX (LF). I have problem with commit to svn. How i can change EOL by JasperSoftStudio?
  13. You must ask concrete question https://www.google.ru/?gfe_rd=cr&ei=v5DPVPGNGaOr8we4x4KIBQ&gws_rd=ssl#newwindow=1&q=export+jasper+to+pdf
  14. http://community.jaspersoft.com/questions/540266/merging-rows-table
  15. Why you wrote about jdk 1.6.0? I see in log C:Program FilesJavajdk1.8.0_20jre http://community.jaspersoft.com/questions/842001/ireports-vs-jdk18-64-bit-opening-issue http://community.jaspersoft.com/questions/843388/ireport-and-java-8-compatibility
  16. Section "3.10 Subreports" is only brief introduction. This section is only sufficient for development in the style "firing with closed eyes" :)
  17. This documentation does not contain sections: crosstabs, lists, barcodes, groups, scriplets. iReport guide contain CHAPTER 17 SUBREPORTS, but rhis section is missing in jaspersoft-studio-user-guide. Why???
  18. I am use v4.1.2 and haven't time upgrage applications :) You can download java-source jasperreports-5.6.1-project.tar.gz and find it off one's own bat
  19. error: argument mismatch; Map<String, String> connot be converted to Map<String, Object> replace declaration Map<String,String> parametros = new HashMap<> to Map<String, Object> parametros = new HashMap<String,Object>
  20. The third parameter is interface JRDataSource. What is ParticipantesDataSource? Show source of this class
  21. Try move $P{calculate} down in list of parameters in iReport(Studio?). The example: Parameters param1 param2 calculate Sometimes order of parameters (variables?) is important
  22. Hi, all. JR versin 4.1.2 I have report with subreport. From main report I pass parameter $P{myDataSource} = new MyClassDataSource(parent_object_from_main_report) into subreport. Connection type for supreport = Don't pass data MyClassDataSource implements JRDataSource interface (In subreport displayed measures for object of main report per day. Search data and calculation runs at constructor) Subreport have table, placed into summary band. Another bands was deleted in iReport. Subreport have only table. measures is my special java-object ValHoled. For this object I write incrementer (some copypaste from net.sf.jasperreports.engine.fill.JRBigDecimalIncrementerFactory with little correction) public class ValHoledIncrementerFactory implements JRExtendedIncrementerFactory {protected static final ValHoled ZERO = new ValHoled(0d);// blah blah blah @Override public Object increment(JRCalculable variable, Object expressionValue, AbstractValueProvider valueProvider) throws JRException { ValHoled value = ValHoled.duplicate((ValHoled)variable.getIncrementedValue()); ValHoled newValue = (ValHoled)expressionValue; if (value == null || variable.isInitialized()) { value = ValHoled.duplicate(ValHoledIncrementerFactory.ZERO); } if (newValue == null) { return value; } System.out.println("variable ="+value.toString()); System.out.println("increment ="+newValue.toString()); value.inc(newValue); System.out.println("result ="+value.toString()); new Exception().printStackTrace(System.out); System.out.println(); return value; }[/code]Variable for sum declared only in Table DataSet 1. Subreport haven't fields and variables. All work only in Table DataSet. The result is correct. Sum calculated as i need. But the questions. Why calculation summary value runs twice? Data source of subreport is empty IMHO (?). I try pass JREmptyDataSource into subreport - the same result. Incrementer runs twice. This unnecessary work... Sysout log (in main report only one object) found measures from db 03.01.2014 01:00:00 value=15.0 0 03.01.2014 02:00:00 value=2.0 0 03.01.2014 03:00:00 value=3.0 0 03.01.2014 04:00:00 value=4.0 0 03.01.2014 05:00:00 value=5.0 0 03.01.2014 06:00:00 value=0.0 1 03.01.2014 07:00:00 value=7.0 0 03.01.2014 08:00:00 value=8.0 0 03.01.2014 09:00:00 value=9.0 0 03.01.2014 10:00:00 value=10.0 0 03.01.2014 11:00:00 value=0.0 0 03.01.2014 12:00:00 value=22.0 0 03.01.2014 13:00:00 value=33.0 0 03.01.2014 14:00:00 value=44.0 0 03.01.2014 15:00:00 value=55.0 0 03.01.2014 16:00:00 value=66.0 0 03.01.2014 17:00:00 value=77.0 0 03.01.2014 18:00:00 value=88.0 0 03.01.2014 19:00:00 value=99.0 0 03.01.2014 20:00:00 value=0.0 0 03.01.2014 21:00:00 value=0.0 0 03.01.2014 22:00:00 value=0.0 0 03.01.2014 23:00:00 value=23.0 0 04.01.2014 00:00:00 value=24.0 0 variable =value=0.0 0 increment =value=15.0 0 result =value=15.0 0 java.lang.Exception at ru.rtec.reports.miniascue.util.ValHoledSumIncrementer.increment(ValHoledIncrementerFactory.java:118) at net.sf.jasperreports.engine.fill.JRAbstractExtendedIncrementer.increment(JRAbstractExtendedIncrementer.java:42) at net.sf.jasperreports.engine.fill.JRCalculator.estimateVariables(JRCalculator.java:182) at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:843) at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:1439) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:127) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:903) at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:647) at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:59) at net.sf.jasperreports.engine.fill.JRThreadSubreportRunner.run(JRThreadSubreportRunner.java:205) at java.lang.Thread.run(Thread.java:619) variable =value=0.0 0 increment =value=15.0 0 result =value=15.0 0 java.lang.Exception at ru.rtec.reports.miniascue.util.ValHoledSumIncrementer.increment(ValHoledIncrementerFactory.java:118) at net.sf.jasperreports.engine.fill.JRAbstractExtendedIncrementer.increment(JRAbstractExtendedIncrementer.java:42) at net.sf.jasperreports.engine.fill.JRCalculator.calculateVariables(JRCalculator.java:144) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:748) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:271) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:129) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:903) at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:647) at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:59) at net.sf.jasperreports.engine.fill.JRThreadSubreportRunner.run(JRThreadSubreportRunner.java:205) at java.lang.Thread.run(Thread.java:619) variable =value=15.0 0 increment =value=2.0 0 result =value=17.0 0 java.lang.Exception at ru.rtec.reports.miniascue.util.ValHoledSumIncrementer.increment(ValHoledIncrementerFactory.java:118) at net.sf.jasperreports.engine.fill.JRAbstractExtendedIncrementer.increment(JRAbstractExtendedIncrementer.java:42) at net.sf.jasperreports.engine.fill.JRCalculator.estimateVariables(JRCalculator.java:182) at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:843) at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:1439) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:131) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:903) at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:647) at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:59) at net.sf.jasperreports.engine.fill.JRThreadSubreportRunner.run(JRThreadSubreportRunner.java:205) at java.lang.Thread.run(Thread.java:619) variable =value=15.0 0 increment =value=2.0 0 result =value=17.0 0 java.lang.Exception at ru.rtec.reports.miniascue.util.ValHoledSumIncrementer.increment(ValHoledIncrementerFactory.java:118) at net.sf.jasperreports.engine.fill.JRAbstractExtendedIncrementer.increment(JRAbstractExtendedIncrementer.java:42) at net.sf.jasperreports.engine.fill.JRCalculator.calculateVariables(JRCalculator.java:144) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:748) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportContent(JRVerticalFiller.java:291) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:133) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:903) at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:647) at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:59) at net.sf.jasperreports.engine.fill.JRThreadSubreportRunner.run(JRThreadSubreportRunner.java:205) at java.lang.Thread.run(Thread.java:619) variable =value=17.0 0 increment =value=3.0 0 result =value=20.0 0 java.lang.Exception at ru.rtec.reports.miniascue.util.ValHoledSumIncrementer.increment(ValHoledIncrementerFactory.java:118) at net.sf.jasperreports.engine.fill.JRAbstractExtendedIncrementer.increment(JRAbstractExtendedIncrementer.java:42) at net.sf.jasperreports.engine.fill.JRCalculator.estimateVariables(JRCalculator.java:182) at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:843) at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:1439) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:131) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:903) at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:647) at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:59) at net.sf.jasperreports.engine.fill.JRThreadSubreportRunner.run(JRThreadSubreportRunner.java:205) at java.lang.Thread.run(Thread.java:619) variable =value=17.0 0 increment =value=3.0 0 result =value=20.0 0 java.lang.Exception at ru.rtec.reports.miniascue.util.ValHoledSumIncrementer.increment(ValHoledIncrementerFactory.java:118) at net.sf.jasperreports.engine.fill.JRAbstractExtendedIncrementer.increment(JRAbstractExtendedIncrementer.java:42) at net.sf.jasperreports.engine.fill.JRCalculator.calculateVariables(JRCalculator.java:144) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:748) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportContent(JRVerticalFiller.java:291) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:133) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:903) at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:647) at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:59) at net.sf.jasperreports.engine.fill.JRThreadSubreportRunner.run(JRThreadSubreportRunner.java:205) at java.lang.Thread.run(Thread.java:619) variable =value=20.0 0 increment =value=4.0 0 result =value=24.0 0 java.lang.Exception at ru.rtec.reports.miniascue.util.ValHoledSumIncrementer.increment(ValHoledIncrementerFactory.java:118) at net.sf.jasperreports.engine.fill.JRAbstractExtendedIncrementer.increment(JRAbstractExtendedIncrementer.java:42) at net.sf.jasperreports.engine.fill.JRCalculator.estimateVariables(JRCalculator.java:182) at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:843) at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:1439) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:131) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:903) at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:647) at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:59) at net.sf.jasperreports.engine.fill.JRThreadSubreportRunner.run(JRThreadSubreportRunner.java:205) at java.lang.Thread.run(Thread.java:619) variable =value=20.0 0 increment =value=4.0 0 result =value=24.0 0 java.lang.Exception at ru.rtec.reports.miniascue.util.ValHoledSumIncrementer.increment(ValHoledIncrementerFactory.java:118) at net.sf.jasperreports.engine.fill.JRAbstractExtendedIncrementer.increment(JRAbstractExtendedIncrementer.java:42) at net.sf.jasperreports.engine.fill.JRCalculator.calculateVariables(JRCalculator.java:144) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:748) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportContent(JRVerticalFiller.java:291) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:133) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:903) at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:647) at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:59) at net.sf.jasperreports.engine.fill.JRThreadSubreportRunner.run(JRThreadSubreportRunner.java:205) at java.lang.Thread.run(Thread.java:619)
×
×
  • Create New...