|
|
|
|
Customers
Last Login: Friday, June 15, 2018
Posts: 28,
Visits: 231
|
That works, Ron, thanks. Maybe this should be added to the documentation.
|
|
|
|
|
Administrators Customers Important Contributors FamilyTrees.GenoPro.com GenoPro version: 3.1.0.1
Last Login: 2 days ago @ 9:23 PM
Posts: 3,464,
Visits: 26,854
|
The Global Custom Tag Layout details are already added to the oCustomTagRepertory object stored in the Session data as Session("oCustomTagRepertory") by Init.htm.To list the Global Custom Tags in a table on the Home.htm frame page, just add this line before line 181 in Init.htm Session("Global") = oXmlDoc.selectSingleNode("/GenoPro/Global")
| and insert the following before line 75 of home.htm <%[ ' Write details of Global Custom Tags to the report ' Dim oCustomTagRepertory, oCustomTagDictionary, Layout, Layouts, i, j, cchBufferBegin, cchBufferStart, cchBufferNow, obj Dim strCustomTagData, strCustomTagDesc, strPrivate, strTag, strFmtTemplate, Args() strPrivate = LanguageDictionary.Peek("Private") cchBufferBegin = Report.BufferLength Set oCustomTagRepertory = Session("oCustomTagRepertory") Set oGlobal = Session("Global") Set obj = ReportGenerator.Document Report.WriteBr "<div class='clearleft'><ul class='xT'>" Report.WriteFormattedLn " <li class='xT2-{} xT-h' onclick='xTclk(event,""2"")'>", Util.IfElse(g_fCollapseReferences, "c", "o") Report.WriteFormattedLn "<a name='Additional Information'></a><h3 class='xT-i inline'>{&t}</h3><ul class='xT-h'>", Dic("HeaderAdditionalInformation")
If oCustomTagRepertory.KeyCounter("Global") > 0 Then ' Custom tags exist for this object Layouts = oCustomTagRepertory.Entry("Global").Count Set oCustomTagDictionary = oCustomTagRepertory("Global") End If For i = 1 to Layouts - 1 Layout = oCustomTagRepertory.Entry("Global").Object(i) cchBufferStart = Report.BufferLength ' custom tags in a table.
Report.WriteFormattedLn "<br /><li class='xT2-{} xT-h' onclick='xTclk(event,""2"")'>", Util.IfElse(g_fCollapseReferences, "c", "o") Report.WriteFormattedLn "<span class='xT-i subhead bold'>{&t}</span><ul class='xT-h'><li><table class='customtagtable'>", Layout(1) For j = 2 to Ubound(Layout) strTag = Layout(j) strCustomTagData = Util.IfElse(strTag <> "", oGlobal.selectSingleNode(strTag).text, "") If strCustomTagData <> "" Then strCustomTagDesc = oCustomTagDictionary.KeyValue(strTag) Report.WriteFormattedLn "<tr><td>{&t}</td><td>{&t}</td></tr>",strCustomTagDesc, strCustomTagData cchBufferStart = -1 ' indicate at least one value present in this Custom Tag Dialog Layout End If Next Report.WriteLn "</table></li></ul></li>" If cchBufferStart > 0 Then ' no Custom Tags set in this Dialog Layout Section so remove phrase or table Report.BufferLength = cchBufferStart Else cchBufferBegin = -1 ' indicate at least one custom tag set End If Next Report.WriteLn "</ul></li></ul></div>" If cchBufferBegin > 0 Then ' no Custom tags present so remove the Additional Information section Report.BufferLength = cchBufferBegin End If ]%>
|
This code is largely taken from the WriteAdditionalInformation subroutine in Util.htm. Alternatively with the above change to Init.htm you can of course access individual Global custom tags using | Set oGlobal = Session("Global") | and then use oGlobal.selectSingleNode("tagname").text for each required tag.
'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"
|
|
|
|
|
Customers Translator GenoPro version: 3.1.0.1
Last Login: Wednesday, June 25, 2025
Posts: 103,
Visits: 2,092
|
Try in table layout, from there you can export the content of your custom tags to excel...
|
|
|
|
|
Administrators Moderators Customers Gamma FamilyTrees.GenoPro.com Translator GenoPro version: 3.1.0.1
Last Login: Tuesday, October 28, 2025
Posts: 4,886,
Visits: 22,799
|
GenoPro does not have an interface to enumerate tags (custom tags and built-in tags). This is something we plan in the future.The English Narrative Report uses the XML fetch the custom tags. Ron is a very smart man.
Edited: Wednesday, December 20, 2006 by
GenoProSupport
|
|
|
|
|
Customers
Last Login: Friday, June 15, 2018
Posts: 28,
Visits: 231
|
I am using GenoPro 2.0.0, and I am attempting to print the contents of a global custom tag. I cannot find the object that has that tag as a property.
With individual tags, I am able to say i.X_NAMTAG to read the data, but document.X_TAGYEAR and ReportGenerator.document.X_TAGYEAR throw errors. Just saying X_TAGYEAR runs without errors, but it contains the empty string.
|