displaying actual attachment in report instead of name

Monday, October 21, 2013
Avatar
hi,

in a test run detailed report, (output to html or word) I want to display the attachments (typically png files) instead of giving the default details.
googling a bit I came up with:
<img src="http://myservername/SpiraTeam/14/Attachment/{AttachmentId}.aspx"/>
this displays the the file correctly, but only in project 14, because project_id is not available in attachment.

I did not find a solution to make the project id variable.
can you provide a working xslt solution for this?
or is there another quicker/better solution?

thx,
Filip
5 Replies
Tuesday, October 22, 2013
Avatar
re: FilipBaert Monday, October 21, 2013

Hi Filip

Please try the following:

<img>
     <xsl:attribute name="src">
            http://myservername/SpiraTeam/<xsl:value-of select="../../PROJECT_ID" />/Attachment/<xsl:value-of select="AttachmentId" />.aspx
     </xsl:attribute>
</img>

This should work because although the Attachments don't include the project-id, the test runs themselves do.

Regards

Adam

Tuesday, October 22, 2013
Avatar
re: inflectra.david Tuesday, October 22, 2013
Adam,

seems to work like a charm.
thanks for the solution!

regards,
Filip
Thursday, July 30, 2015
Avatar
re: FilipBaert Tuesday, October 22, 2013
Hi,

I don't know if it worked back than when exporting to Word, but now it doesn't.
Word states that it cannot load the png file. This may be explained by the fact that one needs to log in to spirateam to see these images.

what is the solution to see these in a generated word report?

thanks
Filip
Wednesday, August 5, 2015
Avatar
re: FilipBaert Thursday, July 30, 2015
Hi Filip,

Unfortunately, with SpiraTest 4.1 and later, the embedded images do not display in Word reports. The workaround is to use a different output format.

Regards,
Elise
Friday, November 25, 2016
Avatar
re: inflectra.kat Wednesday, August 5, 2015

Hi Elise,

How about if the attachment is of Word format? Would it also be uploaded and embedded as part of say PDF format of Test Set Detailed report?

Thanks

Spira Helps You Deliver Quality Software, Faster and With Lower Risk

And if you have any questions, please email or call us at +1 (202) 558-6885

 

Statistics
  • Started: Monday, October 21, 2013
  • Last Reply: Friday, November 25, 2016
  • Replies: 5
  • Views: 3403