jasper-reports

jasper reports, hiding columns at runtime

Hi, I have a Jasper report template, and I need to show/hide a column at runtime based on a particular condition. I'm using "Print when expression" to conditionally show/hide this column (and it's header) in my report. When the column is hidden, the space it would have occupied is left blank, which is not particularly attractive. I wou...

External Styles in JasperReports

Hi there, I'm working on a system that includes a large number of reports, generated using JasperReports. One of the newer features is that you can define styles for reports. From the available docs I believe there is some way to have an external file defining styles to use, and you can reference that in your jasper reports. This allow...

view SQL executed by Jasper report

Hi, When running a Jasper report in which the SQL is embedded in the report file (.jrxml), is it possible to see the SQL that is executed? Ideally, I'd also like to see the values that are substituted for each of the $P{} placeholders. Cheers, Don ...

getResultSet from Spring-JDBC

Hi, I'm using Spring's support for JDBC. I'd like to use JdbcTemplate (or SimpleJdbcTemplate) to execute a query and obtain the result as an instance of ResultSet. The only way that I can see of achieving this is using: String sql = "select * from...."; SqlRowSet results = jdbcTemplate.queryForRowSet(sql); ((ResultSetWrappingSqlRowSet...

Jasper report generating bad HTML

Hi, If I view the HTML generated by one of my Jasper reports in IE7 I see the following: <BR /><BR /> <A name="JR_PAGE_ANCHOR_0_1"> <TABLE style="WIDTH: 1000px" cellSpacing="0" cellPadding="0" bgColor="#ffffff" border="0"> <-- table body omitted --> </TABLE> The two BR tags are added via the JRHtmlExporterParameter.HTML_HEADER param...

What is the best report engine for Java

For most of our project, we use Jasper Reports, does anyone have experience with other report engines, is there anything better? (We use JR for stock-exchange reports) ...

Jasper Reports

Hi, We have a CGI based web report framework written in C/C++. The CGI client connects with proprietery code which in turn connects to database. We are looking for a better Java based replacement for CGI due to performance, maintenance and probably security factors. Can Jasper connect with the proprietery code? Or will Servlet be e...

How do I change the locale that Jasper uses?

The windows installed on my machine has the locale en_AU and that's what Japer uses. I already tried changing the locale of all users, including the Administrator but it still uses en_AU. How can I change that locale? Is it possible to change the REPORT_LOCALE parameter on my report? ...

How do you calculate a percentage based on two variables with different evaluation groups in Jasper Reports?

First, a sample of what I am trying to accomplish (Evaluation time - Auto): Group 1                 Amt      %   - Group 2 item       4      33.3%     - Group 3 item     1      25.0%     - Group 3 item     3      75.0%   - Group 2 item       8      66.7%     - Group 3 item     5      62.5%     - Group 3 item     3      37.5% Total      ...

Jasper exported to Excel ignoring background color?

Have you ever had alternating background colors in a Jasper report and then exported it to Excel? The Excel export seems to ignore the alternating color. I've got a Jasper report where the rows alternating background color using the procedure referenced HERE. When I preview it using the viewer or export to PDF it works -- but not whe...

How to use print when expression in Jasper

Hi, Can somebody tell me how to use the printwhenexpression of jasper? Regds, malathi ...

Jasper report column width

Hi, I have some Jasper reports which are displayed in HTML format. I would like the width of the columns in the HTML tables to automatically resize to fit the content of the widest cell (in that column), such that all the data is displayed. Currently this does not happen because the HTML generated by Jasper specifies fixed widths for t...

lazily compile Jasper .jrxml to .jasper

Hi, I use Jasper reports with the JasperReportsMultiFormatView class provided by the Spring framework. This class takes care of compiling the source .jrxml files to their compiled .jasper format when the Spring application context is created. However, this compilation process is really slowing down the application startup time. Is it p...

JasperReports: does positionType=''Float'' work at all for staticText ?!

I need to have a staticText to float below another element with variable height. I'm taking a sample from the book JasperReports for Java Programmers. It says that it's possible to do it. The difference with my sample is that I use a hard coded string in textFieldExpression, they use a $F{} field. <textField isStretchWithOverflow="...

JasperReports: subreports not working with positionType='Float'

Subreports overlap in this example -- what am I doing wrong? The second one is supposed to "float" below the first one, with its 'y' attribute being ignored, but it isn't. Thanks !! <?xml version="1.0" encoding="UTF-8"?> <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema...

Inclusion and exclusion of subreports (IReport-Jasper)

Just needed to include or exclude a subreport based on a condition when using IReport tool to create Jasper reports. 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. thanks in advance. ...

PAGE_COUNT not rendered correctly in JasperReports...?

I have added the footer "Page x of x" to my report, but the PAGE_COUNT doesn't seem to work, maybe because I have many subreports?? I get: Page 1 of 1 Page 2 of 0 Page 3 of 0 Page 4 of 0 Any ideas? Thanks! ...

Jasper reports counting pages depending on group

The problem is like this. The report page numbers that are displayed on the page should not be dependent on the current but on the group page. Let me explain: I have a report with 2 groups that has 4 pages, each group on two pages, and what I need to do is the following: group 1 page 1: should be: 1/2 -> current: 1/4 group 1 page 2:...

show or hide page number from same report depending if it is main or subreport

How to hide footer section from a jasper report when it is a subreport. Only show the footer section when it is a main report. ...

JasperReport - taking too much resources

so, problem is when we are showing to user created document in JasperReport Dialog. User can press print icon and sent it to printer. It seems to take too much resources on client's computer on all three levels: creating report, showing report on screen and sending it to printer. One example PC is AMD Duron 800MHz with 256MB of RAM so ...