XLS

Empty cell in Excel when overflow

Hi,

When I am trying to export report to xls format I get empty cells, if textfield value overflow.

I set textfiled property stretch with overflow to the true and added these properties to report:

pashab's picture
3
Joined: Nov 3 2014 - 12:12pm
Last seen: 3 months 1 week ago

Answers:

0

try the following:

http://jasperreports.sourceforge.net/config.reference.html#net.sf.jasper...

 

 

net.sf.jasperreports.export.xls.remove.empty.space.between.rows = true

 

net.sf.jasperreports.export.xls.remove.empty.space.between.columns = true

gertbeedfrobe's picture
Joined: Mar 7 2010 - 9:45pm
Last seen: 2 days 2 min ago

Hi gertbeedfrobe,
Thanks for your response.
But it is not exactly that I mean
I have problem during the export to excel when textfiled have big word, that does not fit within the boundaries of the field. Then this value is losted and is not contained in cell.
Does jasperreports have some settings for hyphenation?

In HTML it also doesn't work as I expected:
the field stretches horizontally and pushes the columns on the right, over another fields

pashab - 3 months 1 week ago

Pages

0

This is what I get:

http://c2n.me/39cbljj - link to screenshot

Does anybody know to solve this issue, please help?

pashab's picture
3
Joined: Nov 3 2014 - 12:12pm
Last seen: 3 months 1 week ago

On the Detail properties, set the Split Type to 'Prevent'. On the field properties, set Stretch Type to 'No stretch'.

janiesprenger - 2 weeks 1 day ago

Pages

Pages

XLS - page scale in 'Page Break Preview'

1. Download report from Jasper in format XLS 2. Open it in Excel 2010 3. View -> Page Break Preview

Page scale is in 60%. Can I change it to 100% via jrxml? 

vanchester's picture
Joined: Jul 18 2014 - 12:44am
Last seen: 2 days 3 hours ago

Answers:

No answers yet

Pages

Export XLS properties are not applied with openerp

Hi,

I generated a report to be exported to XLS, I added some properties in the field that will be the column but they are not applied when the report is genered by openerp, if the report is generated by iReport, it's look great.

For example the following properties are not applied, I've tried each one at a time, not simultaneously:

raul.mendez's picture
Joined: Sep 18 2014 - 1:26pm
Last seen: 2 weeks 6 days ago

Answers:

No answers yet

Pages

How to set property for JRDesignTextField item

JRDesignTextField textField = new JRDesignTextField();   
textField.setX(xPos);   
textField.setY(2);  
textField.setWidth(columnWidth);   
textField.setHeight(COLUMN_HEIGHT);   
textField.setHorizontalAlignment(HorizontalAlignEnum.LEFT);   
textField.setStyle(normalStyle);           
JRDesignPropertyExpression propertyExpression = new JRDesignPropertyExpression();     
JRDesignExpression expr = new JRDesignExpression();     
vpatel_1's picture
Joined: Sep 4 2014 - 7:50pm
Last seen: 5 months 2 weeks ago

Answers:

No answers yet

Pages

Xls formula to static value

Hello.

I'm working on one report which can be downloaded via web app as pdf or xls file.

I'm using in this report xls formula to count sth. Ofcourse when it's exported to pdf file there is no possibility that pdf will count itselfs this value from xls formula.

So, there is my question, is there any way to automaticly convert formula into counted static value when report is exported to pdf?

Or maybe creating 2 fields, one with formula and second with already counted value, where one field or another is hidden depends on what kind of export did we choose?

geston88's picture
Joined: May 12 2014 - 12:59am
Last seen: 9 months 2 weeks ago

Answers:

No answers yet

Pages

Excel Sheet not displaying Cell border

I am working on struts2 jasper plugin to generate reports. I am comfortable now with  generating reports. But i am strugling with XLS format reports. I am not able to design perfect XLS jasper template file in IReports.

I have added following properties,

net.sf.jasperreports.export.xls.ignore.graphics    : false

maheshksd's picture
Joined: Feb 27 2014 - 10:32pm
Last seen: 1 year 5 days ago

Answers:

0

What is the exact statement you're using to set those properties.

hozawa's picture
3884
Joined: Apr 24 2010 - 4:31pm
Last seen: 7 hours 31 min ago

Pages

formatting pattern of xls.formula

Hello,

having this JRXML:

ostry's picture
8
Joined: Jul 6 2012 - 7:20am
Last seen: 2 weeks 2 days ago

Answers:

0

Try adding the following property to your report:

<property name="net.sf.jasperreports.export.xls.detect.cell.type" value="true"/>

If you're using Studio, you can add properties to a report by clicking your report from the Outline view. Going to Properties view and selecting "Advanced" tab and select "Misc" -> "Properties"

