2340patel Posted April 22, 2018 Share Posted April 22, 2018 Hi have below json "markets": [ { "id": "1001", "name": "val1" }, { "id": "1002", "name": "Val2" }, { "id": "1003", "name": "val3" }]I wanted to display name field into single text fields with comma separated value. I tried declaring variable as follows <variable name="allVall" class="java.lang.String"> <variableExpression><![CDATA[($V{allVall} != null)?($V{allVall} + $F{name}) :( $F{name})]]></variableExpression> </variable> then using the variable in text field as <jr:listContents height="20" width="119"> <textField isStretchWithOverflow="true" evaluationTime="Report"> <reportElement stretchType="ElementGroupHeight" x="0" y="0" width="119" height="20" uuid="35355db6-36be-47f3-b346-ba1f5e5c6919"> <property name="com.jaspersoft.layout.grid.weight.fixed" value="false"/> <property name="net.sf.jasperreports.style.box.pen.lineStyle" value="Solid"/> </reportElement> <box> <pen lineWidth="1.0" lineStyle="Solid"/> <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement verticalAlignment="Middle"> <font fontName="Arial" size="10"/> </textElement> <textFieldExpression><![CDATA[$V{allVall}]]></textFieldExpression> </textField> </jr:listContents> however still values are displayed as text fields in list component as multiple text fields. I want single text fields with comma separated value. can someone pls guide on same. Thanks,Anjana. Link to comment Share on other sites More sharing options...
2340patel Posted April 25, 2018 Author Share Posted April 25, 2018 hi anyone come across this need to display in report Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now