In addition to editing the styles (style groups) in JReport Designer, you can also edit the XSD format styles (style groups) outside JReport Designer.
When you save a catalog, the style information is saved to disk at the same time. The related file will be located as follows:
File Name | File Description | Location | |
---|---|---|---|
1. | CatalogName_stl.xml | Style Group Structure in the Catalog | Catalog Folder (The directory where the catalog resides) |
2. | StyleGroupName_stl.xsd | Group/Style information | <install_root>\style |
The CatalogName_stl.xml file keeps the style group structure information. The following shows an example:
The style group structure in Catalog Browser: | The corresponding information in SampleReports_stl.xml: |
---|---|
<?xml version="1.0" encoding="UTF-8"?> |
The StyleGroupName_stl.xsd file keeps the group/style information, which in the above sample will be as follows:
The file content of ClassicBlue_stl.xsd: |
---|
As you can see in the above code sample, an XML style group file contains style group information, style information, and the style property entry information. You can edit the attributes of an element.
<StyleGroup name="GroupA"></StyleGroup>
Notes:
For example, if you want to change the Font Face property, you must type a proper font name that JReport supports for the default attribute, such as Arial, Times New Roman, Tahoma, and so on. You cannot type strings that are not recognized by JReport. Otherwise, the element will not take effect at runtime.
For example, with GroupA in the XML file, the GroupName attribute is:
<xs:attribute name="GroupName" type="xs:string" default="GroupA"></xs:attribute>
The XML style group file name should then be GroupA_stl.xsd.