hozawa's picture
3884
Joined: Apr 24 2010 - 4:31pm
Last seen: 7 hours 31 min ago

I already had <property name="net.sf.jasperreports.export.xls.detect.cell.type" value="true"/> there (using iReport)... thank you for hint anyway, I googled this earlier

ostry - 1 year 1 week ago

Pages

0

PROBLEM SOLVED:

by exporting to XLSX instead of XLS and everything is OK (tested in Excel 2007 and LibreOffice Calc 4.0.0.3)

with legacy XLS, there were not only problems with currency formatting, but also with some weird circular references (this second and more serious problem was present only in Excel, not in LibreOffice)

ostry's picture
8
Joined: Jul 6 2012 - 7:20am
Last seen: 2 weeks 2 days ago

Pages

Getting exception while creating excel file

Hi All,

 

I am getting the below exception when I am trying to generate excel report

 

jobz.joseph's picture
Joined: Jan 14 2014 - 1:10am
Last seen: 9 months 1 week ago

Answers:

No answers yet

Pages

Problem while converting to excle file from jasper

Hi all, I have created a jasper template file for generating excel report. I want to query some data from DB and dispay it in my generated excel file. I can able to generate the file but the problem is there is somuch of blank spaced in the page. I am generating the report for department wise. so, if only one member is present in the department, I need the full page for that department and the remaining details will load to the next page. These all are working. Attached a screenshot of the file.

jobz.joseph's picture
Joined: Jan 14 2014 - 1:10am
Last seen: 9 months 1 week ago

Answers:

1

Hi Joby ,

This is happening because, the excel export takes the white space in the report as a column, as you say that there is an requirement of Header also, that will contain columns which correspond to whitespaces.

It is adviced, that the reports exported in Excel should rather shred the header, and the text feilds placed in the detail section or anywhere for that matter should be continuous in nature

 

Hope that this helps Thanks Ankur Gupta http://ankurthetechie.blogspot.in/

Ankur Gupta's picture
Joined: Jan 21 2013 - 10:36pm
Last seen: 1 month 1 week ago

Hi Ankur,

Thank you for your advice. I will check the design and will try it.
Thank you.

jobz.joseph - 1 year 2 months ago

Hi Ankur,
I need a small help. I am trying to remove the spaces between the data in Jasper report. suddenly, I got an error.

500 Internal Server Error
java.lang.IllegalArgumentException: The 'to' row (20) must not be less than the 'from' row (36) at org.apache.poi.hssf.model.Sheet.addMergedRegion(Sheet.java:445) at org.apache.poi.hssf.usermodel.HSSFSheet.addMergedRegion(HSSFSheet.java:561) at net.sf.jasperreports.engine.export.JRXlsExporter.createMergeRegion(JRXlsExporter.java:611) at net.sf.jasperreports.engine.export.JRXlsExporter.initCreateCell(JRXlsExporter.java:560) at net.sf.jasperreports.engine.export.JRXlsExporter.createTextCell(JRXlsExporter.java:550) at net.sf.jasperreports.engine.export.JRXlsExporter.exportText(JRXlsExporter.java:410) at net.sf.jasperreports.engine.export.JRXlsAbstractExporter.exportPage(JRXlsAbstractExporter.java:590) at net.sf.jasperreports.engine.export.JRXlsAbstractExporter.exportReportToStream(JRXlsAbstractExporter.java:463) at net.sf.jasperreports.engine.export.JRXlsAbstractExporter.exportReport(JRXlsAbstractExporter.java:186) at pkgIncentiveWeb.EmpIncentiveDvnReportAction.execute(EmpIncentiveDvnReportAction.java:235) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65) at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:663) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:285) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:126) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192) at java.lang.Thread.run(Thread.java:534)

What is this error. any idea?

Regards,

Joby Joseph

jobz.joseph - 1 year 2 months ago

Pages

Pages

[SOLVED][JasperReports Server] Handler processing failed; nested exception is java.lang.OutOfMemoryError: Java heap space

Hello to you all , I started in the world of reporting. Here is my problem : I created a report in iReport . The preview of the report in iReport is going very well , and I can export the results of my report in XLS format without worries. The generated report contains 422 pages ( a little over 10,000 lines of results) 9 columns. When I upload the same report on my JasperServer Report and executes server, everything is going very well . By cons when exporting to XLS , I always error  

JonReport's picture
Joined: Aug 13 2013 - 5:25am
Last seen: 1 year 1 week ago

Answers:

1

Hello JonReport, - check your JVM startup parameters sudo service tomcat7 status # to find out your pid sudo jmap -J-d64 -heap pid # -J-d64 for a 64-bit System, to print info about heap memory - try to understand environment variables in ubuntu - take a look at the differences between JAVA_OPTS and CATALINA_OPTS

