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

pnvswamy

Members
  • Posts

    38
  • 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 pnvswamy

  1. Hi All , I am using jasper reports.It was fine . Now i am facing problem in excel sheet for the image. I want to generate a report and i want my company logo to place in the report . Image is displayed to PDF,word formats and in Excel it is not coming If any one know please help me. Code:And i used the tag in Jrxml like below<image scaleImage="Clip" onErrorType="Icon" isLazy="true"><reportElement x="0" y="0" width="150" height="40"/><imageExpression class="java.lang.String"><![CDATA["http://jasperreports.sourceforge.net/jasperreports.png"]]></imageExpression></image>And in my java i used in 2 ways like 1) Using JExcelApiExporter---------------------------jrExporter = new JExcelApiExporter();/*JRXlsExporter();*/jrExporter.setParameter(JExcelApiExporterParameter.IS_ONE_PAGE_PER_SHEET,Boolean.TRUE);jrExporter.setParameter(JExcelApiExporterParameter.IS_WHITE_PAGE_BACKGROUND,Boolean.FALSE);jrExporter.setParameter(JExcelApiExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE);//jrExporter.setParameter(JExcelApiExporterParameter.IS_EMBEDDING_IMAGES, Boolean.TRUE);jrExporter.setParameter(JExcelApiExporterParameter.IS_IMAGE_BORDER_FIX_ENABLED,Boolean.TRUE);jrExporter.setParameter(JExcelApiExporterParameter.IS_IGNORE_GRAPHICS,Boolean.FALSE); 2).2nd way using JRXlsExporter ---------------------------------destFile = new File(ServletActionContext.getServletContext().getRealPath("reportDocs")+"/"+docFileName+".xls");jrExporter = new JRXlsExporter();jrExporter.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET,Boolean.TRUE);jrExporter.setParameter(JRXlsExporterParameter.IS_WHITE_PAGE_BACKGROUND,Boolean.FALSE);jrExporter.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE); Post Edited by pnvswamy at 08/24/2010 03:20
  2. Please tell me how to provide I18N for reports in IReport tool. What i done is: <jasperReport name="report3" pageWidth="595" pageHeight="842" columnWidth="535" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" resourceBundle="prop_en" whenResourceMissingType="Empty"> And in my text field is like this <textField hyperlinkType="None"> <reportElement x="277" y="0" width="100" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$R{name2}]]></textFieldExpression> </textField> ---------------------------------------------------------------- And my prop_en.properties file is like this name=code name2=name ------------------------------- Then i am getting the comiler error like: Error filling print... Can't find bundle for base name prop_en, locale en_US java.util.MissingResourceException: Can't find bundle for base name prop_en, locale en_US at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1508) at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1262) at java.util.ResourceBundle.getBundle(ResourceBundle.java:964) at net.sf.jasperreports.engine.util.JRResourcesUtil.loadResourceBundle(JRResourcesUtil.java:572) at net.sf.jasperreports.engine.util.JRResourcesUtil.loadResourceBundle(JRResourcesUtil.java:510) at net.sf.jasperreports.engine.fill.JRFillDataset.loadResourceBundle(JRFillDataset.java:527) at net.sf.jasperreports.engine.fill.JRFillDataset.setParameterValues(JRFillDataset.java:555) at net.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:1192) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:843) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:792) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:63) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:402) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:234) at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:890) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986) PLease give me help
  3. i am using Pen tag in my report with text fields like <textField hyperlinkType="None" isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement x="750" y="0" width="100" height="20"/> <box leftPadding="0" rightPadding="1"> <pen lineWidth="1.0"/> <topPen lineWidth="0.0"/> <leftPen lineWidth="0.0"/> <bottomPen lineWidth="0.0"/> <rightPen lineWidth="1.0"/> </box> <textElement> <font fontName="Verdana" size="10" isPdfEmbedded="true" pdfFontName="Courier"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{endDate}]]></textFieldExpression> </textField> But i am getting Exception like net.sf.jasperreports.engine.JRException: org.xml.sax.SAXParseException: Element type "pen" must be declared. at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:243) at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:226) at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:214) at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:168) at com.sutisoft.hvm.struts.action.PmAppraisalReport.reviewReport(PmAppraisalReport.java:148) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280) at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:619) Caused by: org.xml.sax.SAXParseException: Element type "pen" must be declared. at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source) at org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.commons.digester.Digester.parse(Digester.java:1647) at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:239) ... 30 more
  4. I am using Jasper reports 3.0.1.Upto now it was fine.I want to display the field value as a String of 'none' not blank when that field value is null. I dont know how to make a condition for that field.Please help me.
  5. Hi, I am using Jasper reports with the help of IReport. I created a report with BAr charts.when i run the report the report is fine.But the problem is depending on the data,the y axis values are coming dynamically.Is there any way to define the y-axis limit. Why i am asking is the data is coming fine.When 1 bar value is vey small comparing to the highest value.Then that lowest value is not seeing properly.It is showing empty.I want to show that bar also little bit . please help me to solve....
  6. Hi I am using Jasper reports.In that i am Using Jasper viewer to view the reports. with the help of If i generate report on my system it is viewed in my sytem.When i am accessing my application from another system remotely then the Report is not viewed in the Remote system.How can i generate a report viewing in remote systems.Please help me.... JasperViewer.viewReport(jasperPrint);
  7. I want to generate the Reports with dynamic columns.I dont know how to use......Please help me some guide lines.
  8. I want to generate the Reports with dynamic columns.I dont know how to use......Please help me some guide lines.
  9. I need help on custom reports with JAsper reports3.0.1. Please give me some guidelines............
  10. I am using jasperreports3.0.1 version.It is higher only.
  11. Hi to all, In the compilation of my .jrxml file i am getting the exception like: Element type "pen" must be declared. Please help m eif any one know..Please........ Messageorg.xml.sax.SAXParseException
  12. Hai I am hetting Exception in JRXML compilation Exception is getting like this : Messageorg.xml.sax.SAXParseException: Element type "pen" must be declared.Please help me
  13. I am getting the Exception like Message Org.xml.sax.SAXParseException: Element type "pen" must be declared. Why it was happening.Please help me to resolve.
  14. Hai, For the table format, you need to put the detail band each field in rectangle.Keeping no gap between the rectangle fields.Then you will get the Table formatted Report.
  15. In my jsp i have a select field having 10 values.We can select one or more from that select field.It is multi value selection. For the cutom reports,user may select any of the combination of fields out of 10.He mnay choose only two,3,4,5,6,7 with different combinations. Is it possible to generate a report with what user was selected. Please give me some guide lines that is helpful for us. I studied the document link what u have given,in that the fields are predifined in order- report .xml like order-id,status,placed-by etc and in custom-report.xml also predifined fields like last_name,first_name,city,state etc...... what user was selected we cant estimate then how can i generate custom reports. Give me some guide lines.........
  16. Give me some guide lines it will be useful for me.
  17. Is it possible with JRBeanCollectionDataSource insted of SQL Query in custom reports.Please help me........
  18. Thank you, If any doubts then i will ask you.
  19. Hi to all, I am using Jasper reports with Ireport.Upto now it is fine. Now i want to use custom reports.Please help me. Example:I have select box which is having all fields.User has to select some of them in the select box. Based on the user selecting then the report comes with the user selected fields only. How i dont know.Please could u help me.
  20. And I have one more doubt.Is there any way to execute the group in jrxml file depending on the Parameter. Eg: In java i have parameters like groupByEmp,GroupByDept like this Depending on the Java Parameter i have to execute the Group of that parameter and remaining group will not execute. Is it possible.
  21. Hi, I am using IReport 3.0.1 and i want to represent my report in a Table format.How can i use could u please help me.In my IReport tool there is no Table field.Please help me.
  22. one doubt i am having,Please rectify me. What my doubt is In the main report , i am giving the width and height for the sub report.Is there any way to give width and height dynamically for the sub report depending on the Progects size.
  23. Thank you for your help,and spending time for my problems. Now i got the report. Keep in touch.Very very Thanks to you.
  24. Hi, i given like this in .jrxml file < field name="projDetails" class="java.util.List"/> and in sub report part <subreport> <reportElement x="9" y="665" width="502" height="20"/> <dataSourceExpression><![CDATA[new JRBeanCollectionDataSource($F{projDetails})]]></dataSourceExpression> <subreportExpression class="net.sf.jasperreports.engine.JasperReport"><![CDATA[$P{subReport}]]></subreportExpression> </subreport> then it was giving the error like Errors were encountered when compiling report expressions class file: 1. JRBeanCollectionDataSource cannot be resolved or is not a type value = (net.sf.jasperreports.engine.JRDataSource)(new JRBeanCollectionDataSource(((java.util.List)field_projDetails.getValue())));/*$JR_EXPR_ID=39$*/ <------------------------> 2. JRBeanCollectionDataSource cannot be resolved or is not a type value = (net.sf.jasperreports.engine.JRDataSource)(new JRBeanCollectionDataSource(((java.util.List)field_projDetails.getOldValue())));/*$JR_EXPR_ID=39$*/ <------------------------> 3. JRBeanCollectionDataSource cannot be resolved or is not a type value = (net.sf.jasperreports.engine.JRDataSource)(new JRBeanCollectionDataSource(((java.util.List)field_projDetails.getValue())));/*$JR_EXPR_ID=39$*/ <------------------------> 3 errors Please help me
  25. First of all Thanks for ur reply. ok i am using sub report.If i given the <field name="projectDetails" class="java.util.ArrayList"/> then it is giving the Error retrieving field value from bean : projectDetails
×
×
  • Create New...