* Table width problems on narrative export to rtf (word doc)

Questions regarding use of any Version of Family Historian. Please ensure you have set your Version of Family Historian in your Profile. If your question fits in one of these subject-specific sub-forums, please ask it there.
Post Reply
User avatar
jimlad68
Megastar
Posts: 911
Joined: 18 May 2014 21:01
Family Historian: V7
Location: Sheffield, Yorkshire, UK (but from Lancashire)
Contact:

Table width problems on narrative export to rtf (word doc)

Post by jimlad68 » 01 Aug 2014 21:58

I think this has similarities to post Narrative reports - tabs (7652)
http://www.fhug.org.uk/forum/viewtopic. ... ble#p33804
but as it is from 2007 I thought I should raise a new post, and my fix below might help with the original problem.

This is just an observation, there might be a FH fix, but this external fix might be of help to others:

I have run various narrative reports and where there is a numbered list, say children it gives e.g.
pic1.png
pic1.png (12 KiB) Viewed 4122 times
When I export to RTF > Word the list is in the form of a table, which ends up like this:
pic2.jpg
pic2.jpg (24.43 KiB) Viewed 4122 times
The problem is that the table column has a fixed width less than the width of the characters. An easy manual fix, but very time consuming and fiddly.

I found the following word macro that Autofits the contents of all tables in a document. For my reports it worked fine, but it is rather a sledgehammer and in some situations it may upset other things.

Code: Select all

Sub AutoFitAllTableAutoFitContent()
' from http://www.experts-exchange.com/Database/MS_Access/Q_22964541.html but amended wdAutoFitWindow to wdAutoFitContent.
    Dim tbl As Table
    For Each tbl In ActiveDocument.Tables
    tbl.AutoFitBehavior wdAutoFitContent
    Next tbl
End Sub
If you change wdAutoFitContent to wdAutoFitWindow, it will autofit the full width of the document, whereas wdAutoFitContent leaves the table in its original indented position.

P.S. Not sure if my 2 [img]s have worked, so I entered some of it manually. Is there anything special to inserting pictures in the forum. I tried onedrive, googledocs, jpg, png. [edit, the picture upload is now fixed] I followed the Can I post images? on http://www.fhug.org.uk/forum/faq.php#f3r3. Also I can't get the [topic][/topic] to work or [attachment=][/attachment]
Last edited by jimlad68 on 01 Aug 2014 23:00, edited 1 time in total.
Jim Orrell - researching: see - but probably out of date https://gw.geneanet.org/jimlad68

User avatar
tatewise
Megastar
Posts: 27089
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Table width problems on narrative export to rtf (word do

Post by tatewise » 01 Aug 2014 22:35

Answering your posting problems first, please checkout Forum Usage Guide (4252) in the User Group Forum, that explains the usage of special FHUG buttons kb and topic plus size limit for Upload attachment. If you hover on those two buttons it gives the format in a popup tooltip. [EDIT: I have corrected the topic link above to show how it works]
To insert an image or file use the Upload attachment tab below insertion box, Browse for the file on your PC, and click Add the file. You can then leave it as an attachment or Place inline.

I am not seeing the RTF > Word effect that you describe. The first table column is plenty wide enough for several digits.
Have you Installation Settings or customised Report Options > Page Layout ?

After some experiments, I suspect you have set Column Indents 2. to a small value less than 0.5" instead of 1.5". Perhaps with larger than default Format for Font Size.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
jimlad68
Megastar
Posts: 911
Joined: 18 May 2014 21:01
Family Historian: V7
Location: Sheffield, Yorkshire, UK (but from Lancashire)
Contact:

Re: Table width problems on narrative export to rtf (word do

Post by jimlad68 » 01 Aug 2014 23:16

1. Upload attachment tab !! Can't see for looking, expected it with all the other options B I U etc.

2. Will have another play with the kb/ topic in the future.

3. Re the Main Topic Subject: I reset all the options to installation settings and as you suspected it worked OK, so it will be a matter of experimenting to get the best value for my requirements. At least I know what the source of the problem is now and I have found a new word macro, even if I don't need it for FH.
Jim Orrell - researching: see - but probably out of date https://gw.geneanet.org/jimlad68

User avatar
tatewise
Megastar
Posts: 27089
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Table width problems on narrative export to rtf (word do

Post by tatewise » 01 Aug 2014 23:50

After even more experimentation I have discovered the following rules regarding the children tables in RTF format.

The Page Layout tab Column Indents have the following effect:

1. sets the table indent from margin ~ the default of 0.1" can be adjusted to move the table left or right

2. sets the right-hand of 1st column ~ the default of 1.5" - 0.1" above gives 1st column width of 1.4"
( but this width value has a minimum of 0.15" even if 1. is greater than 2. )

Thus if the difference between 1. and 2. is too small the 1st column is too narrow for the digits in RTF.

Note that this format is NOT reflected in the FH on screen table, because its layout is only governed by the Tab Width field below, which also governs the main paragraph indent!

[EDIT: The PDF and HTML formats also only use the Tab Width field, so the RTF use of Column Indents would appear to be a bug!]

I cannot explain why different fields are applied to the on screen format versus the RTF format.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
tatewise
Megastar
Posts: 27089
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Table width problems on narrative export to rtf (word do

Post by tatewise » 02 Aug 2014 16:54

After a more intensive investigation, it seems that the RTF layout discussed above is the 'standard', and the other Narrative layouts are erroneous.

In most reports, including Individual Summary Reports, Family Group Sheets, Multimedia Reports & Special Data Reports, their table layout is set by the Report Options > Page Layout > Column Indents, where each Indent defines the left-hand alignment of each column.
This applies to the FH on-screen display, and saved PDF File, Web Page (HTML) & Word-Processor Document (RTF).
This 'standard layout' applies to Narrative Report child tables in Word-Processor Document (RTF) discussed above.

Problem (1)
The exceptions are the Narrative Report child tables in the FH on-screen display, and saved PDF File & Web Page (HTML), that all use Report Options > Page Layout > Tab Width, which is confusingly out of step with all the others.

Problem (2)
The Column Indents will each accept any value, but in practice each must be greater than its predecessor, otherwise the columns are disrupted as in the illustration above.
Each Indent must be greater than its predecessor by at least 0.3” or 7.62mm, and FH should enforce that or ensure every column has a minimum width of 0.3” or 7.62mm.
Then every column content will be visible, albeit sometimes heavily wrapped, and the user can see that corrections are needed.

I have reported these two problems to Calico Pie.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

Post Reply