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

mp_we

Members
  • Posts

    21
  • Joined

  • Last visited

mp_we's Achievements

Contributor

Contributor (5/14)

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

Recent Badges

0

Reputation

  1. Hello, I have a report that looks something line this: ************************************ Name: James.S. Sullivan Address: 123 Main Street, Cupertino, CA 12345 Gender: Male Occupation: Designer ************************************* All data is populated in the report using XMLDataSources. For the Address field the data looks like this "124 Main Street,<br> Cupertino, CA 12345". To accommodate the line break, I have enclosed the entire Address field in a Frame element and made the Gender and Occupation fields 'float'. The report displays correctly My question is that I want to do away with the Frame element - Is there another way to get this report to display exactly as is without using the frame element? Thanks.
  2. Hello, I have a large JasperReport framework - one master report with many layers of subreports. Data is included in these reports using XMLDatasource. All datasources and JasperReport objects are added to a HashMap ('parameters') and the below lines of code are used to create the report in PDF format The JRPrint file created this way doesn't include any data in it. It is only 6KB in size and the final PDF generated has over 200 pages. Does anyone have pointers on how to create a more complete JRPrint file. Thanks. Code: JasperReport jasperReport = (JasperReport)JRLoader.loadObject("\\Master.jasper"); JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, new JREmptyDataSource()); JasperExportManager.exportReportToPdf(jasperPrint);
  3. Thank you for the response. I updated the JAR's and am now running with Jasper Reports 3.7.1. Unfortunately, that hasn't helped. Any other suggestions? Code:java.lang.NullPointerException at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:134) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:79) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:624) at we.view.Generator.displayReports(Generator.java:599) at we.view.Generator.doGet(Generator.java:64) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370) at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453) at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239) at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34) at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303) at java.lang.Thread.run(Thread.java:595)
  4. Hello, I am currently using JasperReports to generate the same reports in PDF and RTF formats. The report generates and displays correctly in PDF and RTF formats. Though, during RTF report generation, I see the below exception. No such exception is displayed during PDF generation. Any idea what is causing this? Thank you. Code:java.lang.NullPointerException at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:138) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:83) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:601) at we.view.Generator.displayReports(Generator.java:599) at we.view.Generator.doGet(Generator.java:64) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370) at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453) at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239) at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34) at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303) at java.lang.Thread.run(Thread.java:595)
  5. Hi, I have a report displaying data using a XML Data source. I have the data for a Pie Chart in 5 Fields. How do I go about specifying the Key, Label and value expressions in such a case? Thank you.
  6. Hello, I have a jrxml report with a title. Below is the excerpt from the jrxml showing bottomborder="1Point" <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="1Point" bottomBorderColor="#000000"/> When I compile this using iReport 2.0.1 and display in PDF, the bottom border appears. But if the same file is compiled in iReport2.0.3, the line doesn't appear. Moreover, there is a significant compiled file size (.jasper)difference between the 2 versions. Is this common? Thanks.
  7. Hi, I have a report like below: Name $F{Name} Biography $F{Bio} Description $F{Desc} Transactions $F{Trans} Bio, Desc and Trans are expanding fields..."Stretch with overflow' is checked for all 3. I have added a Frame for each of the fields that grow (totally 3 frames). All frames are 'Relative to Band height'. The first frame's position type is 'Fix Relative to Top' and other 2 frames are 'Float'. Issue -- When displaying a PDF report, data is rendered correctly for the first 2 expanding fields, but the third field is displayed only for a few random records. (Data is present for all fields) I have tried grouping with frames and few other combinations without result. Can someone please help? Thank you.
  8. Can somebody please help! :( I have a style template that is working fine through iReports. The PDF documents are picking up the template formatting and I can view the reports. When trying to implement the same via Servlet, I am running into problems. 1. After execution I find that the PDF report is missing the formatting specified in the .jrtx file. The .jrtx is placed in the current working directory of my project (confirmed programatically that it is there). The same PDF displays an image that exists in the same directory. 2. I am unable to compile the .jrxml in the Servlet. The error is "SAXParseException: XML-20148: (Error) Invalid element 'template' in content of 'jasperReport'. I am using JasperReports2.0.1 I am at my wit's end. Any suggestions? Thank you!
  9. Hello, I created a report using iReport2.0.1 using a style template file. It executes in iReport and displays the PDF report. But when I try to run it in a Servlet (using jasperreports-2.0.1.jar), it throws the following exception: org.apache.commons.digester.Digester error SEVERE: Parse Error at line 29 column 11: <Line 29, Column 11>: XML-20148: (Error) Invalid element 'template' in content of 'jasperReport', expected elements '[field, sortField, variable, filterExpression, group, background, title, pageHeader, columnHeader, detail, columnFooter, pageFooter, lastPageFooter, summary, noData]'. Here are the first few lines of the .jrxml. Code: <?xml version="1.0" encoding="UTF-8" ?> <!-- Created with iReport - A designer for JasperReports --> <!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd"> <jasperReport name="Data_profile" columnCount="1" printOrder="Vertical" orientation="Portrait" pageWidth="595" pageHeight="842" columnWidth="535" columnSpacing="0" leftMargin="30" rightMargin="30" topMargin="20" bottomMargin="20" whenNoDataType="NoPages" isTitleNewPage="false" isSummaryNewPage="false"> <property name="ireport.scriptlethandling" value="0" /> <property name="ireport.encoding" value="UTF-8" /> <import value="java.util.*" /> <import value="net.sf.jasperreports.engine.*" /> <import value="net.sf.jasperreports.engine.data.*" /> <queryString language="xPath"><![CDATA[/profile_hist/profile_histRow]]></queryString> <template>"styles.jrtx"</template> <field name="FullName" class="java.lang.String"> <fieldDescription><![CDATA[FullName]]></fieldDescription> </field> Any ideas on what could be going on? Thank you.
  10. Hello, I have a Servlet displaying a PDF report. The report uses styles defined in style.jrtx When I execute the report in iReport 2.0.1, it displays correctly. But when I execute the servlet, it is unable to find the style.jrtx and therefore the pdf displays incomplete data. Do I need to do anything other than adding style.jrtx to my classpath? Thanks.
  11. Hello, I am using IReport 2.0 to create a master report and subreports. I would like to pass a Field from the Master report to the subreport. In the Master report --> Subreport properties --> Subreport parameters, I specify Parameter : PId Expression: $F{PId} (this is a String) In the subreport, I have a String type parameter "PId" defined. I can see the PId value in Master report but am unable to get the value of PId from Master down to the Subreport. What am I missing here? Thank you!
  12. This is resolved. When setting the parameters to pass down to the subreport (A), the JRXmlDataSource parameter for AChild is set as JRXmlDataSourceObject.dataSource() Thanks for your reponses, fsaa.
  13. Thanks for your response. Here is what I have: 1. In the Master report I have created 2 parameters - One for nested subreport(JasperReport object) and one for the subreport datasource (JRXmlDataSource object) 2. In the Master report, subreport element, I have included the 2 parameters as "Subreport Parameters" 3. In the 'A' report, I have 2 parameters (same names as Master) that I am using to populate the nested subreport 'AChild' But looks like I am missing something because the nested subreport AChild doesn't display. Could someone provide with some pointers. Thanks.
  14. Hello, I have a Master report that has a subreport 'A'. Subreport 'A' has a subreport 'AChild'. i would like to pass a XMLDatasource parameter for AChild from the Master report. I am using iReport 2.0 to create these reports. I created a JRXmlDataSource parameter in Master and used that as 'Subreport Parameter' for subreport 'A'. In the subreport 'A', I specified 2 parameters - one for the AChild subreport and another for AChild XMLDataSource. 1. How to I specify the XMLDataSource parameter as an 'input' parameter in subreport 'AChild'? Thank you.
  15. mp_we

    PDF issues

    Hello, I have a servlet that does the following Code: JasperReport jsr = (JasperReport)JRLoader.loadObject("mainReport.jasper"«»); JasperReport subReports = (JasperReport)JRLoader.loadObject("subReport.jasper"«»); ...................adding other subreports File xmlMainReportSource = new File("MainReportSource.xml"«»); JRDataSource subReportDataSource = new JRXmlDataSource(new File(SubReportSource.xml)"«»)); ...................adding other subreport sources //Preparing parameters Map parameters = new HashMap(); parameters.put("DataSubreport", subReports); parameters.put("DataSubreportSource",subReportDataSource); ..................adding all subreports and subreport sources Document document = JRXmlUtils.parse(xmlMainReportSource); parameters.put(JRXPathQueryExecuterFactory.PARAMETER_XML_DATA_DOCUMENT, document); JasperPrint jprint = JasperFillManager.fillReport(jsr, parameters); JasperExportManager.exportReportToPdfFile(jprint, "demo.pdf"«»); If the source XMLs are small in size, the PDF (approx 20 K) gets created and displays content. If any of the source XMLs are large in size, the PDF gets created but displays blank. If anyone has any ideas on what I could try to correct this, please let me know. Thanks.
×
×
  • Create New...