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

fatsy

Members
  • Posts

    40
  • 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 fatsy

  1. Hi all, I have a question regarding textFieldExpression. I have two dataSources both are of type JRBeanCollectionDataSource DataSource1 is passed as parameter to Jasperprint method: fJasperPrint = JasperFillManager.fillReport(fJasperReport, fParameter, dataSource1); The second dataSource2 is passed on the Hashmap() (called: fParameter). My Question is how can I retrieve a field on the second dataSouce2 I tried as textFieldExpression $P{dataSource1}.getFieldValue($F{title} which causes an error(Error retrieving field value from bean : title). OR is it not possible to do this.If not please help with ways to solve this problem. Looking forward for replies. Please help me Attached are files which I used. Thanks in advance Regards Fatma [file name=File-58e9af8d4a86d022acc9fb22359fcfd2.zip size=7409]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/File-58e9af8d4a86d022acc9fb22359fcfd2.zip[/file]
  2. Hi, Thanks for your answer. It did not work because getFieldValue() must recieve JRField as parameter & not String. Thansk for your suggestion. MAybe you have another idea :)
  3. Hi, Unluckly it is not working. I get the following error: net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file: 1. The method getFieldValue(JRField) is undefined for the type Object value = (java.lang.String)(((java.util.Map)parameter_REPORT_PARAMETERS_MAP.getValue()).get("SubDataSource1").getFieldValue(((net.sf.jasperreports.engine.JRField)field_title.getValue())).toString);//$JR_EXPR_ID=14$ <-----------> 2. The method getFieldValue(JRField) is undefined for the type Object value = (java.lang.String)(((java.util.Map)parameter_REPORT_PARAMETERS_MAP.getValue()).get("SubDataSource1").getFieldValue(((net.sf.jasperreports.engine.JRField)field_title.getOldValue())).toString);//$JR_EXPR_ID=14$ <-----------> 3. The method getFieldValue(JRField) is undefined for the type Object value = (java.lang.String)(((java.util.Map)parameter_REPORT_PARAMETERS_MAP.getValue()).get("SubDataSource1").getFieldValue(((net.sf.jasperreports.engine.JRField)field_title.getValue())).toString);//$JR_EXPR_ID=14$ <-----------> 3 errors I Thought $P{REPORT_PARAMETERS_MAP} is used with subreports.I tried your suggestion but i still have a problem. Hopefully you can help. THanks alot for your time Fatsy
  4. Hallo MT, Thanks alot for your quick answer. I have two dataSources both are of type JRBeanCollectionDataSource DataSource1 is passed as parameter to Jasperprint method: fJasperPrint = JasperFillManager.fillReport(fJasperReport, fParameter, dataSource1); The second dataSource2 is passed on the Hashmap() (called: fParameter). My Question is how can I retrieve a field on the second dataSouce2 thats why I tried doing this on the textFieldExpression $P{SubDataSource1}.getFieldValue($F{title}) which causes the error. I hope you can help me. Thanks Regards Fatsy
  5. Hallo MT, Thanks alot for your answer. Let me explain to you what I want to do. I want, using a textfield, to fetch a field (title) in an JRBeanColectionDataSource (subDataSource1) which I added as a parameter. My problem lies on the textFieldExpression which is not correct since i'm getting an error. with subreport i'm not getting the result which i'm expecting Please help !! Thanks in advance regards Fatsy
  6. Hallo all, When filling the report I get an error: net.sf.jasperreports.engine.JRException: Error retrieving field value from bean : title What I did is that I created a field of type JRField and with the following textFieldExpression I tried to fetch the field value from a parameter of type JRBeanCollectionDataSource: $P{SubDataSource1}.getFieldValue($F{title}) I tried also adding toString() method but unfortunately its not working. I've attached used files. Pleasre help me. [file name=File-80a00a7fa843bde5fb31a7ca1b2c2cb8.zip size=7409]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/File-80a00a7fa843bde5fb31a7ca1b2c2cb8.zip[/file]
  7. Hallo all, I have a question on how to declare dataSourceExpression in JRBeanCollectionDataSource. For example with Xml xpath I'll declare dataSourceExpression as following ((net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).dataSource("/UseCaseGroup/UseCaseGroup/UseCase[@title="+$F{title}+&quot]/AlternativeScenario/Step") What I would like to know is how to declare the part([@title="+$F{title}+&quot]) in JRXmlDataSource. I did declare my dataSourceExpression as following new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{RG}) but the problem is that it will only be displayed once not for all objects. I think when using for all title them all objects will be displayed as in xml. Help will be really apreciated.I stuck for days on this problem. Thanks in advance. Regards Fatma
  8. Please can any out there help me!!! I don't know how to continue.i've tried alot. Thanks in advance Regards Fatma
  9. Hi, I have a java class A with an Arraylist as an Attribute which is of type java class B. My problem occurs when displaying a report from all the objects of type A.The arraylist of only the last object of type A will be diplayed. I want is from all Objects of type A. What I did, I used subreport to display the arraylist with dataSourceExpression ![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{RG})]] Please help me!!!!!:( Attached are the files used. regards Fatsy [file name=File-fef3703376cb568d2bbaeb4279df5984.zip size=9027]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/File-fef3703376cb568d2bbaeb4279df5984.zip[/file]
  10. Hallo All, I have a question regarding datasources. Is it possibleto fill a report with two different Java beans data source. What I mean masterreport datasource1 & subreport datasource two. If its possible how am I supposed to do it. Please help!! Thanks in advance regards Fatsy
  11. Hallo all, I have a problem with JRBeanCollectionDataSource. When compiling I recieve an error JRBeanCollectionDataSource ( Error retrieving field value from bean : vS) although the name of the field is the same as in the get Method. Please help me. Attached are source files [file name=File-225349e156a90fb3227b28fa40e12e11.zip size=4062]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/File-225349e156a90fb3227b28fa40e12e11.zip[/file]
  12. Hi Chirag, Thanks alot for the qiuck answer. Please can you explain abit in depth what you mean. I didn't understand it clearly. Sorry incase of any inconvinience caused. Thanks in advance. Fatsy
  13. Hallo All, I have a question regarding JRBeanCollectionDataSource. I have a Arraylist of objects type A and each object of type A withhelds an Array list of Objetcts type B. How can I do the reporting so that the report display the object type A with a list of its Objects type B. When I do it separately I can create a report of Objects type A and a second report of Objects type B. But what I want is having them on one report which could be done with subreport but I'm having problem with the data source. Please help me.:( Thanks in Advance Regards Fatma Post edited by: fatsy, at: 2007/08/01 09:49
  14. Hallo Lucianc, Thanks alot for the quick answer. It worked. regards Fatsy
  15. Hallo All, I have a problem with Java Object as datasource. When filling the report I recieve This Error: net.sf.jasperreports.engine.JRException: Error retrieving field value from bean : fId at net.sf.jasperreports.engine.data.JRAbstractBeanDataSource.getBeanProperty(JRAbstractBeanDataSource.java:116) at net.sf.jasperreports.engine.data.JRAbstractBeanDataSource.getFieldValue(JRAbstractBeanDataSource.java:93) at net.sf.jasperreports.engine.data.JRBeanCollectionDataSource.getFieldValue(JRBeanCollectionDataSource.java:104) at net.sf.jasperreports.engine.fill.JRFillDataset.setOldValues(JRFillDataset.java:813) at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:777) at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:1106) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:111) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:763) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:688) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:89) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:601) at net.sf.jasperreports.engine.JasperRunManager.runReportToPdfFile(JasperRunManager.java:325) at net.eads.astrium.sedb.ReqReport.main(ReqReport.java:62) Caused by: java.lang.NoSuchMethodException: Unknown property 'fId' at org.apache.commons.beanutils.PropertyUtilsBean.getSimpleProperty(PropertyUtilsBean.java:1122) at org.apache.commons.beanutils.PropertyUtilsBean.getNestedProperty(PropertyUtilsBean.java:686) at org.apache.commons.beanutils.PropertyUtilsBean.getProperty(PropertyUtilsBean.java:715) at org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:290) at net.sf.jasperreports.engine.data.JRAbstractBeanDataSource.getBeanProperty(JRAbstractBeanDataSource.java:104) ... 12 more Please can anyone help me to solve this. For days i'm stuck on this error.I have gone through the forum but didn't get the answer. Please help me...:( Attached are the report template & java files. [file name=File.zip size=3622]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/File.zip[/file]
  16. Hallo all, I have problem with my Html page display.The page is on the center of IE or Mozilla and the letter are very small. How can I solve this problem? Please can anyone help me. I went through the forum but didn't get an answer. Thanks in advance. Post edited by: fatsy, at: 2007/07/27 13:51
  17. Hi, I solved the problem When I print the data als one page(ignore pagination) the pdf pages were blank.So I printed the in several pages then it worked.(unclicked ignore pagination) yours Fatsy
  18. Hallo codyjasperForge & all , Thanks for the quick reply. The output in the JRViewer also als Html is the data which I'm supposed to recieve. i'm using pdf version 7.0 professional. Thanks in advance
  19. Hallo codyjasperForge & all , Thanks for the quick reply. The output in the JRViewer also als Html is the data which I'm supposed to recieve. i'm using pdf version 7.0 professional. Thanks in advance
  20. Hallo codyjasperForge & all , Thanks for the quick reply. The output in the JRViewer also als Html is the data which I'm supposed to recieve. i'm using pdf version 7.0 professional. Thanks in advance
  21. Hallo codyjasperForge & all , When I execute with active connection the pdf output file is blank although with JR Viewer is the output not blank. My data has also links in it.Can it be because of the link references.(which I doubt !!) Thanks in advance Yours Fatsy Post edited by: fatsy, at: 2007/07/26 15:59 Post edited by: fatsy, at: 2007/07/26 16:00
  22. Hallo, I hope I understood your question. In my opinion your subreport XPath i.e /aaa/bbb will print the values of <ccc> if you want to print the values of<ddd> I would suggest just use another subreport. About printing the first <aaa> entry I didn't understand what you meant. I hope this will help. Regards Fatsy
  23. Hallo, I hope I understood your question. In my opinion your subreport XPath i.e /aaa/bbb will print the values of <ccc> if you want to print the values of<ddd> I would suggest just use another subreport. About printing the first <aaa> entry I didn't understand what you meant. I hope this will help. Regards Fatsy
  24. Hallo, try using subreports. In the master report use the <dataSourceExpression> to verify your XPath in the subreport Tag. I had the same problem & could only fix it using subreport. Hope it helps. Regards Fatsy
  25. Hallo acer, To print a subreport horizontally just use the Tag printOrder="Horizontal". My problem why it did work was because I gave the <subreportExpression> as relative Path instead of absolute path. I hope this helps Regards Fatsy
×
×
  • Create New...