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

vijramu

Members
  • Posts

    12
  • Joined

  • Last visited

vijramu'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. I am using jasper 3.1.3 and poi-3.2-FINAL-20081019.jar. I am using these jars to generate an excel file under a servlet. So, these jars were initially stored under the WEB-INF/lib. The problem that I am having is that I moved jasper jar to a common lib directory and now, the excel generation does not work. I tried moving both those jars to a common location and that did not work. Do the jars have to be under WEB-INF/lib in a web application context? The exception that I am getting is. Exception thrown : java.lang.NoSuchMethodError: org.apache.poi.hssf.usermodel.HSSFSheet: method createDrawingPatriarch()Lorg/apache/poi/hssf/usermodel/HSSFPatriarch; not found at net.sf.jasperreports.engine.export.JRXlsExporter.createSheet(JRXlsExporter.java:173) at net.sf.jasperreports.engine.export.JRXlsAbstractExporter.exportReportToStream(JRXlsAbstractExporter.java:406) at net.sf.jasperreports.engine.export.JRXlsAbstractExporter.exportReport(JRXlsAbstractExporter.java:197) Post Edited by vijramu at 09/16/2009 20:27
  2. Thanks a lot, Teodor. I did what you told and it works perfectly now. You have my vote for the community choice award!!
  3. Hi folks, I have a csv file that I am generating using jasper reports. This has column headers, some columns in the detail bands and a subreport in the summary band. What I have observed so far, is that the file generation behaves normally in my local eclipse environment and another solaris dev environment. But, when I moved it upto my test environment, which is also solaris, the column headers and the subreport completely disappear. I have the .jasper files within my jar file. There is very less likelyhood of the .jasper files getting corrupted because I take the same jar file from my test environment and move it to my dev box, the files get generated correctly. What could be going on? I am worried that if I moves these jasper files to production and they don't work there, it would become a debugging nightmare. I would really appreciate somebody's input on this.
  4. I am creating a text file. The report format has a title page and detail. Everything is printing correctly except that after the first page(which has the title), there is a blank line. I have turned on "ignore pagination" but it only works for the rest of the pages but not for the first page. How do I fix this? I am using jasper 3.1.3
  5. Hi, I am creating a plain text file using the JRTextExporterParameter. The file gets created with the correct line breaks when running on a windows environment. But when I run it in an solaris environment, the text file does not have the correct line breaks and instead the data is all garbled and comes out with the control characters in them(square boxes). I was under the impression that JRTextExporterParameter LINE_SEPARATOR takes the system line.separator and uses that value. That does not seem to be the case. What do I need to make this work?
  6. Hi, I have a master report which has a subreport placed on the summary band. I made another copy of .jrxml file that I created and when I invoke the copy, the subreport DOES NOT APPEAR. Its the same xml file. The parameters are obviously correct since it invokes it the first time. But, whenever I called the jasperPrint method the second time with the same parameters and input, it does not generate the subreport. I am attaching the subreport section of the master report. Could somebody please help me this? I have spent a lousy amount of time trying to figure this out. Code: $P{countyCode} $V{START_PAGE_NUMBER} $P{errWarn} $P{SUBREPORT_DIR_FILE_NAME} public static JasperPrint buildJasperPrint(HashMap jasperParams, String inFile, Collection jasperReportData) { try { File templateFile = new File(inFile); JasperReport jasperReport = (JasperReport) JRLoader.loadObject(templateFile); JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, jasperParams, new JRBeanCollectionDataSource(jasperReportData)); return jasperPrint; } catch (Exception e) { e.printStackTrace(); System.out.println("Error occurred captured by buildJasperPrint: " + e.getMessage()); } return null; }
  7. Here is the issue. I have 2 jasper reports almost identical except one is used to generate pdf file and another one just old plain text file. I have a subreport in the summary band of the main report page. The code is below The problem is when I generate the text file, the subreport data for the text file does not come up(is blank) if I generate the pdf file first. If I comment out //JasperPrint jPrint = Utils.buildJasperPrint(reportParams, inFile,a); for the pdf then it generates the sub report for the text file. What am I doing wrong? Code:String inFile = "C:test_goodoldone1_pdf.jasper"; String outFile = "C:\Collections_" + monthReported; JasperPrint jPrint = Utils.buildJasperPrint(reportParams, inFile,a); Utils.generatePDF(jPrint, outFile+".pdf", "PDF"); String inFile1 = "C:test_goodoldone1_text.jasper"; String outFile1 = "C:\Collections_" + monthReported; JasperPrint jPrint1 = Utils.buildJasperPrint(reportParams, inFile1,a); Utils.generatePlainText(jPrint1, outFile1+".txt", null, null, "4", "12", "", null, "rn"); The code for buildJasperPrint is below public static JasperPrint buildJasperPrint(HashMap jasperParams, String inFile, Collection jasperReportData) { JasperPrint jasperPrint = null; try { File templateFile = new File(inFile); JasperReport jasperReport = (JasperReport) JRLoader.loadObject(templateFile); jasperPrint = JasperFillManager.fillReport(jasperReport, jasperParams, new JRBeanCollectionDataSource(jasperReportData)); //return jasperPrint; } catch (Exception e) { e.printStackTrace(); System.out.println("Error occurred captured by buildJasperPrint: " + e.getMessage()); } return jasperPrint; }
  8. When I am generating a plain old text file, I know I have to use BETWEEN_PAGES_TEXT to suppress the page break lines. I am passing theExporter.setParameter(JRTextExporterParameter.BETWEEN_PAGES_TEXT , ""); Even after setting this, I see 2 blank lines for page breaks. What is the correct value that needs to be set? What are the valid values that can be passed? I cannot see this in the API. Thanks.
  9. This below discussion helped me get a better understanding on how to fix the problem. http://jasperforge.org/plugins/espforum/view.php?group_id=102&forumid=103&topicid=9241 Good luck.
  10. Thanks for taking the time to reply. I guess the core of my problem was that it is not an actual master-subreport relationship. The second sub report was just inserted into the summary of the first report. I got around the first problem by doing "Start the summary on a new page" setting in the first report, put the same heading as the first report in the second report. I passed the current page number of the first report to the second report to get consecutive numbers. This post helped me figure that out. http://jasperforge.org/plugins/espforum/view.php?group_id=102&forumid=103&topicid=6175 Thanks.
  11. Hi, I have a report which has 2 subreports within them and they both use different data sources. I am having issues trying to do a couple of things. 1. Both the sub reports need to have the same heading. But at the end of the first subreport, which could be in the middle of a page, the second subreport's heading gets printed. How do we accomplish this where the heading gets printed only once per page? There is no relationship between the data sets. 2. This is a similar issue as the heading except that I need to print the page numbers consecutively? How do I pass the first subreport's last page number and add that to the current page number of the second subreport? Thanks.
×
×
  • Create New...