sanbez
-
Posts
296 -
Joined
-
Last visited
Community Answers
-
sanbez's post in Print Table Lost First Item Data was marked as the answer
https://stackoverflow.com/questions/18787697/table-tool-in-showing-one-fewer-lesser-database-records
-
sanbez's post in Seeking clarification in converting oracle report to Jasper report was marked as the answer
http://community.jaspersoft.com/questions/507944/sum-return-values-subreports
Is it your case? HTH
-
sanbez's post in error filling print... Error evaluating expression was marked as the answer
>Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 10
Are you sure that $P{yearFrom} containt 10 characters?
www.tutorialspoint.com/java/lang/string_substring_index.htm
-
sanbez's post in How to publish a BLANK report with no data. was marked as the answer
Set at report properties whenNoDataType="AllSectionsNoDetail"
-
sanbez's post in How to use conditional clause on a field in Jasper report to get values? was marked as the answer
Why 7 digids? You start only with 4 :) I guess that one of the possible values of $F{RACE_CODE} is "abcxyz" (you don't write example of data). Is it right? In this case you can use expression like this (java code example):
public static void main(String[] args) { String RACE_CODE = "abcxyz"; System.out.println(RACE_CODE.indexOf("abc") == -1 ? "0" : "1" + (RACE_CODE.indexOf("lmn") == -1 ? "0" : "1") + (RACE_CODE.indexOf("pqr") == -1 ? "0" : "1") + (RACE_CODE.indexOf("xyz") == -1 ? "0" : "1")); }[/code]
-
sanbez's post in Number field appearing as text while taking excel output was marked as the answer
Show your java-code which make export to excel
-
sanbez's post in negative BigDecimal pattern returns wrong was marked as the answer
Pattern:
#,##0.00;(-#,##0.00)
and don't use conditional style. It is not need in this simple case
-
sanbez's post in Data-store for Java objects. was marked as the answer
Set in main report properties for subreport:
Connection Type = Use a datasource expression
Data Source Expression = (like this:)new JRBeanCollectionDataSource(myCollection)
Check that you don't put DataSourceExpression into "ConnectionType" (see yuor error):
net.sf.jasperreports.engine.data.JRBeanCollectionDataSource cannot be cast to java.sql.Connection
-
sanbez's post in Jasper report parameters was marked as the answer
You must define params "value1" and "value2" in jrxml
-
sanbez's post in IReport “parameter Not Found” when adding a parameter was marked as the answer
Add paratemer city_to_choose in Report (not in a Dataset). After that you can pass it into New Dataset 1 (for example if you want to display this parameter in table header)
-
sanbez's post in Number field appearing as text while taking excel output. was marked as the answer
in iReport: Tools/Options/Export Options/Excel/Common set checkbox "Detect Cell Type" on checked. (iReport 4.1.2)
But i don't remember... Has iReport 4.0.2 this option?
-
sanbez's post in How to remove the empty space when there is no data in Detail band 2 ? was marked as the answer
Variant 1 (easy): Set vertical size of Detail 2 equal size of subreport (not empty rows in Detail 2 after subreport). Set in Main report in propetry windows of subreport 2 check box "Remove line when blank" in "checked". May be in this case, you must set Properties "When no data" in subreport2 in to "All sections, no details".
Variant2 (more difficult)
Return value $V{REPORT_COUNT} from subreport2 into main report (for example variable $V{Var1)). And set Print when expression ${Var1} on Detail2 section (or subreport).
HTH
-
sanbez's post in Accessing properties of nested bean was marked as the answer
Why in TextFieldExpression for firstName class is com.myCompany.Person ? replace it on java.lang.String
-
sanbez's post in uuid is not allowed was marked as the answer
Check in iReport Tools/Options/ClassPath
Which version of jasperreports-X.Y.Z.jar in this classpath?
After upgrade iReport to new version installer may save old classpath in new iReport with uncompatible libraries (previous version jasperreports-x.y.z.jar)
-
sanbez's post in How to remove space among columns when a field is hidden? was marked as the answer
Which version of jasper? In iReport 4.0.0 and later you may use Table and set "Column print when" condition. In this case all values on column will be hidden, and others columns shift left (there is no empty space).
-
sanbez's post in Crosstab - concatenate values in measure... was marked as the answer
Which type of calculation setting on cell of table?
Try to use Calculation = Sum in value expression for data cell.
And it may be required to write:
Incrementer (implements JRExtendedIncrementer) and
IncrementerFactory (implements JRExtendedIncrementerFactory) classes on java
I am make this for calculation sum on crosstab where cell of crosstab is complex data. And it's work fine.
I am think that for cell of table it's also will be work (for calculation in cell = "Sum" and set your incrementer)