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. JRParameter.REPORT_DATA_SOURCE is special parameter for passing DataSource into report without using standard DataSource (third parameter in fillReport) In case 2 the right way is: JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, info); In fact, you try pass in report two DataSource (case 2): first in parameter, second in DataSource. Post Edited by sanbez at 07/30/2012 09:17
  2. http://community.jaspersoft.com/questions/538624/remove-images-html-report
  3. Try this: were product.product_code like $p{parameterName}||'%' In oracle this works
  4. This is not stack trace! It's only one line. Nobody can't understands which method method generates an error. Is it fillReport? Is it loadObject? Where you java-code? I'm not telepath :) P.S for running subreport it is not needed call loadObject for subreport.jasper You must only define parameter P_SUBREPORT_DIR of main report and put subreport in this dir. But I have not seen your java code. It's just a guess
  5. too little information Can you put piece of java-code (with loadObject and fillReport) and stack trace?
  6. Connect in IReport? Menu: Tools/Options/ClassPath - add jdbcXYZ.jar
  7. Usual in master-detail report we have one master object (displayed in master report) and some childs of master object (displayed in subreport). It is clearly seen in the discussion threads on the link in my previous answer. Are you seen this? In your case subreport displayed only after all records of main report. This is what you wanted? Then pass Collection as parameter into main report and define DataSource expression for subreport, using this collection as parameter for method (for example createMyDataSource($P{mainReportParam}) ) which implements JRDataSource interface HTH
  8. I did not understand the relationship between objects. Can you explain how relate objects of master report and subreport? See example of using subreport. May be this helps http://community.jaspersoft.com/questions/543298/creating-table-structure-assorted-java-bean-structure-one-field-and-list-datasource
  9. I am don't use export into csv. :( But i am suppose that extra comma will disappear, if you set length (and position if this needed) $F{name} in subreport equals length ((Employee)$F{emps}).getName() in main subreport. And also set length $F{id} in subreport equals length ((Employee)$F{emps}).getId() in main report HTH
  10. I am don't use subdataset. I am using subreport. Example attached See how i am embedded subreport in main report. Parameter for DataSource is collection (field of main report $F{equipOfPump}) In your case use field $F{empList}. class R1020DataSource implements JRDataSource (see net.sf.jasperreports.engine.JRDataSource interface) and this class is provides iteration for collection in subreport.
  11. If i undertand correct, you need display data like this: subscriber1.field1 subscriber1.field2 ... dependent11.field1 dependent11.field2... dependent12.field1 dependent12.field2... subscriber2.field1 subscriber2.field2 ... dependent21.field1 dependent21.field2... dependent22.field1 dependent22.field2... The simplest way (imho) is "usual" report without <jt:table 1. Make main report with two fields (field name, field type): subscriber my.full.qualified.classname.Subscriber dependent java.util.List 2. Make subreport (based on Dependend class), embedded into main report 3. Use field $F{dependent} (java.util.List) of main report in DataSource expression for subreport. For example: new MyClassName($F{dependent}) 4. Write myClassName which implements JRDataSource interface for correct work of subreport
  12. use EmptyDataSource, and put your DataSource into parametersMap For examle (I wrote it from memory, may be inaccurately) Map parameters = new HashMap(); parameters.put('REPORT_DATA_SOURCE', new JRBeanCollectionDataSource(Phone.getPhoneList())) jasperReport = JasperCompileManager.compileReport("D://workspace//MJasperProject//NewTable.jrxml"); jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, new JREmptyDataSource()); or may be jasperPrint = JasperFillManager.fillReport(jasperReport, parameters);
  13. In my test report variable1 java.lang.Double with Initial value expression = 4.8077013294799995E8 displayed as 4.8077013294799995E8 without pattern. And 480770132,95 displayed with pattern #0.00 I am can't quickly to make testcase :( JR ver 4.1.2 How will be displayed variable (not field) in your report?
  14. Sorry, I am don't work with hibernate. Probably I can't help. But if you can write "clever" method getDate() for EstimateItem then you can define field date in report. But I am don't know how to do this whith "poref" :( Good luck
  15. This is another error. It's not NullPointerException. This message is signed that your bean havn't method getPurchaseOrderItem() in bean. You may define only fields with existing getters. If you define field "purshaseOrderItem" in jrxml, you must write get-method with correspondent name. I am don't understand how you pass collection in subreport? Is it new JRBeanCollectionDataSource(Collection<PurchaseOrderItem>) in subreport expression? Or is it pass to $P_DATA_SOURCE? Post Edited by sanbez at 04/13/2012 08:42
  16. In expression $F{purchaseOrderItem}.getPurchaseOrder().getOrderDate() is $F{purchaseOrderItem}.getPurchaseOrder() always not null? Are you check code of method getJRFieldValue for subreport for null this value? It's so hard to give advice without code and stacktrace. In what place NULLPOINTEREXCEPTION occurs?
  17. Hi, All! I am using two identical condition style in report. In attached jrxml used only two fields, but I need a similar report with 15 fields for example. Is it possible to define only one style and pass field into this style as parameter? Code: <style name="F1Style" mode="Transparent"> <conditionalStyle> <conditionExpression><![CDATA[$P{color} && $F{F1}.getCode() == 124]]></conditionExpression> <style mode="Transparent" backcolor="#E75480" pattern=""/> </conditionalStyle> <conditionalStyle> <conditionExpression><![CDATA[$P{color} && $F{F1}.getCode()==1]]></conditionExpression> <style mode="Transparent" backcolor="#E6E6FA"/> </conditionalStyle> <conditionalStyle> <conditionExpression><![CDATA[$P{color} && $F{F1}.getCode()==0]]></conditionExpression> <style mode="Transparent" backcolor="#FBEC5D"/> </conditionalStyle> <conditionalStyle> <conditionExpression><![CDATA[$P{color} && $F{F1}.getCode()==-1]]></conditionExpression> <style mode="Transparent" backcolor="#E6E6FA"/> </conditionalStyle> </style> <style name="F2Style" mode="Transparent"> <conditionalStyle> <conditionExpression><![CDATA[$P{color} && $F{F2}.getCode() == 124]]></conditionExpression> <style mode="Transparent" backcolor="#E75480" pattern=""/> </conditionalStyle> <conditionalStyle> <conditionExpression><![CDATA[$P{color} && $F{F2}.getCode()==1]]></conditionExpression> <style mode="Transparent" backcolor="#E6E6FA"/> </conditionalStyle> <conditionalStyle> <conditionExpression><![CDATA[$P{color} && $F{F2}.getCode()==0]]></conditionExpression> <style mode="Transparent" backcolor="#FBEC5D"/> </conditionalStyle> <conditionalStyle> <conditionExpression><![CDATA[$P{color} && $F{F2}.getCode()==-1]]></conditionExpression> <style mode="Transparent" backcolor="#E6E6FA"/> </conditionalStyle> </style> <parameter name="color" class="java.lang.Boolean"/>
  18. You can make frame and put all fields into this frame. First fields make without borders, others fields make with borders. And frame make with borders. HTH
  19. This is not crasstab report! It's simplest report with sql (for example): select name, city, phone from myTable And set in iReport for first field property PrintRepeatedValues = off (checkbox unselected)
  20. I am don't work with HBase. :( Usually in this case i make subreport with param $F{id}, where "id" - field if main report. Subreport put in detail band of master report and it's called for any record of master report.
  21. JasperCompileManager.compileReport - is comile report1.jrxml into report1.jasper If you have already compiled report (report1.jasper) you must write: JasperReport jasperReport1 = (JasperReport) JRLoader .loadObjectFromFile("C:/Users/emidemi.emidemi-PC/Documents/NetBeansProjects/FleetManager/src/FleetManager/newReport5.jasper"); JasperPrint jasperPrint1 =JasperFillManager.fillReport(jasperReport1, params, conn.getConn());
×
×
  • Create New...