Custom element label column width: For all the group styles except flow-group and description-group we print the group element label in a separate column to align the fields (data). The default width of this is 35% of the available width and the rest goes to the data. But in some cases you have very long or very short labels and would like to change this. If
so just pass the option element-label-column-percentage-width=XX where XX is the percentage value for the column (do not include the %).
Column width when using multiple columns: If you have a flag or group XSL style with more than one column we adjust this up so that you get a larger % of the available group for the label. Two/three columns style is often used when you have many "simple" elements with e.g. numeric or check boxes, and you therefor need more space for labels (if you have default 35% of the page width for labels and you have a two column then there is only 17.5% of the page width for label). In the case of two/three columns where therefore "automatically" adjust this value. The algorithm we use for this is as follows:
two-columns: Label width = (column-width) + ((column-width) * (100-column-width)%).
E.g. if column width is 35, then column width of two column = 35 + 35*65% = 58%. In other words - if you have a small percentage for column width then you get a relatively larger width in two columns (but the width in cm is still smaller) than if you already have a large percentage for the column width.
Specify columns for dynamic field table: When using dynamic field table the default behavior is to give each field the same relative width. E.g. if three columns they all get 1/3 each no matter if it is a checkbox or a text field. You can pass options to specify the relative size for each column using the option: dyn-field-table-column-width-NN=XX. Here NN must be replaced with the column index and XX is the relative size.
If you use this option it is important that you specify enough values for the maximum number of columns that are going to be printed. If you e.g. have one element with four fields and one with three, you must specify four values. The element with three would then only use the first three.
Right align numeric data in dynamic field table: If using dynamic field table you can give an extra option: right-align-numeric-in-table=true to make right align numeric values in the column.
Important note for dynamic field table: The built in version of this style is much more fragile when it comes to using this style. It expects that all the elements in the group has the same number of fields - and if it does not it will crash. So use this style with care, and if you use it the built in reports might not work.
Indentation for disabled elements: In dRofus you can set up the dynamic GUI so that some fields are enabled or disabled depending on if a check box is checked or not. This is a quite common "pattern" and used e.g. to enable a description field. But sometime you also use this to enable/disable all the fields in another element. In that case the whole element is enabled/disabled by another field. In the default reports these elements are not printed at all unless the field is checked. But when using these building blocks they are.
The default style for this is that the label is grey (you can modify the style dyn-disabled- label in the CSS if you would like to show this in another way). But one thing you cannot control using this style is the indentation. To set indentation of elements that are enabled/disabled by a checkbox in another element set: element-is-disabled-bylabel- indent=XXyy. Note that this option not only need the value XX, but also the unit yy (e.g. mm, px, pt etc).
Show checkboxes in front of element label: If the first field of an element in dRofus is a checkbox, and this field does not have its own label one could say that the checkbox is for the element and not the field it selves. But in the client and the default layout in the reports is to show it after the element label.
You can overwrite this feature in the report by passing the option show-checkbox-before- element-label=true. If the first field of an element is checkbox and the checkbox does not have its own label (or it has a label, but the option Show label= "Do not show label") then the checkbox is printed before the element label and excluded from the fields to print after.
A special note about using this style in combination with the two- or three-column-group xsl style: Normally when using two- or three-column group style we would split the elements into two or three parts and print each of them in a column using the group layout-style. But if show checkboxes in front option is set and we have a two- or three- column group we would print them using the flow-group style instead. This is because a normal pattern for using this is to have a lot of checkboxes in a group and optionally some text fields after the checkboxes. If we use the group style in a two or three column there is very limited space left for the content column (with fields). And we also do not need to align the checkboxes any more (they are in front) so any additional fields would just flow after the element label.
Control if group label should be printed: Default behavior is that before we print any of the elements in the group we print the group label if the group has any label. You can control the style (font/borders/colors etc.) in the style sheet, but using an option you can also control when it should be shown (or not).
You can pass the option show-group-label=mode, where mode is one of:
- always: Will always make room for the group label even if the group does not have a label.
- nonempty: Will print the label if the group has any label (even if it is not shown in the client). This is the default behaviour.
- inclient: Will print the label only if the group has a label and it is also shown in the client (e.g. "Show border" is true for the group).
- never: Will never print the group label.
Using more than one option: More than one option can be given to the same parameter option, just comma separated.
Example: To give the element label column width of 25%, show checkboxes before elements, never show group label, indent disabled elements by 5mm and custom columns for the flow table - use the following option:
show-checkbox-before-element-label=true,element-is-disabled-by-label- indent=5mm,element-label-column-percentagewidth=25,show-group- label=never,dyn-field-table-column-width-1=1,dyn-field-table-column- width-2=2,dyn-field-table-column-width-3=12 |
---|