jasper-reports

Jasper Reports : sub-reports are causing an infinite loop

时光毁灭记忆、已成空白 提交于 2020-01-01 11:50:24
问题 I have multiple Jasper Reports (with sub-reports) throughout my application. For some reason, one report (that also contains sub-reports) isn't working anymore. After debugging more than 1 day, I found out that it enters an infinite loop and keeps creating Threads for sub-report filling. Debugger keeps looping between: JRSubReportRunnable.java public void run() { running = true; error = null; try { fillSubreport.fillSubreport(); } catch (JRFillInterruptedException e) { //If the subreport

JasperReports: How to show data in two columns

血红的双手。 提交于 2020-01-01 09:24:09
问题 This is my current jrxml file: <?xml version="1.0" encoding="UTF-8"?> <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="report1" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="18199607-277f

The datepart hour is not supported by date function dateadd for data type date

只谈情不闲聊 提交于 2020-01-01 04:22:09
问题 While I am running the following query in jasper reports, I got the exception. "net.sf.jasperreports.engine.JRException: Error executing SQL statement for : Activity_Summary". Activity_Summery_Report is my jrxml file name. The query is declare @startdate as datetime; declare @enddate as datetime; declare @sitegroup as nvarchar(50); set @startdate = DATEADD(hh, +0, $P{StartDate}); set @enddate = DATEADD(hh, +0, $P{EndDate}); set @sitegroup = 'BBXNCR'; set NOCOUNT ON; -- Added by JC230090:

The datepart hour is not supported by date function dateadd for data type date

旧巷老猫 提交于 2020-01-01 04:22:06
问题 While I am running the following query in jasper reports, I got the exception. "net.sf.jasperreports.engine.JRException: Error executing SQL statement for : Activity_Summary". Activity_Summery_Report is my jrxml file name. The query is declare @startdate as datetime; declare @enddate as datetime; declare @sitegroup as nvarchar(50); set @startdate = DATEADD(hh, +0, $P{StartDate}); set @enddate = DATEADD(hh, +0, $P{EndDate}); set @sitegroup = 'BBXNCR'; set NOCOUNT ON; -- Added by JC230090:

iReport exported pdf does not show correct font

喜欢而已 提交于 2020-01-01 03:36:10
问题 A PDF generated in iReport using the 'Times New Roman' font appears to be using 'Arial' for its print version. Any idea what the problem is? 回答1: I've found that, at least for me, I must explicitly set the pdfEncoding attribute, as well as pdfFontName and isPdfEmbedded, on each font tag in the xml, even when using the system encoding, and that "Identity-H" seems to be needed when using unicode. So: Make sure your ttf font files are available on the classpath <font ... pdfFontName="filename

Avoid repeating column header in JRXML

狂风中的少年 提交于 2019-12-31 19:22:38
问题 How can I avoid the column name repeating in JRXML? Is there any attribute for avoiding having the column header in each page when generating a report using JRXML and Jasper? 回答1: If the header will always be on a specific page (e.g. the first page), you can add <printWhenExpression><![CDATA[$V{PAGE_NUMBER}==1]]></printWhenExpression> to the band, which will make it only print on page 1. PAGE_NUMBER is an inbuilt variable that is automatically incremented as the report is generated. 回答2: Set

Avoid repeating column header in JRXML

孤人 提交于 2019-12-31 19:20:11
问题 How can I avoid the column name repeating in JRXML? Is there any attribute for avoiding having the column header in each page when generating a report using JRXML and Jasper? 回答1: If the header will always be on a specific page (e.g. the first page), you can add <printWhenExpression><![CDATA[$V{PAGE_NUMBER}==1]]></printWhenExpression> to the band, which will make it only print on page 1. PAGE_NUMBER is an inbuilt variable that is automatically incremented as the report is generated. 回答2: Set

How to access Report Name attribute from within a report?

回眸只為那壹抹淺笑 提交于 2019-12-31 07:12:05
问题 In a jasper report, with iReports Designer one can set the Report Name to some value (in iReports, this is on the most top node in the report inspector). How can the value of this parameter been accessed later within e.g. a variable or a textfield of the same report? 回答1: With help of JASPER_REPORT parameter we can get instance of JasperReport class. This is the current template object. With help of JasperReport.getName() method we can get the report name. Example of template <?xml version="1

iReports is not work with JDK 8?

爱⌒轻易说出口 提交于 2019-12-31 06:54:06
问题 I have some issue here, I searched it and got that iReport Designer cannot working with JDK 8. but I need to using method on my project that using JDK 8. if I use my method it will give a warning. Unsupported major.minor version 52.0 is there any solution for it? so I can run my method? 回答1: As Alex already said, iReport Designer is deprecated and will not be supported any further. Since version 5.5 Jaspersoft Studio is the official and supported Client for Jaspersoft. In Jaspersoft Studio

Would like to display “To be contined” for all pages in report and for last report “End of report” has to be displayed using iReport

て烟熏妆下的殇ゞ 提交于 2019-12-31 06:48:10
问题 I have designed an iReport where it should display all the records in the report. If a report has 2 pages for example then first page should display "To be continued" second page should display "End of the report" irrespective of number of pages you are working with. I have placed a label at the footer of the report and changed the properties "print when expression" as $V{PAGE_NUMBER}.equals($V{PAGE_COUNT}.toString()) ? "End of Report" : "Continue" and displays error while executing the