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

sehgah

Members
  • Posts

    5
  • Joined

  • Last visited

sehgah's Achievements

Rookie

Rookie (2/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Hello All I am using Jasper report to generate PDF reports. I am able to generate the report but facing issue with display of image on the report. Image used on the report is of .jpg type and when I open the report in Adobe Reader it gives following error: "Insufficent data for an Image". Rest of the report is displayed fine. I resolved this by saving the file as .bmp type and image started displaying correctly. But I need to have .jpg format image only. So please tell me how to resolve this. Please let me know for any other info in this regards. Thanks Harish Kumar
  2. Attached is the zip file containing jrxmls. [file name=TestJasper.zip size=9400]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/TestJasper.zip[/file] Also following is the Java code I am i=using to run this: import java.io.File; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; import net.sf.jasperreports.engine.JasperCompileManager; import net.sf.jasperreports.engine.JasperExportManager; import net.sf.jasperreports.engine.JasperFillManager; import net.sf.jasperreports.engine.JasperPrint; import net.sf.jasperreports.engine.JasperReport; import net.sf.jasperreports.engine.data.JRXmlDataSource; import net.sf.jasperreports.view.JasperViewer; public class JasperAction{ public String execute() throws Exception { myList = new ArrayList(); for(int i=0;i<5;i++){ WrkSwapAllocation wk = new WrkSwapAllocation(); wk.setMautexno("ABC"); wk.setMleg1allocticketid(1); myList.add(wk); } System.out.println("Size of ArrayList: "+myList.size()); try { JasperReport jrp = JasperCompileManager.compileReport( "CDS_Sample.jrxml"); JasperReport jasperSubReport = JasperCompileManager.compileReport( "CDS_Sample_subreport0.jrxml"); Map parameters = new HashMap(); parameters.put("COMP_SUB_REPORT", jasperSubReport); parameters.put("file", myList); parameters.put("eventticket", "NEW"); parameters.put("eventsecmaster", "OLD"); JasperPrint jp = JasperFillManager.fillReport(jrp, parameters, new JRXmlDataSource(new File("D:/DOS_Calypso/Documents/tickets/cds_fpml_5762.xml"))); JasperExportManager.exportReportToPdfFile(jp, "CDX.pdf"); JasperViewer.viewReport(jp); } catch (Exception e) { e.printStackTrace(); return "FAIL"; } return "SUCCESS"; } } Post edited by: sehgah, at: 2007/07/17 13:26
  3. [file name=CDS_Sample.jrxml size=0]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/CDS_Sample.jrxml[/file]
  4. Hi All I am working with Jasper Reports and facing following issue: I have a report with a subreport embedded in its detail band. Subreport has to show data present in List. List contains Java beans. When this List is sent to jasper subreport, each record in List is getting displayed on New Page. Attached is the sample: If a page can accommodate the data then it should be displayed on single page and not like happening in attached document. Pages 2-6 shows the five Bean objects sent in List and each being displayed on new page. Please tell me what I am missing here so that I can resolve the issue. Please let me know for any other information in this regards. Thanks Harish Kumar [file name=CDS.pdf size=7603]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/CDS.pdf[/file]
  5. Hello Friends I am new to Jasper community and to the use of Jasper reports. I am currently working on developing PDF reports using Jasper and iReports. The report structure is: Main Report , needs to use XML as datasource; SubReport, needs to use List of Java Beans as Datasource. I am using report groups to generate various sections in Report rather standard sections. Please help me on following: 1. How to work out above situation. 2. I have situation as follows: <A> <B>ABC</B> <B>DEF</B> </A> I have display above data as : ABC, DEF. It works in standard bands but not working in Report Groups using scriptlets. Please let me know for any other information required to understand the problem better. I need the solution urgently so will be grateful for prompt help on this. Thanks Harish Kumar
×
×
  • Create New...