- decide how to change the JAVA_OPTS(there are some ways) I do it in /etc/default/tomcat7, e.g.:

JAVA_OPTS="-Djava.awt.headless=true -Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m -Xss2m -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled" then restart tomcat ...and it works now :) Marius  

mariuss's picture
84
Joined: Aug 11 2013 - 2:33pm
Last seen: 1 year 2 months ago

You, mariuss, make my day !

Your post is just what I needed! Documentation with simple but precise references and a concrete example !

My problem is now fully resolved :).

____________________________________________

For people in the same configuration as me :

Here is my current JAVA :

java -version

java version "1.6.0_27"
OpenJDK Runtime Environment (IcedTea6 1.12.6) (6b27-1.12.6-1ubuntu0.12.04.2)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)

My JasperServer Reports Server is installed on a Ubuntu 12.04 LTS server through a .WAR compiled by me according to the documentation and executed by a Tomcat 6 Server.

In order to increase the JVM memory. I did an
ps -aux | grep java

which allowed me to see that my JVM was configured with a-Xmx128m.

To change the JAVA_OPTS (there are some ways), e.g.:
nano /etc/default/tomcat6
OR (depend of your tomcat version)
nano /etc/default/tomcat7

then add , e.g.:
JAVA_OPTS="-Djava.awt.headless=true -Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m -Xss2m -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled"

Then restart tomcat, ... and it works now :) !

JonReport - 1 year 4 months ago

Pages

0

Have you tried increasing the memory allocated to your JVM on your serer? The settings you should check are -Xms and -Xmx.

nicolaifriis's picture
Joined: May 25 2010 - 4:32am
Last seen: 5 months 2 weeks ago
0
Try this
 
You can use a virtualizer to limit the use of memory (Tools->Options->iReport->Compilation and execution (tab) ->Execution options (tab)  check "Use virtualizer". The vitualizer can be configured in the tab  "Virtualizer".
 
If the error happens at export time, the virtualizer is not useful, and you have to increase the heap size (meaning set a bigger value for the option -J-Xmx512m change 512 to 1000 or more..may be it will help..
try it..
 
hishamkmr's picture
Joined: Sep 4 2013 - 5:07am
Last seen: 11 months 1 week ago
0

For a more comprehensive treatment of performance, take a look at our Wiki's JasperReports Server Performance Reference.

It will explain how to configure the JVM as well as other performance tips.

djohnson53's picture
1069
Joined: May 25 2012 - 11:10am
Last seen: 2 hours 6 min ago
0

Wow, so many answers! It's just great! My JasperServer Reports Server is installed on a Ubuntu 12.04 LTS server through a .WAR compiled by me according to the documentation and executed by a Tomcat 6 Server. In order to increase the JVM memory. I did an ps -aux | grep java which allowed me to see that my JVM was configured with a-Xmx128m. However I have not found how increase it. What is the magic command line ? I tried this : export set JAVA_OPTS="-Xms128m -Xmx512m" Then restart : service tomcat6 restart But when I check with an ps -aux | grep java Nothing has changed I'm still-Xmx128m. I think I am doing wrong to apply the settings and check. The solution to virtualize am also interested, but I would like to have a detailed step by step guide to setup it. It sounds complex but sustainable me.  

JonReport's picture
Joined: Aug 13 2013 - 5:25am
Last seen: 1 year 1 week ago

If you're using the Ubuntu tomcat6 service try adding the -Xmx argument in /etc/default/tomcat6 (JAVA_OPTS variable).

lucianc - 1 year 5 months ago

Pages

0

Hello, I am now almost certain that the configuration of JVM is the solution to my problem. I just really stuck on this step. I can not really passing the parameters -Xms and -Xmx to JVM. Here is my current JAVA : java -version java version "1.6.0_27" OpenJDK Runtime Environment (IcedTea6 1.12.6) (6b27-1.12.6-1ubuntu0.12.04.2) OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)

JonReport's picture
Joined: Aug 13 2013 - 5:25am
Last seen: 1 year 1 week ago
0

Not finding how to change settings of JVM. I performed a clean install by uninstalling and re-installing completely JasperReport Server and Tomcat. Now I have no more problems, so I did not do anything special from my point of view in terms of configuration. But I would still like to know for the future and my general knowledge how to change settings of JVM. If a kind soul going around, I'm interested. My question is resolved in the sense that I have no more problems.

Thank you very much to those who took the time to look at my problem.

JonReport's picture
Joined: Aug 13 2013 - 5:25am
Last seen: 1 year 1 week ago

added as answer :)

mariuss - 1 year 5 months ago

Pages

Pages

Pages

Feedback
randomness