phantastes Posted December 10, 2010 Share Posted December 10, 2010 Hi,It is possible to set the html id using net.sf.jasperreports.export.html.id. Is there any way to set the html class attribute in a similar way? Magnus Link to comment Share on other sites More sharing options...
mferretti Posted February 22, 2011 Share Posted February 22, 2011 did you find any solution to it ? was actually looking for something like that ( set class element in HTML exported element ) Link to comment Share on other sites More sharing options...
mdahlman Posted February 22, 2011 Share Posted February 22, 2011 Have you tried the JR forum yet? This probably needs to be broken into two pieces: Can JR do this? How can you set it in iReport?Point one should be on the JR forum. Point two would be here. (I don't know if it's possible. It sounds entirely reasonable, but I haven't heard of it being done before.)Regards,Matt Link to comment Share on other sites More sharing options...
phantastes Posted February 22, 2011 Author Share Posted February 22, 2011 Hi,1. As far as I know there is no such property yet. This list contains the id property but not a class property:http://jasperreports.sourceforge.net/config.reference.html2. I guess there is some kind of workaround by assigning the first part of the ID as static string: "useThisAsAClass"+$F{uniqueID}And then use the static string part as a class. This is far from optimal though and it would certainly be nice with a class property. MagnusPost Edited by phantastes at 02/22/2011 19:23 Link to comment Share on other sites More sharing options...
Solution mdahlman Posted February 28, 2011 Solution Share Posted February 28, 2011 Magnus,I haven't been on the JR forum to know if you discussed this topic there. But I just got the JR 4.0.1 release notification. It adds:"custom property "net.sf.jasperreports.export.html.class" added at element level to allow specifying the CSS "class" attribute for elements when exported to HTML and XHTML/CSS format;"As far as I can tell, this is precisely what you're looking for.Regards,Matt Link to comment Share on other sites More sharing options...
phantastes Posted February 28, 2011 Author Share Posted February 28, 2011 Thanks Matt!You guys are really good at listening to feedback! Impressive. Magnus Link to comment Share on other sites More sharing options...
mferretti Posted March 1, 2011 Share Posted March 1, 2011 just tested . you guys rock ! Link to comment Share on other sites More sharing options...
bansi Posted March 14, 2011 Share Posted March 14, 2011 Hello,Do we have any samples for this or some more documentation ? Regards,Bansi Link to comment Share on other sites More sharing options...
mferretti Posted March 15, 2011 Share Posted March 15, 2011 Hi,in practice, what you have to do is add <property name="net.sf.jasperreports.export.html.class" value="YOURVALUE"/> to the report element that you want, in HTML, to be of class="YOURVALUE". Eg. <reportElement x="157" y="0" width="15" height="78"><property name="net.sf.jasperreports.export.html.class" value="verticaltext"/> ... 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