-
Posts
16 -
Joined
-
Last visited
Content Type
Profiles
Forum
Events
Featured Visualizations
Knowledge Base
Documentation (PDF Downloads)
Blog
Documentation (Test Area)
Documentation
Dr. Jaspersoft Webinar Series
Downloads
Everything posted by szaharia
-
1) set the net.sf.jasperreports.export.xls.pattern property for that element with the value "d-MMM-yyyy h:mm AM/PM" 2) Not sure what is the issue here. 5.75 really means 575% in percents. If you need to display something like 6% instead of 5.75, you could place $F{myDatabaseField}/100.0 in your textfield instead of $F{myDatabaseField}, and use the "#,##0%" pattern
-
Text Field is not getting aligned as per "Fixed to top" setting.
szaharia replied to pa.chidhambaram's topic in Products
Make sure the 'Remove Line When Blank' is checked for elements in rows that have 'Print When Expression' set to false. Additionally, set 'Position Type' as 'Float'. -
If your variable is of type java.lang.String, use !$V{affiche}.equals("0") as print when expression. If your variable is of type java.lang.Integer, use $V{affiche} != 0
-
Using HTML markup on textField messes up number formatting
szaharia replied to peter.diazdeleon's topic in Products
There is no more need of the 'Markup' attribute. Your texfield should look like below, in the JRXML file: <textField pattern="#0.000;(#0.000-)"> <reportElement x="430" y="2" width="30" height="20" uuid="4eba3e3c-c0d5-4da0-a71a-b805092110a9"> <property name="com.jaspersoft.studio.unit.height" value="pixel"/> <property name="com.jaspersoft.studio.unit.width" value="pixel"/> <propertyExpression name="net.sf.jasperreports.style.forecolor"><![CDATA[$F{previous4} < 120 ? "red" : "black"]]></propertyExpression> </reportElement> <textElement textAlignment="Right"> <font size="8"/> </textElement> <textFieldExpression><![CDATA[$F{previous4}]]></textFieldExpression></textField>[/code] -
You could set the 'Ignore Pagination' flag to true. In addition, you could use the net.sf.jasperreports.export.csv.exclude.origin.band.{arbitrary_name} property in a similar way as described here: http://community.jaspersoft.com/wiki/how-can-i-suppress-page-headers-and-footers-when-exporting-xls
-
Using HTML markup on textField messes up number formatting
szaharia replied to peter.diazdeleon's topic in Products
Below is an example of using net.sf.jasperreports.style.forecolor property expression: <propertyExpression name="net.sf.jasperreports.style.forecolor"><![CDATA[$F{previous4} < 120 ? "red" : "black"]]></propertyExpression>[/code] -
Using HTML markup on textField messes up number formatting
szaharia replied to peter.diazdeleon's topic in Products
Instead of html markup, you could use a conditional style or the net.sf.jasperreports.style.forecolor property expression for that element. -
Applying style to non-repeated values (TextFields)
szaharia replied to colombianboss561's topic in Products
You could place an empty frame in the report that: has the same x, y, width and height as the textfield.is 'Opaque' and has a blue backcolorhas 'Print repeated values' set to trueis placed under the textfield (in the JRXML file the frame is defined before the textfield):<frame> ...</frame><textField> ...</textField>[/code] -
How to pass parameter value in the field value ?
szaharia replied to jani99harsh's topic in Products
Since JR 6.3.1 you could use the net.sf.jasperreports.sql.field.column.name property for each field, to map the column name dinamically. Meaning you could use a static field name in JRXML that will map a column name in your dynamic query. For instance: <parameter name="paramId" class="java.lang.String"> <defaultValueExpression><![CDATA["emp_id"]]></defaultValueExpression> </parameter>... <field name="id" class="java.lang.Integer"> <propertyExpression name="net.sf.jasperreports.sql.field.column.name"><![CDATA[$P{paramId}]]></propertyExpression> </field>[/code]In the above example, whenever you will use the $F{id} expression in the JRXML file, the "emp_id" column in the sql query will be referenced, via the parameter paramId. -
You could let the page height unchanged, place each chart on a different page, and set the Ignore Pagination report flag to true. This will generate a single page document at runtime. But you also have to take into account that some document viewers cannot display pages of 450 cm height.
-
You could use 2 texfields with the same position within the report: one of them having the Stretch with Overflow attribute set to true, the other having the same attribute set to false. For each textfield use a print when expression that depends on your boolean parameter.
-
Could you post a JRXML sample that illustrates the problem? Thank you.
-
Thank you for this detailed explanation. :) To get the same dynamic color for the element background as in highlighted text, just set the property for the textfield: <propertyExpression name="net.sf.jasperreports.style.backcolor"><![CDATA[$F{strColorHex}]]></propertyExpression> Make sure the element's mode is set as 'Opaque'. Also make sure the element gets always printed (there is no print when expression set for this element) These above settings should solve the problem.
- 6 replies
-
- expressions
- text field
-
(and 2 more)
Tagged with:
-
Hi, please let me know if I properly understood the case: - if $F{strShownText} is null or empty, the element background should be visible, colored as $F{strColorHex} - if $F{strShownText} is not empty (let's say if $F{strShownText} = "Test"), the background should not be displayed, in order to make the text visible If it's correct, then you could set the following properties for the element: <propertyExpression name="net.sf.jasperreports.style.backcolor"><![CDATA[$F{strColorHex}]]></propertyExpression> <propertyExpression name="net.sf.jasperreports.style.mode"><![CDATA[$F{strShownText} == null || $F{strShownText}.equals("") ? "Opaque" : "Transparent"]]></propertyExpression> In case you need the background to be always displayed, then set only the net.sf.jasperreports.style.backcolor property as shown above, and make sure the texfield mode is always Opaque.
- 6 replies
-
- expressions
- text field
-
(and 2 more)
Tagged with:
-
In case you need the element's background to be filled only when a condition is met, you could use either a conditional style, or the following dynamic style properties at element level: net.sf.jasperreports.style.backcolornet.sf.jasperreports.style.modeMore on dynamic style properties you can find out here: http://jasperreports.sourceforge.net/config.reference.html#net.sf.jasperreports.style.{style_property_suffix}
- 6 replies
-
- 1
-
- expressions
- text field
-
(and 2 more)
Tagged with:
-
You need to arrange the data into groups that break after every 8 records (see some examples of data grouping here). Then, create a detail band containing the textfield with data. Create a second detail band containing a line element. For this second detail band use a print when expression in the form: $V{myGroup_COUNT} == 2 || $V{myGroup_COUNT} == 3 || $V{myGroup_COUNT} == 5 || $V{myGroup_COUNT} == 8[/code]where 'myGroup' is the group name.
-
Try ($P{p_trip_entry_begin} != null ? $P{p_trip_entry_begin} + ($P{p_trip_entry_end} != null ? " AND ":"") : "") + ($P{p_trip_entry_end} != null ? $P{p_trip_entry_end}.toString() : "")[/code]
- 1 reply
-
- expression editor
- print when expression
-
(and 1 more)
Tagged with:
-
It may be a problem with the "dd/mm/yyyy" pattern, since 'mm' usually stands for minutes. Try to use "dd/MM/yyyy" instead.
-
$V{TOTTR3}/$V{TOTFIN3} is evaluated in expression because it is a function parameter. Try this expression instead: $V{TOTFIN3}==0 ? 0 : $V{TOTTR3}/$V{TOTFIN3}
-
In case of repeating page header, set this property in the report: <property name="net.sf.jasperreports.export.xls.exclude.origin.keep.first.band.1" value=""/>[/code]To repeat column header, you should set this property: <property name="net.sf.jasperreports.export.xls.exclude.origin.keep.first.band.3" value=""/>[/code]
-
iReport - 1st row missing of object when passed in sub report.
szaharia replied to nilesh.saravate's topic in Products
Here you can find some useful information: http://community.jaspersoft.com/wiki/why-first-record-missing-my-subreport