Overview

When Spira generates a report, it first creates the HTML version of the report and then dynamically converts it to the other possible formats:

  • MS-Word
  • MS-Excel
  • PDF

That means when you create a custom report template, you need to use the right CSS Styles so that the conversion code will correctly map the styles to the appropriate formats.

Formatting Headings

Inside Spira, we use the following CSS class names for the headings:

  • Title1 --> Heading1
  • Title2 --> Heading 2
  • etc.

So if you use headings in your template, we recommend the following syntax:

<h1 class="Title1">Heading 1</h1>
<p>This is some body text</p>
<h2 class="Title2">Heading 2</h2>
<p>This is some body text</p>
<h3 class="Title3">Heading 3</h3>
<p>This is some body text</p>
<h4 class="Title4">Heading 3</h4>
<p>This is some body text</p>

which visually looks like:

Heading 1

This is some body text

Heading 2

This is some body text

Heading 3

This is some body text

Heading 3

This is some body text

When this gets converted to MS-Word it will then be converted into MS-Word styles "Heading 1",  "Heading 2", etc. correctly