Prescription

Generate Prescriptions with Carbone

Download Template

Download data sample

  • Template type document docx simple
  • Carbone min. v4.0.0+
  • Features loop html date alias count
  • Target Prescription custom

Objectives

Generate prescriptions with the following features:

  • Present information in tables

Solution

Here’s how you can achieve this using Carbone:

  1. Design the layout

    Add a title and define the header, including elements like logo and illustrative image.

  2. Insert a table

    • Go to the Insert menu, select Table and create a table (e.g., 6x3 table)
    • Write the labels for your columns.
    • Insert Carbone tags to display the required data, such as {d.pres[i].name}.
    • Define at least one corresponding [i+1] for each iterated array to specify the position of the (i+1)-th item, e.g. {d.pres[i+1]}

    Note: To apply a specific format (e.g., banded rows), highlight the table and choose a style from the Table Design menu.

  3. Use aliases

    • To improve readability, define aliases with #.

    Example: {#doctorPR = d.doctor.profile.personal}

    • Use the alias with $.

    Example: {$doctorPR.name.f}

  4. Date manipulation

    • Use {c.now} to return the current date in UTC.
    • Use the :formatD formatter to specify the pattern for display

    Example: {c.now:formatD(LLLL)}

    • Add a time offset to the current date using the :addD formatter if needed.

    Example: {c.now:addD('15','day'):formatD(LLLL)}

    1. Signature
    • Insert a temporary image for the signature.
    • Right-click on the image, select View Alt Text, and define the path for the dynamic signature.

    Example: {$doctorp.signature}

And there you go!

Tips

  • Prevent rows from breaking across pages

    If you don’t want rows to break across pages, follow these steps:

    1. Highlight the table in the template.
    2. Right-click and go to the Table Properties menu.
    3. Navigate to the Row section.
    4. Deselect the option to allow rows to break across pages.
  • Repeat header rows on subsequent pages

    If you want to repeat the first row when your table spans page 3 and beyond, follow these steps:

    1. Highlight the first row of your second table in the template.
    2. Right-click and go to the Table Properties menu.
    3. Navigate to the Row section.
    4. Select the option "Repeat as header row at the top of each page."

Perfect!

You might also like

Trusted by 600+ paid customers in 40+ countries

Finance
Healthcare
Public
Retail
Industries
Energy
Software
Telecom
1dior.png
22thales.png
23younited.png
2danfoss.png
3cma-cgm.png
3illumina.svg
4KparK.png
6scalingo.png
7defense.png
8bmw.png
8telus.png
bestseller.png
flagship_bioscience.png
insly.png
ninox.png
sodexo.png