meiqing Posted December 21, 2007 Share Posted December 21, 2007 Dear All,I am very new to ireport. My problem is to dynamically display an image in cross tab report. I am generate a report for survey. the cross tab header column are choice text like below NA SELDOM ALWAYS Y N N N Y N N Y N My goals is to display a filled radio button image for answer Y and non-filled radio button image for answer N. Here is what I tried.create crosstab parameter image1 and image2 <crosstabParameter name = "image1" class="java.lang.String" <parameterValueExpression><![CDATA["C://image1"]]></parameterValueExpression></crosstabParameter>... In the cross tab field where display Y and N I have this expression <textFieldExpression class="java.lang.String"><![CDATA[$V{ANSWER} == "Y" ? $P{image1} : $P{image2}]]></textFieldExpression> However, as you can expect I get the string "C://image1" in Y field instead of the radio button.My question is if there is a way to pass the image object in the cross tab or is there any way I can pass it through the java code?I have searched for couple of weeks before I post this.Any suggestion or comment is highly appreciated. Merry Christmas to you all! Link to comment Share on other sites More sharing options...
meiqing Posted January 9, 2008 Author Share Posted January 9, 2008 I actually found a solution.instead use the textfield in the subreport. Change to a image. And in the <imageExpression> field use the <![CDATA[$V{ANSWER} == "Y" ? $P{image1} : $P{image2}]]> Then, it works. Link to comment Share on other sites More sharing options...
marisa.delgado Posted April 7, 2017 Share Posted April 7, 2017 hi!It's amazing but I have exactly the same requirement. I know this was quite long ago... but is it possible that you could post the entire xml ?Thanks in advance 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