tony-dfs Posted June 14, 2023 Share Posted June 14, 2023 Hello everyone,I am currently updating an application that uses jasperreports in version 6.0.3 to the latest. Everything works, PDF reports are correctly produced, but I noticed a bug, in fact the CSS style is not applied.Here is an example of what I write in my jrxml file: <parameter name="synthesis" class="java.lang.String"/><textField textAdjust="StretchHeight"> <reportElement x="20" y="60" width="555" height="3" uuid="d127gg55-c50a-4298-b5y7-7f17596bu752"> <property name="com.jaspersoft.studio.unit.y" value="px"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> <textElement markup="html"/> <textFieldExpression><![CDATA[$P{synthesis}]]></textFieldExpression></textField>I looked for solutions, there are flying saucer that could work or maybe I can use jrtx files, I don’t know if there is any other solution.Anybody got any idea how to fix this ? Thx Link to comment Share on other sites More sharing options...
Mehak Rajkumar Posted June 15, 2023 Share Posted June 15, 2023 Thank you for posting to the Jaspersoft Community. Our team of experts has read your question and we are working to get you an answer as quickly as we can. If you have a Jaspersoft Professional Subscription plan, please visit https://support.tibco.com/s/ for direct access to our technical support teams offering guaranteed response times. Link to comment Share on other sites More sharing options...
Michael Bielkiewicz Posted June 15, 2023 Share Posted June 15, 2023 What exactly isn't working? I don't see any CSS in your JRXML snippit. I copied your snippit into a JRXML file I have in Studio and it appears to work ok... Link to comment Share on other sites More sharing options...
tony-dfs Posted June 16, 2023 Author Share Posted June 16, 2023 The parameter synthesis contains the html/css. The html part is correctly display with the markup="html" but CSS doesn't work Link to comment Share on other sites More sharing options...
tony-dfs Posted June 19, 2023 Author Share Posted June 19, 2023 No one got an answer ? Link to comment Share on other sites More sharing options...
anish.rai Posted June 23, 2023 Share Posted June 23, 2023 Thank you for your patience, we have not forgotten you. We need a little more time with our team of experts to come up with a solution. We will respond back with an answer as quickly as we can. Link to comment Share on other sites More sharing options...
Michael Bielkiewicz Posted June 26, 2023 Share Posted June 26, 2023 Does ANY CSS work in that field? Have you tested this - or is it true that anything you put in there, it simply doesn't work? Can you give me an example of the CSS you are trying that fails? Link to comment Share on other sites More sharing options...
tony-dfs Posted June 27, 2023 Author Share Posted June 27, 2023 For example, this html/css work :<html>hello<div class='div-fullpage'>Div 2<h1>title</h1></div><span style="text-decoration: underline; color: red;">underligned red text</span></html>But css attributes like margin-top, padding-left, etc ... doesn't work. An other problem is bold or italic in CSS doesn't work, so i tried to use <b> or <strong> tags but the text is not displayed in bold.<html><b>hello</b></html> in this case, the text is display in the report but not in bold... 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