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

tomkast

Members
  • Posts

    24
  • 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 tomkast

  1. I need to deal with this again. The problem is that the application has to deal with images of various resolutions. For example, a 96 PPI JPEG image comes out too big in Jasper Reports. Interesting, other applications can handle this, I am no expert, but I would guess that applications look at the image properties, see the PPI, and render the image accordingly. Unless I am missing something, you can't just choose 72 DPI and render/print all images at that resolution, some will be too big, some too small. So I am guessing I need to write a renderer and makes this calculation?
  2. hi, worked on this before, made a dynamic report-design-recompile process, which multipled image height and width by .35, recompiled design (on the fly/web server) and that worked for a while... ...the image is in a subreport and there are cases where the modified report design will cause an endless loop which kills the web server. intereting, i tried to do the same thing in the jasper reports lib, JRPdfExporter.java, and i got the same endless loop in filling the report. when this came up before, teodor had mentioned that i should make the change in itext, which is what i am working on now. but please let me know if you have made any progress on this issue... ...do you have a trac/jira/bugzilla bug for this? thanks, tom
  3. this works: Code: BufferedImage img = ImageIO.read(new File(wo_image_path)); height = img.getHeight(); width = img.getWidth(); jasperSubDesign = JasperManager.loadXmlDesign(context.getRealPath("/WEB-INF/reports/decoration_sheet_header.jrxml")); JRDesignImage image = (JRDesignImage)jasperSubDesign.getPageHeader().getElementByKey("wo_image"); image.setX(3); image.setY(69); image.setHeight(new Long(height - Math.round(height*.35)).intValue()); image.setWidth(new Long(width - Math.round(width*.35)).intValue()); JasperCompileManager.compileReportToFile(jasperSubDesign, context.getRealPath("/WEB-INF/reports/decoration_sheet_header.jasper"));
  4. this works: Code: BufferedImage img = ImageIO.read(new File(wo_image_path)); height = img.getHeight(); width = img.getWidth(); jasperSubDesign = JasperManager.loadXmlDesign(context.getRealPath("/WEB-INF/reports/decoration_sheet_header.jrxml")); JRDesignImage image = (JRDesignImage)jasperSubDesign.getPageHeader().getElementByKey("wo_image"); image.setX(3); image.setY(69); image.setHeight(new Long(height - Math.round(height*.35)).intValue()); image.setWidth(new Long(width - Math.round(width*.35)).intValue()); JasperCompileManager.compileReportToFile(jasperSubDesign, context.getRealPath("/WEB-INF/reports/decoration_sheet_header.jasper"));
  5. this works: Code: BufferedImage img = ImageIO.read(new File(wo_image_path)); height = img.getHeight(); width = img.getWidth(); jasperSubDesign = JasperManager.loadXmlDesign(context.getRealPath("/WEB-INF/reports/decoration_sheet_header.jrxml")); JRDesignImage image = (JRDesignImage)jasperSubDesign.getPageHeader().getElementByKey("wo_image"); image.setX(3); image.setY(69); image.setHeight(new Long(height - Math.round(height*.35)).intValue()); image.setWidth(new Long(width - Math.round(width*.35)).intValue()); JasperCompileManager.compileReportToFile(jasperSubDesign, context.getRealPath("/WEB-INF/reports/decoration_sheet_header.jasper"));
  6. this works: Code: BufferedImage img = ImageIO.read(new File(wo_image_path)); height = img.getHeight(); width = img.getWidth(); jasperSubDesign = JasperManager.loadXmlDesign(context.getRealPath("/WEB-INF/reports/decoration_sheet_header.jrxml")); JRDesignImage image = (JRDesignImage)jasperSubDesign.getPageHeader().getElementByKey("wo_image"); image.setX(3); image.setY(69); image.setHeight(new Long(height - Math.round(height*.35)).intValue()); image.setWidth(new Long(width - Math.round(width*.35)).intValue()); JasperCompileManager.compileReportToFile(jasperSubDesign, context.getRealPath("/WEB-INF/reports/decoration_sheet_header.jasper"));
  7. this works: Code: BufferedImage img = ImageIO.read(new File(wo_image_path)); height = img.getHeight(); width = img.getWidth(); jasperSubDesign = JasperManager.loadXmlDesign(context.getRealPath("/WEB-INF/reports/decoration_sheet_header.jrxml")); JRDesignImage image = (JRDesignImage)jasperSubDesign.getPageHeader().getElementByKey("wo_image"); image.setX(3); image.setY(69); image.setHeight(new Long(height - Math.round(height*.35)).intValue()); image.setWidth(new Long(width - Math.round(width*.35)).intValue()); JasperCompileManager.compileReportToFile(jasperSubDesign, context.getRealPath("/WEB-INF/reports/decoration_sheet_header.jasper"));
  8. this works: Code: BufferedImage img = ImageIO.read(new File(wo_image_path)); height = img.getHeight(); width = img.getWidth(); jasperSubDesign = JasperManager.loadXmlDesign(context.getRealPath("/WEB-INF/reports/decoration_sheet_header.jrxml")); JRDesignImage image = (JRDesignImage)jasperSubDesign.getPageHeader().getElementByKey("wo_image"); image.setX(3); image.setY(69); image.setHeight(new Long(height - Math.round(height*.35)).intValue()); image.setWidth(new Long(width - Math.round(width*.35)).intValue()); JasperCompileManager.compileReportToFile(jasperSubDesign, context.getRealPath("/WEB-INF/reports/decoration_sheet_header.jasper"));
  9. attention teodord -- --please stop me if i am of track -- what i am going to do to get a dynamic image into a pdf, where as the image dimensions remain exactly the same as the original image, is to 1) use java to get the x and y pixel dimensions of image 2 ) parse the JRXML and change the height and width 3) recompile the JRXML into .jasper 4) run the report if this is not the right way, even if we need to pay some money, _please_ reply with the solution. but if this is the right solution, no problem at all, not a lot of code, and it will not impact performance to any noticable degree.
  10. regarding C:\jasperreports-3.6.2\demo\samples\images, when running the pdf sample, it appears that the pdf results for the real size example and real height example (see 2 excerpts below) both are larger than the original image. attached are the original image and the pdf output of the report. what we are looking for is a pdf example where the image is left alone in terms of its original pixel dimensions using a PDF exporter. this way various images can be used, dynamically, and they remain in the original dimensions. Code:<image scaleImage="RealSize"><reportElement x="0" y="0" width="150" height="40"style="imageBox"/><imageExpression>"dukesign.jpg"</imageExpression></image><image scaleImage="RealHeight"><reportElement x="0" y="0" width="100" height="40"style="imageBox"/><imageExpression>"dukesign.jpg"</imageExpression></image>
  11. Really need some help here -- completely lost -- not an "image guy". Reproduce by simply using ireports 3.6.1 and see the internal preview -- images with "Real Size" set still expand to the size of the image tag... am i out to lunch??? :-) ok -- don't answer that....
  12. here is image and pdf -- as you can see pdf image is bigger then source image. this is done with "RealSize" setting on image tag. a lot of similar threads but no answers found. one idea would be to set the width and height of image tag dynamically. can this be done with a parameter?
  13. note: if pdf is at 65% size, then image in exported report is correct, original size... fyi, client needs image in report to be exactly the same size as original for production staff to use sewing embroidery matching image....
  14. hello, using ireports3.6.1, pdf preview, with jpeg image tag like this: <image scaleImage="RealSize" hAlign="Center" vAlign="Middle"> <reportElement positionType="Float" x="2" y="62" width="549" height="146"> <printWhenExpression><![CDATA[$V{PAGE_NUMBER} == 1]]></printWhenExpression> </reportElement> <imageExpression class="java.lang.String"><![CDATA[$P{wo_image_path}]]></imageExpression> </image> the image comes out too big in PDF (about 10% bigger than original). any ideas on how to keep image in exactly (pixel-perfect) size of original jpeg? thanks! tom
  15. ...tried making a subreport for portion of page header band that needs to print on only first page, make page header bank very small and let it stretch with the subreport. this works, page header expands on first page, then shrinks on subsequent pages. but performance is no good. so tried making that subreport use all parameters and no query, but as luck would have it, that subreport has 5 other subreports that each need a db connection/result set... any ideas how to make page header band collapse/shrink rather than expand? thanks!
  16. hi -- have a page header with height of 472 on first page. then on subsequent pages, we just need a 1 inch page header. what is the best way to acheive this in jrxml? current approach is to have page header elements below that first inch to print only when page_number == 1. and that works fine, only that the page header band will not shrink on subsequent pages (so we get the 1 inch page header we want, with 4 inches of blank page below that, then the detail...). if this is a good approach, how do you get the page header band to shrink in height? thanks, tom Post Edited by tomkast at 03/01/2010 19:06
  17. ...take that back, report from ireports wizzard compiled fine in the jr 3.6.2 ant compile demo. you can scratch this.
  18. is there documentation or a simple compatibility statement between ireports and jr? i was looking at the latest demos in the 3.6.2 jr distribution and it would seem that a jrxml file created with ireports 3.6.1 report wizzard may not work in, for example, the demo\samples\antcompile demo...
  19. used jr in past (2000, 2004, 2005-7), using again, searched forum, seems a basic question, please feel free to direct to exiting thread... use case: - make new report in ireports 3.6.1, use report wizzard, select "Cherry" style, valid data source, preview works using ireports. save jrxml and try to compile with plain vanilla ant task (net.sf.jasperreports.ant.JRAntCompileTask) and jasperreports-1.3.1.jar error: it seems that there are many dependencies. the first was "groovy" the default jrxml language option. then after adding all jar's, including groovy, that come with the groovy distribution, including all asm-x jars, there is still the error: [jrc] Compiling 1 report design files. [jrc] File : C:\src\Richardson\trunk\EWS\ews\webapp\WEB-INF\reports\report 1.jrxml ... FAILED. [jrc] Error compiling report design : C:\src\Richardson\trunk\EWS\ews\weba pp\WEB-INF\reports\report1.jrxml [jrc] net.sf.jasperreports.engine.JRException: Errors were encountered whe n compiling report expressions class file: [jrc] org.codehaus.groovy.control.MultipleCompilationErrorsException: star tup failed, calculator_report1_1259610763812_137095: 25: unexpected token: priva te @ line 25, column 5. [jrc] 1 error [jrc] [jrc] at net.sf.jasperreports.compilers.JRGroovyCompiler.compileUnits( JRGroovyCompiler.java:97) [jrc] at net.sf.jasperreports.engine.design.JRAbstractCompiler.compile Report(JRAbstractCompiler.java:190) [jrc] at net.sf.jasperreports.engine.design.JRDefaultCompiler.compileR eport(JRDefaultCompiler.java:105) [jrc] at net.sf.jasperreports.engine.JasperCompileManager.compileRepor tToFile(JasperCompileManager.java:127) [jrc] at net.sf.jasperreports.engine.JasperCompileManager.compileRepor tToFile(JasperCompileManager.java:109) [jrc] at net.sf.jasperreports.ant.JRAntCompileTask.compile(JRAntCompil eTask.java:398) [jrc] at net.sf.jasperreports.ant.JRAntCompileTask.execute(JRAntCompil if the answer is that reports created with ireports must be compiled with ireports, is there a runtime library that supports the .jasper files, compiled with ireports, so that you can view them using jasperreports in web app? thanks, tom
  20. ...another idea would be to add the sql predicate '...and rownum < 10000" for example. rownum works in oracle. we support oracle mssql and udb and our sql is in our jrxml, so i would need to add a scriptlet to append the right query predicate based on the db version. if you know a way to do this without SQL - i would love to know... tom
  21. thanks for the reply. i am not sure how to implement this - my documentation is old and there is no built in ROWCOUNT variable in the jrxml (in my pdf doc). if i add the variable, what do you mean by 'use your select query'?
  22. argh - please delete this post. i have posted it in another forum: :: Forum List JasperSoft Open Source JasperReports Discussion/Help sorry, tom
  23. hi - we are using open reports 1.0 to run jasper reports 1.2.1. all of our sql is in our jrxml. is there a convenient way of limiting the max number of records returned by a query or throwing an error if select count(*) on the query is more than x records? thanks, tom
  24. hi - we are using open reports 1.0 to run jasper reports 1.2.1. all of our sql is in our jrxml. is there a convenient way of limiting the max number of records returned by a query or throwing an error if select count(*) on the query is more than x records? thanks, tom
×
×
  • Create New...