Applying a User-Defined CSS to HTML Result File
When exporting a report to HTML format, a .css file will be generated automatically by Logi JReport to control the appearance and layout of the result file. When exporting a report to HTML format with Server API, Logi JReport enables you to apply your own .css file to the HTML result file.
To apply user-defined CSS to HTML result file:
- In Logi JReport Designer, specify the CSS selector in your own CSS for report objects.
Select the object which you want to apply in your own CSS, and in Report Inspector, specify a value for the CSS property External CSS Class Selector. The value of the property should be the selector in your .css file.
- Publish the report to Logi JReport Server (for details, see Publishing Resources).
- Edit your JSP file that invokes the interface used to export the report to HTML format.
- Export the report to HTML format using Logi JReport Server.
Logi JReport provides a demo JSP file ApplyUserCSS.jsp which is stored in <install_root>\help\samples\JSPSamples\ApplyUserCSS
for your reference. You can copy the whole ApplyUserCSS folder to <install_root>\public_html\jinfonet
, then
access the JSP via http://host:port/jinfonet/ApplyUserCSS/ApplyUserCSS.jsp
.