changing page orientation and margins in XSLT

Thursday, March 27, 2014
Avatar
Hi,

I have a question about the XSLT. I have a report that will always be exported to MS Word. Can I set the page orientation to landscape and change the margins in the XSLT?
A quick search on the internet brought me to XSL-FO, but trying that myself resulted in epic fail of my report layout.
Playing around with page-width and page-height should help me out using xsl-fo. But putting this in the existing xslt seems not obvious.

does anybody have any suggestion? Is it supported in Spirateam?

thanks a lot!
Filip
2 Replies
Monday, March 31, 2014
Avatar
inflectra.jimx
re: FilipBaert Thursday, March 27, 2014
Hi Filip

Assuming that you are running SpiraTeam v4.1 or later, you can locate the underlying MS-Word 2007+ template at the following location:

C:\Program Files (x86)\SpiraTeam\Reports\MsWord2007.xml

Open that up in Notepad and you should see the various tags:

<w:WordDocument>
  <w:View>Print</w:View>
  <w:SpellingState>Clean</w:SpellingState>
  <w:GrammarState>Clean</w:GrammarState>
  <w:TrackMoves>false</w:TrackMoves>
  <w:TrackFormatting/>
  <w:ValidateAgainstSchemas/>
  <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
  <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
  <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
  <w:DoNotPromoteQF/>
  <w:LidThemeOther>EN-US</w:LidThemeOther>
  <w:LidThemeAsian>X-NONE</w:LidThemeAsian>
  <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
  <w:Compatibility>
   <w:BreakWrappedTables/>
   <w:DontUseIndentAsNumberingTabStop/>
   <w:FELineBreak11/>
   <w:WW11IndentRules/>
   <w:DontAutofitConstrainedTables/>
   <w:AutofitLikeWW11/>
   <w:UnderlineTabInNumList/>
   <w:HangulWidthLikeWW11/>
   <w:UseNormalStyleForList/>
   <w:DontVertAlignCellWithSp/>
   <w:DontBreakConstrainedForcedTables/>
   <w:DontVertAlignInTxbx/>
   <w:Word11KerningPairs/>
   <w:CachedColBalance/>
  </w:Compatibility>
  <w:DoNotOptimizeForBrowser/>
  <m:mathPr>
   <m:mathFont m:val="Cambria Math"/>
   <m:brkBin m:val="before"/>
   <m:brkBinSub m:val="&#45;-"/>
   <m:smallFrac m:val="off"/>
   <m:dispDef/>
   <m:lMargin m:val="0"/>
   <m:rMargin m:val="0"/>
   <m:defJc m:val="centerGroup"/>
   <m:wrapIndent m:val="1440"/>
   <m:intLim m:val="subSup"/>
   <m:naryLim m:val="undOvr"/>
  </m:mathPr></w:WordDocument>


That is where you can customize the initial view

Regards
Jim
Tuesday, April 1, 2014
Avatar
re: inflectra.jimx Monday, March 31, 2014
thx for the suggestion. This will affect all generated word report than? That may be a bit too drastic.

Is i than possible to have multiple word templates located on the server?

is it possible to only do this for 1 template?

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: Thursday, March 27, 2014
  • Last Reply: Tuesday, April 1, 2014
  • Replies: 2
  • Views: 4409