Landscape section in custom reports

Friday, March 12, 2021
Avatar

Hello,

I'm creating a custom report (which will be exported in Word format), and want to make one section of the report (with a particularly wide table) in landscape orientation.

I can do a section break with the mso word formatting code, but this code for making the section Landscape doesn't work:

<style> 
    @page LandscapeSection
    {mso-page-orientation:landscape;}
    div.LandscapeSection
    {page:LandscapeSection;}
    </style>    
    <div class="LandscapeSection">

     MY SECTION

    </div>

Is this supposed to work, am I doing something wrong, or can this be achieved some other way?

Help would be appreciated.

 

3 Replies
Friday, March 12, 2021
Avatar
re: dl.pie Friday, March 12, 2021

Hi DL

You need to edit the source template that is being used:

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

and change it in there.

Regards
David

Wednesday, March 17, 2021
Avatar
re: inflectra.david Friday, March 12, 2021

Hey David,

Cheers for the response. However, this would only work if my entire document needs to be landscape. For a single section, it should be included in a specific template.

Now the solution here below turns out to work, I just needed to add a number of properties to the Landscapesection, other then mso-page-orientation (like size, margings, etc.) If you do that, it works like a charm.

 

Friday, April 2, 2021
Avatar
re: inflectra.david Friday, March 12, 2021

David,

Is the source Template file available in SpiraTest?  Or, do I need SpiraTeam or SpiraPlan to have access to the Source Template(s)?

Thanks,
Mike

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: Friday, March 12, 2021
  • Last Reply: Friday, April 2, 2021
  • Replies: 3
  • Views: 1088