|
|
|
Junior Member
      
Group: Forum Members
Last Login: 8/4/2008 10:30:00 PM
Posts: 12,
Visits: 81
|
|
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.
|
|
|
|
|
Legendary Master
       
Group: Administrators
Last Login: Today @ 9:31:29 AM
GenoPro Version: 2.0.1.6
Posts: 3,517,
Visits: 14,852
|
|
| 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.
|
|
|
|
|
Forum Guru
      
Group: Customers
Last Login: Yesterday @ 11:03:48 AM
GenoPro Version: 2.0.1.6
Posts: 107,
Visits: 1,895
|
|
| Try in table layout, from there you can export the content of your custom tags to excel...
|
|
|
|
|
Grand Master
      
Group: Customers
Last Login: Today @ 10:20:31 AM
GenoPro Version: 2.0.1.6
Posts: 1,145,
Visits: 5,355
|
|
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"
|
|
|
|
|
Junior Member
      
Group: Forum Members
Last Login: 8/4/2008 10:30:00 PM
Posts: 12,
Visits: 81
|
|
| That works, Ron, thanks. Maybe this should be added to the documentation.
|
|
|
|