ireport

Compare multiple date ranges

天涯浪子 提交于 2019-12-06 14:34:30
问题 I am using iReport 3.0.0, PostgreSQL 9.1. For a report I need to compare date ranges from invoices with date ranges in filters and print for every invoice code if a filter range is covered , partially covered , etc. To complicate things, there can be multiple date ranges per invoice code. Table Invoices ID Code StartDate EndDate 1 111 1.5.2012 31.5.2012 2 111 1.7.2012 20.7.2012 3 111 25.7.2012 31.7.2012 4 222 1.4.2012 15.4.2012 5 222 18.4.2012 30.4.2012 Examples Filter: 1.5.2012. - 5.6.2012.

Jasperreports - Hide duplicate field in report

耗尽温柔 提交于 2019-12-06 14:28:17
I'm creating reports using Java and JasperReports. What I've got is a query that outputs hotel details in order of Hotel Name. My problem is that, a lot of the time the Hotel Name field doesn't change from row to row. I want to find out how to only print each different hotel name once to stop the report printing unnecessary hotel names. Anyone have any idea how to do this? Would a group not do what you want? You put the hotel name into a group and it will only be printed once. Ashish use the following option in your report element. reportElement isPrintRepeatedValues="false". You can uncheck

How to use jasperreports subreports with grails jasper plugin?

元气小坏坏 提交于 2019-12-06 13:37:28
问题 I would like to use subreports with grails jasper plugins, I followed the manual at this url (http://www.grails.org/plugin/jasper). Here is my code : Domain Book : class Book { static belongsTo = Library Library library String title String author String publisher String category static constraints={ title() author() publisher() category() } } Domain Library : class Library { static hasMany = [ books : Book ] String name String adresse Date dateMaturity static constraints = { } String toString

Rotating 90º In a Blob Image in JasperReports

北城以北 提交于 2019-12-06 13:15:23
So I have a small jrxml with this: The two images are of the field type BLOB in a firebird database and to show it correctly I'm using new ByteArrayInputStream((byte[])$F{FOFU}) on the image expression. After reading a bit I figured the only way to rotate this image is to do it programmatically on java and I have no idea how to do, even after reading some posts here and other places. Can anyone help me with this ? private byte[] rotateImage(byte[] originalImageAsBytes , double radians) throws InternalException { ByteArrayOutputStream rotatedImageStream = null; try { BufferedImage originalImage

Multiple Pages in JRXML using iReport for multi page reports

北慕城南 提交于 2019-12-06 09:12:41
I just wanted to know does iReport/JRXML supports reports which are of multiple pages? If yes, can you give some reference samples? I am not asking of a report which will grow when data grows. I have a static report which contains more than one page to deal with. Each page will have different header, footer & content. Just they need to be part of one single JRXML . I simply tried this and it worked, though some issues are present and may not be working in general case but for my case following code worked. <break> <reportElement x="0" y="211" width="554" height="1"/> </break> Thanks. 来源: https

iReport subreport return value

寵の児 提交于 2019-12-06 07:10:35
问题 I am using iReport 4.0.2 and I want to show a result in my main report. For example, in my main report we have two columns and I want to get the sum of that two columns, just like this format: A B sum 10 5 15 Where A is one field in the main report and B is a return value of my subreport. This works well. But, the key point is that sometimes subreport will not return any value, which is the problem. In this case, the result of sum is like this: A B sum 10 NULL As we see here, B is the

Inclusion and exclusion of subreports (iReport-JasperReports)

非 Y 不嫁゛ 提交于 2019-12-06 07:04:01
问题 I need to include or exclude a subreport based on a condition. I'm using iReport to create JasperReports. I.e., if a subreport has values, I need to include that subreport, otherwise not. Can anyone please send a sample or tell me how to resolve this. 回答1: you can in the master report get data from your data source that allows you to identify if the subreport should be included, then use the 'printWhenExpression' field on the subreport element to check that data. I use this regularly - for

Border Artifacts in JasperReport PDF Designed with iReport 5.1.0

梦想的初衷 提交于 2019-12-06 06:24:31
问题 When generating a report with JasperReports, I am seeing weird borders drawn by the reporting engine. Sometimes the borders are drawn so that the lines jut out at 100% zoom level, as seen in this image. This means that when I attempt to draw a square textbox, it will not look like a square unless I zoom in to 150% for more. Here is an image showing the issue. Am I doing something wrong when setting the border settings in iReport? How can I fix this problem? 回答1: I had the same problem. When

How to print the grand total only in the last page of a very long report?

痞子三分冷 提交于 2019-12-06 06:03:37
问题 How can I make the total paramater appear only on the last page of a report with lots of concepts. The report repeats istelf until the list of concepts is displayed in two or more pages. The total appears in all of them because the parameter (received as $PTotal) is on the footer of the page. I need this to be displayed only in the footer of the last page. It doesnt matter if I leave that space as blank, I just need the parameter to be displayed only at the last page. This is not a report

Relative path for the Subreport

北慕城南 提交于 2019-12-06 05:07:53
问题 I'm working with iReport 3.5.0, and I'm using a subreport inside my main report. I don't want to give the absolute path for the subreport expression, but for example if I just give "bpSubReport.jasper" as the subreport expression (because sub and main are in the same directory), then iReport can find bpSubReport.jasper and compile the main report into bPReport.jasper, but my Java (gwt) application can't. It throws the exception net.sf.jasperreports.engine.JRException: Could not load object