Custom Report Formatting and Styles

Friday, April 27, 2018 6:36:48 PM

I'm converting a manual test report into a custom report in SpiraTest. I've had some success with getting the content into place, now I'd like to adjust the styling. I didn't see any provisions for a CSS file, so I tried to enter style attributes into tags. Most of it got deleted by the template editor.

For example, I have a table in the report footer. I added a style attribute to the table tag and specified a width parameter. That worked fine. I added other attributes such as border and alignment, but they were deleted as soon as I toggled the source button in the editor. Similarly, if I added a style tag with the desired stylesheet markup, it was deleted as soon as I switched out of source view.

I experimented for a while and found I could add an alignment parameter for example and, even though it was deleted, the changes did seem to take effect.

So, in greater detail, I added a width parameter, like so:

<table style="width:900px">...</table>

I generate a report as HTML, the width looked correct, and the page source looked just like I wrote it.

The data in each cell was centered and I wanted it aligned to the left. So I added a text-align parameter:

<table style="width:900px; text-align:left">...</table>

I saved and generated a report. The page source had the text-align parameter, but it was deleted from the report template.

So my questions are:

  • Is there someplace I can manage my own stylesheets in Spira or a path convention I can follow to add my own stylesheets?
  • Why do the SpiraTest template editors accept some style parameters and quietly delete others?
  • And when the template editor deletes some of my markup but uses it anyway, is it stored someplace where I can actually see what's being used and possibly modify it?

 

1 Replies
Friday, April 27, 2018 6:42:56 PM
Avatar
re: deedub on Friday, April 27, 2018 6:36:48 PM

And, quick follow-up. I extracted the style tag from the <head> block of the page source before and after adding the text-align parameter as described in my original post and diffed the two. There were no changes to what appears to me as standard style definition used in the xslt templates provided in both the standard and custom sections of the SpiraTest report editor.

Statistics
  • Started: Friday, April 27, 2018 6:36:48 PM
  • Last Reply: Friday, April 27, 2018 6:42:56 PM
  • Replies: 1
  • Views: 330