GenoPro Home
GenoPro Home  |  Get Started With My Genealogy Tree  |  Buy  |  Login  |  Privacy  |  Search  |  Site Map
 

GenoPro Support Forum




Ancestor Report how to show the age ?

Click to view RSS...
Author
Posted Thursday, March 21, 2019 - Post #39557
Forum Writer

Forum WriterForum WriterForum WriterForum WriterForum WriterForum WriterForum WriterForum WriterForum Writer

Customers
GenoPro version: 3.0.1.5

Last Login: Saturday, July 27, 2019
Posts: 54, Visits: 234
I would like to add the age in this report but I am not able to code it in xml due to my uncompetency in programing.
Could someone help me to do it or to explain how to get this done ?
Many thanks for any help.
Gérard

Edited: Sunday, March 24, 2019 by Regislab
Posted Saturday, March 23, 2019 - Post #39578
Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master

Administrators
Customers
Important Contributors
FamilyTrees.GenoPro.com
GenoPro version: 3.0.1.5

Last Login: Yesterday @ 10:23 AM
Posts: 2,822, Visits: 20,568
You can age in brackets at the end of each individual's details by changing 2 lines in the Ancestors.htm template file at line 109.  I have highlighted the additions required.

i.e. 

Report.WriteFormattedBr "<b>{0}.</b> {9}{1&t}<span style='font-size: xx-small;'>{8}</span> {2}{3&t} {4&t}{5}{6&t} {7&t}{10}", (iKey+1), oName,_
strBorn, oName.Birth.Date, oName.Birth.Place,_
strDead, oName.Death.Date, oName.Death.Place,_
Util.IfElse(iKey > 0,  oName.Session("lineage"), ""), oName.Session("union"), _
Util.IfElse(oName.Age <> "", " (" & oName.Age.NYears & ")", "")


I have attached a copy of the modified file.  This is for GenoPro 2018 but I do not think it has changed from GenoPro 2011.


'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"


Ancestors.htm (5 views, 5.55 KB)
Posted Sunday, March 24, 2019 - Post #39583
Forum Writer

Forum WriterForum WriterForum WriterForum WriterForum WriterForum WriterForum WriterForum WriterForum Writer

Customers
GenoPro version: 3.0.1.5

Last Login: Saturday, July 27, 2019
Posts: 54, Visits: 234
Oh great, many thanks, absolutely what I wanted w00t
By the way, if I will say : 50 years in the report, is it correct if to just add the word "years", next to the number of years ?
Gérard

Edited: Sunday, March 24, 2019 by Regislab
Posted Sunday, March 24, 2019 - Post #39586
Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master

Administrators
Customers
Important Contributors
FamilyTrees.GenoPro.com
GenoPro version: 3.0.1.5

Last Login: Yesterday @ 10:23 AM
Posts: 2,822, Visits: 20,568
Even easier, just use oName.Age instead of oName.Age.NYears I think then if age is less than a year it will show months Smile


'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"
Posted Sunday, March 24, 2019 - Post #39587
Forum Writer

Forum WriterForum WriterForum WriterForum WriterForum WriterForum WriterForum WriterForum WriterForum Writer

Customers
GenoPro version: 3.0.1.5

Last Login: Saturday, July 27, 2019
Posts: 54, Visits: 234
Yes, many thanks, it works, I have tried it Smile
But I thought to have it written on the language used for the report, for example, when I use the french one, it still be written years, months and so on, in English and not années, mois, etc in French. Whistling
So I think it is better, if the age is just indicated like 70 years or 70 ans or 70 Jahren, and not all the details in month and day too.


Edited: Sunday, March 24, 2019 by Regislab
Posted Sunday, March 24, 2019 - Post #39590
Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master

Administrators
Customers
Important Contributors
FamilyTrees.GenoPro.com
GenoPro version: 3.0.1.5

Last Login: Yesterday @ 10:23 AM
Posts: 2,822, Visits: 20,568
Add this to the French Dictionary.xml just above the <DateFormatting> line

<FmtTimeSpan>
<!-- 
            Duration Formatting Options:
                {}        Output the value in numeric format (1, 2, 3, ...)
                {N}        Output the value in narrative cardinal (one, two, three, ...)            
             -->
<FmtDay>
{N} jour
</FmtDay>
<FmtDays>
{N} jours
</FmtDays>
<FmtMD> <!--  nine months and one day  -->
{0} et {1}
</FmtMD>
<FmtMonth>
{N} mois
</FmtMonth>
<FmtMonths>
{N} mois
</FmtMonths>
<FmtYear>
{N} année
</FmtYear>
<FmtYears>
{N} années
</FmtYears>
<FmtYM> <!--  one year and four months  -->
{0} et {1}
</FmtYM>
<FmtYMD> <!--  two years, six months and twelve days  -->
{0}, {1} et {2}
</FmtYMD>
</FmtTimeSpan>


I will leave it to you to translate the comments Hehe





'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"
Posted Sunday, March 24, 2019 - Post #39591
Forum Writer

Forum WriterForum WriterForum WriterForum WriterForum WriterForum WriterForum WriterForum WriterForum Writer

Customers
GenoPro version: 3.0.1.5

Last Login: Saturday, July 27, 2019
Posts: 54, Visits: 234
Many thanks again :-)
I have tried it but it did not work, I habe probably done a mistake, but do not see which one.
Here, attached, the dictionary.xml of the skin from the concerned french report, where I have just copy/paste the code you give, above the line <DateFormatting>

Dictionary.xml (1 view, 4.39 KB)

Edited: Sunday, March 24, 2019 by Regislab
Posted Sunday, March 24, 2019 - Post #39592
Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master

Administrators
Customers
Important Contributors
FamilyTrees.GenoPro.com
GenoPro version: 3.0.1.5

Last Login: Yesterday @ 10:23 AM
Posts: 2,822, Visits: 20,568
Sorry  <DateFormatting> is wrong. I meant to say </DateFormatting> Blush


'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"
Posted Sunday, March 24, 2019 - Post #39594
Forum Writer

Forum WriterForum WriterForum WriterForum WriterForum WriterForum WriterForum WriterForum WriterForum Writer

Customers
GenoPro version: 3.0.1.5

Last Login: Saturday, July 27, 2019
Posts: 54, Visits: 234
Blush
Many thanks, I have tried also above </DateFormatting> but same result ... Crying


Dictionary.xml (0 views, 4.39 KB)
Posted Sunday, March 24, 2019 - Post #39596
Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master

Administrators
Customers
Important Contributors
FamilyTrees.GenoPro.com
GenoPro version: 3.0.1.5

Last Login: Yesterday @ 10:23 AM
Posts: 2,822, Visits: 20,568
The attached Dictionary.xml works for me with French Ancestors Report


'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"


Dictionary.xml (3 views, 4.38 KB)

Edited: Sunday, March 24, 2019 by genome


Similar Topics

Click to view RSS...
Expand / Collapse

Reading This Topic

Expand / Collapse