Show subscripts in IReport, Jasper server and in PDF Export
Requirement: Show number in field value as subscripts in IReport ,Jasper server and in PDF Export.
Make data easy with Helical Insight.
Helical Insight is the world’s best open source business intelligence tool.
Softwares used:
Jasper Server 5.6.0
IReport 5.6.0
Here I have created a sample Report to work out on above Requirement
Sample Query:
select ‘H2O’ AS SUBSCRIPT
UNION
SELECT ‘CO2’ AS SUBSCRIPT
UNION
SELECT ‘H3O2’ AS SUBSCRIPT
UNION
SELECT ‘S9O2’ AS SUBSCRIPT
UNION
SELECT ‘HO2CO32’ AS SUBSCRIPT
Output in IReport :
But actually we want result in below format
In the above screen shot if we observe, all the Numbers looks like SubScripts.So to Subscript the Numbers please follow the below steps
1.First add Tag to the number, which we want in SubScript
In this 1 will come as a subscript
2.To apply the above Tag to a field first change the Markup language as Styled
3.Nextuse the Replace function to Replace the Numbers to show as SubScript
4.In the above Report field name is SUBSCRIPT and replace the Numbers from 1 to 9
Make data easy with Helical Insight.
Helical Insight is the world’s best open source business intelligence tool.
Output in IReport :
Deployed in server the Output in Jasper server :
Output in PDF :
In all browsers this subscript will not work,eg:Mozila and Internet Explorer
To over come the above issue I have created Theme using overrides_custom.css ,and make this theme as a default theme
In the overrides_custom.css add the below code
#reportContainer td {
font-size: xx-small;
}
Best Open Source Business Intelligence Software Helical Insight is Here
A Business Intelligence Framework
Thanks,
SatyaGopi
Exporting Jaspersoft dashboard to PDF Jasper iReport Jasper report formatting and font issues jasper server Jasper Server and in PDF Export jaspersoft Show Subscripts in IReport subscript