Book a Demo

Author Topic: Document generation: change orientation  (Read 8594 times)

cRossi

  • EA Novice
  • *
  • Posts: 15
  • Karma: +1/-0
    • View Profile
Document generation: change orientation
« on: September 27, 2018, 05:58:07 pm »
Hello,
I do have two section breaks in the (main) Document Template with changing the orientation 1st from portrait to landscape and 2nd from landscape back to portrait. The included Template Fragment between the two section breaks is already defined in landscape. All other Template Fragments are in portrait mode, and I guess it could also be inside the Template.

The Document Template looks like:

Quote
(Portrait mode)
<package>
{Template Fragment #1} :: portrait
<element>
{Template Fragment #2} :: portrait
----- Section Break ----- (change to landscape)
{Template Fragment #3} :: landscape
----- Section Break ----- (change to portrait)
{Template Fragment #4} :: portrait
<child elements>
{Template Fragment #5} :: portrait
</child elements>
</element>
</package>

The Template Fragment is also in landscape mode and doesn’t have any additional section breaks and Looks like:

Quote
(landscape mode)
Text
<custom>
{field}
</custom>

My Problem is, that the it works the first time, but the second time the landscape section still stays in Portrait mode.

In Word are the section breaks visible and the orientation can be changed manually for these sections.

Does anyone know what I can do?

Thanks and greetings
Christian



skiwi

  • EA Expert
  • ****
  • Posts: 2081
  • Karma: +46/-82
    • View Profile
Re: Document generation: change orientation
« Reply #1 on: October 02, 2018, 01:01:57 pm »
IIRC to use a section break to change the paper size or orientation, the section break has to be the very last thing in a document template (doesn't work as the very first thing).
The paper size/orientation in the next document template is then honoured.
You need a separate document template for each change in paper size or paper orientation.
« Last Edit: November 14, 2018, 06:10:42 am by skiwi »
Orthogonality rules
Position and Team disestablished, thanks austerity.
Now itinerant.

cRossi

  • EA Novice
  • *
  • Posts: 15
  • Karma: +1/-0
    • View Profile
Re: Document generation: change orientation
« Reply #2 on: November 13, 2018, 10:28:33 pm »
Maybe I'm to stupid for this, but it's still not working.

Now I also have trouble with the Header / Footer which is also not working. In my template it shows the correct format, but when the document is created it mix up the formatting from the Header into the Footer.

Who designed and implemented such a useless and ugly function....?

Changing the page layout from portrait to landscape and back should be standard function for diagrams.

It's a shame to do this stupid thing manually in Word, I'm really upset and the help from Sparx itself was never so useless like it is on this Topic.

Where are the right and good working examples for this, the provided Videos doesn't give a helpful answer aswell.

skiwi

  • EA Expert
  • ****
  • Posts: 2081
  • Karma: +46/-82
    • View Profile
Re: Document generation: change orientation
« Reply #3 on: November 14, 2018, 06:19:48 am »
I don't agree that document generation useless, actually its quite competent, if complex - but what do you expect.


I do agree that the documentation, for example, https://www.sparxsystems.fr/resources/user-guides/publish/document-reports.pdf, could be updated to describe how to generate document that has differing paper sizes and orientation.


To help you
  • use document templates
  • use a separate document template for a change in paper size or orientation
  • put the section break as the first thing in the document template
  • then change the paper size of orientation for the document template
  • also look at using the the 'Insert page breaks when generating a Master Document'
  • also look at the 'add a page break before each new Package'
Orthogonality rules
Position and Team disestablished, thanks austerity.
Now itinerant.

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: Document generation: change orientation
« Reply #4 on: November 14, 2018, 09:15:57 am »
Agree with Skiwi that the document generation isn't useless, on the contrary its very powerful and a lot better than many other tools I could mention. Like many things there are tricks and tips to working with tools like this and an investment in time to make it work does pay off. I know it can be a bit frustrating when climbing the learning curve but stick with it for a little longer.

I've generated 100+ page Solution/Enterprise architect documents that include pages of A4 portrait and A3 Landscape for diagrams with no problems. I just spent some time learning how to work within the constraints of the tool. Its no different to every other software whether its MS Excel, Word or Sparx Enterprise Architect.

As Skiwi says you need a different template with different page set up and orientation to make it work. The reason is the page size and orientation are controlled via the printer set up on the template which limits the fact you can't change this within the template between sections like in MS Word.

To achieve generating one document with different orientations and paper sizes then you should use virtual document with master/model documents.  You need to ensure the  headers and footers are set correctly in the master template which the master document references. See tag values for that.
The set up is like this;

Master with template defining headers and footers
  • Model Doc referencing package with template set up for A3 landspace for diagrams
  • Model Doc reference package with template set up for A4 for details on the diagram elements. Usually name and description as a minimum.
For further information on virtual docs see this url
https://sparxsystems.com/enterprise_architect_user_guide/14.0/model_publishing/virtualdocuments.html

If you still struggle then some people prefer EADocX
https://www.eadocx.com/

I have know people to use the reporting built into MS Access when dealing with eap and eapx files or SQL Reporting Services if they have SQL database.  Although not sure how they got on with diagrams using those tools. It all depends on skill set what people have and want to use.

Happy to help
:)