# Report Items & Layout A **report item** is a single visual element within a report format — a column header, a result value cell, a reference range cell, or a flag indicator. The collection of report items in a format defines the complete printed layout of the lab report. This article explains how to add and configure report items using the LIMS's CSS-based positioning system. --- ## Accessing Report Item Configuration 1. Go to **Administration → Manage Lab Services → Report Templates tab**. 2. Open the report format you want to configure. 3. Click **Add Report Item** or open an existing item to edit it. --- ## Report Item Fields ### Identification | Field | Description | |---|---| | **Name** | Internal name for this layout element (e.g., "Value column", "Reference header") | | **Item Role** | What type of element this is — see the table below | ### Item Role Options | Role | Description | |---|---| | **Test Header** | The column heading for the test/parameter name column | | **Value Header** | The column heading for the result value column | | **Unit Header** | The column heading for the unit column | | **Reference Header** | The column heading for the reference range column | | **Test Label** | The parameter name for each row (e.g., "Haemoglobin") | | **Value Value** | The patient's result for each row | | **Unit Label** | The unit for each row (e.g., "g/dL") | | **Reference Label** | The normal range for each row | | **Comment Label** | A free-text comment field for each row | | **Flag Value** | Displays the H/L indicator and flag message | --- ### Position & Size All position and size values are expressed as **percentages of the page area** (not absolute pixels), so the layout scales correctly to different paper sizes. | Field | Description | |---|---| | **Top** | Distance from the top of the report area (0–100%) | | **Left** | Distance from the left edge (0–100%) | | **Width** | Width of this element (0–100%) | | **Height** | Height of each row (0–100%, typically a small value like 3–5%) | **Example layout for a standard 4-column report:** | Item | Left | Width | |---|---|---| | Test Label | 2% | 30% | | Value Value | 33% | 12% | | Unit Label | 46% | 12% | | Reference Label | 59% | 20% | | Flag Value | 80% | 8% | --- ### Typography | Field | Description | |---|---| | **Font size** | Size in points (e.g., 10 for body text, 12 for headers) | | **Font weight** | Normal or bold | | **Font style** | Normal or italic | | **Text alignment** | Left, centre, or right within the cell | | **Vertical alignment** | Top, middle, or bottom | | **Text colour** | Hex colour code (e.g., #000000 for black, #CC0000 for red alerts) | --- ### Background and Border | Field | Description | |---|---| | **Background colour** | Cell background (e.g., #F0F0F0 for light grey header rows) | | **Border** | CSS border shorthand (e.g., "1px solid #CCCCCC") | | **Padding** | Internal spacing | | **Margin** | External spacing | --- ### Custom CSS For advanced styling, you can enter a **Custom CSS** string that overrides all other styling settings. This is intended for experienced administrators who need styling effects not covered by the standard fields. --- ## Designing a Report Layout: Step-by-Step 1. **Plan on paper first.** Sketch the desired report layout showing all columns and their approximate widths. 2. **Create header items first.** Add a report item for each column header (Test Header, Value Header, Unit Header, Reference Header). 3. **Create data row items.** Add a corresponding data item for each column (Test Label, Value Value, Unit Label, Reference Label, Flag Value). 4. **Set positions.** Align the header and data items in matching columns — the left and width values for "Test Header" should match those for "Test Label", and so on. 5. **Test the layout.** Generate a test report for a real patient and review the printed output. 6. **Adjust as needed.** Edit positions and sizes until the layout matches your design. --- ## Tips - Use consistent left/width values for matching header and data items so columns align precisely. - For the **Flag Value** item, set the text colour to red (e.g., #CC0000) so high/critical flags stand out on the report. - Keep font sizes readable — 9–11pt for body text works well for A4 reports. - After making changes, always test by printing an actual report before announcing the format is live. --- [Back to LIMS Administration](https://github.com/hmislk/hmis/wiki/LIMS-Administration)