Jump to content

rajendratambat

Members
  • Posts

    35
  • Joined

  • Last visited

rajendratambat's Achievements

Apprentice

Apprentice (3/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Collaborator Rare

Recent Badges

0

Reputation

  1. You did not explained properly did you get either of output atleast in FF or not. well I see problem here with using jasperprint object from session. just want to make you aware that if you use same object from session for first time it will work but if you try to use same object second time with other type of report it will not work because. jasperprint object gets modified when you export(convert to pdf/xls) report. I hope if you are facing this problem that it is working for one export and not for 2nd with same session object I will suggest to make copy of jasperprint object and send for export. Rajendra Tambat http://rajendratambat.blogspot.com/
  2. I have tried using ArrayList object. you need to put this list object in JRBeanCollectionDataSource here is code sample how i did MyBean is my pojo class with getters and setters Rajendra Tambat http://rajendratambat.blogspot.com/ Code:ArrayList beans = new ArrayList();MyBean row211 =new MyBean("Header3452345","subheader1","row21","VALU23 ");MyBean row212 = new MyBean("header1234","subheader1","row21","VAL2");beans.add(row211);beans.add(row212);Map parameters = new HashMap();// prepare report and dataFileInputStream is = new FileInputStream(new File("C:\\data\\mytest\\test.jrxml"));JRBeanCollectionDataSource ds = new JRBeanCollectionDataSource(beans);// generate pdf fileJasperDesign jasperDesign = JRXmlLoader.load(is);JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters,ds);JasperExportManager.exportReportToPdfFile(jasperPrint, "C:\\data\\mytest\\mytest.pdf");
  3. possible. pass one parameter to report preview=y/n if y then show (by adding conditional print when expression) Rajendra Tambat http://rajendratambat.blogspot.com/
  4. It is possible, programmatic. before that you should be knowing that in which case your report is going to extend or some indication to main report to know that its sub report will get extend so that it will change its layout. from your code get jrxml object before compiling it. modify its layout and then pass that object to compile>>fill>>run Rajendra Tambat http://rajendratambat.blogspot.com/
  5. as far as I knows ireport 3.1 prior version supports jdk 1.4 Rajendra Tambat http://rajendratambat.blogspot.com/
  6. yes it is, please checked attached image Rajendra Tambat Code: | type1 | type2 | |------------------------ | v1| v2| t2v1|t2v2_________________________ Post Edited by rajendratambat at 04/01/2011 05:59
  7. use crosstab feature of ireport please visit my blog post if required http://rajendratambat.blogspot.com/2010/10/creating-crosstab-report-with-jasper.html Rajendra Tambat Post Edited by rajendratambat at 03/23/2011 04:45
  8. I assume that you may be fireing a query and getting a data... in that sense, you can wirte a query which will be unioin of different criteria and give output in a group like select 'A', c1,c2,c3 where ValueA > 0 union select 'B', c1,c2,c3 where ValueB == 10 and use grouping to show data on diff pages when group changes. hope this will help you. good luck
  9. It is possible...it is complex yet.... provided you are generating reports programatically. follow these steps. create your component which will take input string as html table code parse it and convert it as jasper reable jrxml code output as JRDesignElement object . design report add a dummy comonent( eg. static text) where you want to see actual table. assuming that you are calling report from java application... in that section you need to add following flow. load jrxml (jaspermanager/jrxmlloader will load your jrxml and return you jasperdesign object.) JasperDesign jasperDesign = JRXmlLoader.load(FileInputStream) get jasperdesign object... this will gives all apis to get all components inside... call apis to locate dummy component from jasperdesign remove that element and replace your new element. then follow next steps of compiling..filling... exporting to desired output... Rajendra Tambat
  10. are you adding multiple reports as one... or its a single report and in that you are adding pagefooter ? well, if you want pdf output of multiple report... I hope you might have added multiple reports as a sub report in a main report after every subreport you add a pagebreak... I hope this will work as same you expected. Rajendra Tambat
  11. can you elaborate it in greater detail what is expected if possible with input sample and jrxml also with expected output sample... along with explanation. Rajendra Tambat
  12. in jasperreport you can set text field markup property as "styled/html" which will treat your html code as data appropriately... have you tried this? Rajendra Tambat
  13. first you gave jrxml which has static query. are you replacing this query at run time and then generating .jasper file? if so try to sop what query it is generating. Rajendra Tambat
  14. there is a property called markup you set it as "RTF" it will treat your data as rtf and will try to apply same. Rajendra Tambat
  15. I can just give you a quick hint if you are generating report programatically there is "JRHtmlExporterParameter.PAGE_INDEX" that you can use to export upto specific pages. find more...
×
×
  • Create New...