Source: |
<%=Rptaxon("Refcache")%><%=ReferenceSuffixForIOPI%>
|
Name: |
<%=NameA(6)%> |
<% if len(NameA(2)) > 0 then %>
Nomencl. ref. |
<%=NameA(2)%> |
<%end if %>
<% if len(NameA(3)) > 0 then %>
Nomencl. status(es) |
<%=NameA(3)%> |
<%end if %>
<%
' Search if the name has HOMONYMS and print them
'------------------------------------------------------------------------------------------
SQL="SELECT NameFk1 FROM RelName WHERE NameFk2=" & Rptaxon("PTNameFk") &" AND RelNameQualifierFk=2"
set Rhom = Server.CreateObject("ADODB.Recordset")
Rhom.ActiveConnection = MM_jun_STRING
Rhom.Source = SQL
Rhom.CursorType = 3
Rhom.CursorLocation = 2
Rhom.LockType = 1
Rhom.Open()
if Rhom.Recordcount > 0 then
'If it has homonyms show them, take the details.
SQL="SELECT Name.NameId, Name.NameCache, Name.FullNameCache, Reference.RefYear FROM Name LEFT JOIN Reference ON Name.NomRefFk = Reference.RefId WHERE (Name.NameId = "& Rhom("NameFk1") &")"
set Rhom_details = Server.CreateObject("ADODB.Recordset")
Rhom_details.ActiveConnection = MM_jun_STRING
Rhom_details.Source = SQL
Rhom_details.CursorType = 3
Rhom_details.CursorLocation = 2
Rhom_details.LockType = 1
Rhom_details.Open()
While Not Rhom_details.EOF
non_part= Rhom_details("FullNameCache")
if Rhom_details("RefYear")<>"" then
non_part=non_part & " (" & Rhom_details("RefYear") & ")"
end if
%>
Homonyms |
<%=non_part%> |
<%
Rhom_details.MoveNext
wend
Rhom_details.close()
set Rhom_details = Nothing
End if
Rhom.close
set Rhom = Nothing
'---------------------------------------------------------------------------------------------
%>
Rank: |
<%=Rptaxon("Rank")%> |
<% ' status of the taxon ---------------------------------------------------------------------------%>
Status: |
<%if Rptaxon("StatusFk")=1 then%>
<%else%>
<%end if%>
<%
' If the DoubtfulFlag is set to d then show a PRELIMARY text in fron of the status
if Rptaxon("DoubtfulFlag")="d" then%>PRELIMINARY<% end if %>
<%=ucase(Rptaxon("Status"))%> |
<%
'Look to see if it's a basyonym of something and print it. BASYONYM OF
'------------------------------------------------------------------------------------------------------
SQL="SELECT dbo.Name.NameId, Name_1.NameId AS NameIdBas, Name_1.FullNameCache FROM dbo.Name Name_1 INNER JOIN Name INNER JOIN RelName ON Name.NameId = RelName.NameFk1 ON Name_1.NameId = RelName.NameFk2 WHERE (((Name.NameId)="&Rptaxon("PTNameFk")&") AND ((RelName.RelNameQualifierFk)=1))"
Set Rbas = Server.CreateObject("ADODB.Recordset")
Rbas.ActiveConnection = MM_jun_STRING
Rbas.Source = SQL
Rbas.CursorType = 3
Rbas.CursorLocation = 2
Rbas.LockType = 1
Rbas.Open()
if Rbas.RecordCount > 0 then
%>
Is basionym for: |
"><%=Rbas("FullNameCache")%> |
<%
end if
Rbas.close
set Rbas=Nothing
'-------------------------------------------------------------------------------------------------------
%>
<%' See where this taxon it's included. HERARCHY
'-------------------------------------------------------------------------------------------------------
'only check herarchy if the PTaxon is accepted, if not is not supossed to be linked to anything (integrity rule)
if Rptaxon("StatusFk")=1 then
'First we will store in an array all the herarchy in inverse order, then they will be shown. This array will
' be three dimensional, the first dimension will store the nameid, the second the refid and the tirth
' the namecache field. The very first is an index.
nameid=Rptaxon("PTNameFk")
refid=Rptaxon("PTRefFk")
ReDim herarchy(3,0)
control=1
cont=0
While control=1
SQL="SELECT PTaxon_1.PTNameFk, PTaxon_1.PTRefFk, Name.NameCache, Name.FullNameCache, Reference.RefCache, Name.Notes AS NameNotes, Rank.Rank"&_
" FROM (PTaxon AS PTaxon_1 INNER JOIN Name ON PTaxon_1.PTNameFk = Name.NameId) INNER JOIN (PTaxon INNER JOIN RelPTaxon ON (PTaxon.PTNameFk = RelPTaxon.PTNameFk1) AND (PTaxon.PTRefFk = RelPTaxon.PTRefFk1)) ON (PTaxon_1.PTNameFk = RelPTaxon.PTNameFk2) AND (PTaxon_1.PTRefFk = RelPTaxon.PTRefFk2) INNER JOIN Reference ON PTaxon_1.PTRefFk = Reference.RefId INNER JOIN Rank ON Name.RankFk = Rank.RankId"&_
" WHERE (((PTaxon.PTNameFk)="&nameid&") AND ((PTaxon.PTRefFk)="&refid&") AND ((RelPTaxon.RelQualifierFk)=1)) ORDER BY Name.NameCache"
Set Rherar = Server.CreateObject("ADODB.Recordset")
Rherar.ActiveConnection = MM_jun_STRING
Rherar.Source = SQL
Rherar.CursorType = 3
Rherar.CursorLocation = 2
Rherar.LockType = 1
Rherar.Open()
if Rherar.Recordcount > 0 then
nameid=Rherar("PTNameFk")
refid=Rherar("PTRefFk")
Redim Preserve herarchy(3,cont)
herarchy(0,cont)=nameid
herarchy(1,cont)=refid
'Show the reference as "sec." when the reference is different from the one using the potential taxon
if Rherar("PTRefFk")<> refid then
herarchy(2,cont)=""&Rherar("FullNameCache") & " sec. " & Rherar("RefCache")
else
herarchy(2,cont)=""&Rherar("FullNameCache") & ""
end if
herarchy(3,cont)=Rherar("Rank")
cont=cont+1
else
nameid=""
refid=""
control=0
end if
Rherar.close
set Rherar=Nothing
Wend
If herarchy(0,0)<>"" then
%>
Taxonomy (this taxon is included in): |
<%
col=0
for i=ubound(herarchy,2) to 0 step -1
%>
<%=herarchy(3,i)%> - <%=herarchy(2,i)%> <%for c=0 to col%> <%next%>
<%
col=col+1
next %>
|
<%
end if
Redim herarchy(0)
herarchy(0)=""
end if
'----------------------------------------------------------------------------------------------------------
%>
<%
'Look for incluided taxa only if the potential taxon is accepted. INCLUDED TAXA, HERARCHY DOWN
'-------------------------------------------------------------------------------------------------------------------
if Rptaxon("StatusFk")=1 then
SQL="SELECT PTaxon_1.PTNameFk, PTaxon_1.PTRefFk, Name.FullNameCache, Reference.RefCache, Reference.RefId AS RefId "&_
"FROM Reference INNER JOIN ((PTaxon AS PTaxon_1 INNER JOIN (PTaxon INNER JOIN RelPTaxon ON (PTaxon.PTNameFk = RelPTaxon.PTNameFk2) AND (PTaxon.PTRefFk = RelPTaxon.PTRefFk2)) ON (PTaxon_1.PTNameFk = RelPTaxon.PTNameFk1) AND (PTaxon_1.PTRefFk = RelPTaxon.PTRefFk1)) INNER JOIN Name ON PTaxon_1.PTNameFk = Name.NameId) ON Reference.RefId = PTaxon_1.PTRefFk "&_
"WHERE (((PTaxon.PTNameFk)="&Rptaxon("PTNameFk")&") AND ((PTaxon.PTRefFk)="&Rptaxon("PTRefFk")&") AND ((RelPTaxon.RelQualifierFk)=1)) AND (RelPTaxon.PTRefFk1=RelPTaxon.PTRefFk2) "&_
"ORDER BY Name.FullNameCache"
Set Rinclu = Server.CreateObject("ADODB.Recordset")
Rinclu.ActiveConnection = MM_jun_STRING
Rinclu.Source = SQL
Rinclu.CursorType = 3
Rinclu.CursorLocation = 2
Rinclu.LockType = 1
Rinclu.Open()
if Rinclu.Recordcount>0 then
contador=0
While NOT Rinclu.EOF
contador=contador+1
%>
<%if contador=1 then%> Included taxa:
<%end if%> |
&PTRefFk=<%=Rinclu("PTRefFk")%>"><%=Rinclu("FullNameCache")%><%if Rinclu("PTRefFk")<>Rptaxon("PTRefFk") then%> sec. <%=Rinclu("RefCache")%><%end if%> |
<%
Rinclu.Movenext
Wend
Rinclu.Close
set Rinclu=Nothing
end if
end if
'--------------------------------------------------------------------------------------------------------------------------
%>
<%
' If the taxon is a synonymum find the accepted name. ACCEPTED NAME
'---------------------------------------------------------------------------------------------------
if Rptaxon("StatusFk")=2 then
SQL="SELECT PTaxon_1.PTNameFk, PTaxon_1.PTRefFk, Name.NameCache, Name.FullNameCache, Name.Notes AS NameNotes"&_
" FROM (PTaxon AS PTaxon_1 INNER JOIN Name ON PTaxon_1.PTNameFk = Name.NameId) INNER JOIN (PTaxon INNER JOIN RelPTaxon ON (PTaxon.PTNameFk = RelPTaxon.PTNameFk1) AND (PTaxon.PTRefFk = RelPTaxon.PTRefFk1)) ON (PTaxon_1.PTNameFk = RelPTaxon.PTNameFk2) AND (PTaxon_1.PTRefFk = RelPTaxon.PTRefFk2)"&_
" WHERE (((PTaxon.PTNameFk)="&Rptaxon("PTNameFk")&") AND ((PTaxon.PTRefFk)="&Rptaxon("PTRefFk")&") AND (RelPTaxon.RelQualifierFk in (2,4,5,6,7))) ORDER BY Name.NameCache"
Set Racc = Server.CreateObject("ADODB.Recordset")
Racc.ActiveConnection = MM_jun_STRING
Racc.Source = SQL
Racc.CursorType = 3
Racc.CursorLocation = 2
Racc.LockType = 1
Racc.Open()
if Racc.Recordcount>0 then
contador=0
While NOT Racc.EOF
contador=contador+1
%>
<%if contador=1 then%>
Synonym of:
<%end if%> |
&PTRefFk=<%=Racc("PTRefFk")%>"><%=Racc("FullNameCache")%> |
<%
Racc.Movenext
Wend
Racc.Close
set Racc=Nothing
end if
end if
'---------------------------------------------------------------------------------------------------------------
%>
<%
'Look to see if it has a basyonym of something. BASYONYM
'-----------------------------------------------------------------------------------------------------------------
SQL="SELECT dbo.Name.NameId, Name_1.NameId AS NameIdBas, Name_1.FullNameCache FROM Name Name_1 INNER JOIN Name INNER JOIN RelName ON Name.NameId = RelName.NameFk2 ON Name_1.NameId = RelName.NameFk1 WHERE (((Name.NameId)="&Rptaxon("PTNameFk")&") AND ((RelName.RelNameQualifierFk)=1))"
Set Rbas = Server.CreateObject("ADODB.Recordset")
Rbas.ActiveConnection = MM_jun_STRING
Rbas.Source = SQL
Rbas.CursorType = 3
Rbas.CursorLocation = 2
Rbas.LockType = 1
Rbas.Open()
if Rbas.RecordCount > 0 then
%>
Basionym: |
<%=Rbas("FullNameCache")%> |
<%
end if
Rbas.close
set Rbas=Nothing
'----------------------------------------------------------------------------------------------------------------
%>
<%
'Look for synonyms only if the potential taxon is accepted. SYNONYMS
'----------------------------------------------------------------------------------------------------------------
if Rptaxon("StatusFk")=1 then
SQL="SELECT PTaxon_1.PTNameFk, PTaxon_1.PTRefFk AS PTRefFk_s, Name.NameCache, Name.FullNameCache, Name.Notes AS NameNotes, PTaxon.PTRefFk AS PTRefFk, RelPTQualifier.RelPTQualifier"&_
" FROM (PTaxon AS PTaxon_1 INNER JOIN (PTaxon INNER JOIN RelPTaxon ON (PTaxon.PTNameFk = RelPTaxon.PTNameFk2) AND (PTaxon.PTRefFk = RelPTaxon.PTRefFk2)) ON (PTaxon_1.PTNameFk = RelPTaxon.PTNameFk1) AND (PTaxon_1.PTRefFk = RelPTaxon.PTRefFk1)) INNER JOIN Name ON PTaxon_1.PTNameFk = Name.NameId INNER JOIN RelPTQualifier ON RelPTaxon.RelQualifierFk = RelPTQualifier.RelPTQualifierId "&_
" WHERE (((PTaxon.PTNameFk)="&Rptaxon("PTNameFk")&") AND ((PTaxon.PTRefFk)="&Rptaxon("PTRefFk")&") AND ((RelPTaxon.RelQualifierFk) in (2,4,5,6,7))) ORDER BY RelPTQualifier.RelPTQualifier DESC,Name.RankFk, Name.NameCache"
Set Rsyn = Server.CreateObject("ADODB.Recordset")
Rsyn.ActiveConnection = MM_jun_STRING
Rsyn.Source = SQL
Rsyn.CursorType = 3
Rsyn.CursorLocation = 2
Rsyn.LockType = 1
Rsyn.Open()
if Rsyn.Recordcount>0 then
contador=0
syn_rel=""
While NOT Rsyn.EOF
contador=contador+1
%>
<%if contador=1 or syn_rel<>Rsyn("RelPTQualifier") then%>
<%=ucase(left(Trim(Replace(Replace(Rsyn("RelPTQualifier"),"is",""),"of","")),1))&right(Trim(Replace(Replace(Rsyn("RelPTQualifier"),"is",""),"of","")),len(Trim(Replace(Replace(Rsyn("RelPTQualifier"),"is",""),"of","")))-1)&"(s):"%>
<%end if%>
|
&PTRefFk=<%=Rsyn("PTRefFk_s")%>"><%=Rsyn("FullNameCache")%> |
<%
syn_rel=Rsyn("RelPTQualifier")
Rsyn.Movenext
Wend
Rsyn.Close
set Rsyn=Nothing
end if
end if
'-------------------------------------------------------------------------------------------------------------------
%>
<%
'Look for concept synonyms only if the potential taxon is accepted CONCEPT SYNONYMS
if Rptaxon("StatusFk")=1 then
SQL="SELECT RelQualifierFk, NameId, Reference.RefId, NameCache, FullNameCache, Name.Notes AS NameNotes, RelPTQualifier AS RelQualifier, RelPTaxon.Notes AS RelNotes, Reference.RefCache, RelRefFk, is_congruent, is_included_in, includes, overlaps, excludes, doubtful, Reference_1.RefCache AS RelRefCache, RankFk "&_
"FROM RelPTQualifier INNER JOIN "&_
" RelPTaxon ON RelPTQualifier.RelPTQualifierId = RelPTaxon.RelQualifierFk INNER JOIN "&_
" Name ON RelPTaxon.PTNameFk2 = Name.NameId INNER JOIN "&_
" Reference ON RelPTaxon.PTRefFk2 = Reference.RefId INNER JOIN "&_
" Reference Reference_1 ON RelPTaxon.RelRefFk = Reference_1.RefId "&_
"WHERE (RelPTaxon.RelQualifierFk > 9) AND (RelPTaxon.PTRefFk1 = "&Rptaxon("PTRefFk")&") AND (RelPTaxon.PTNameFk1 = "&Rptaxon("PTNameFk")&") "&_
"union "&_
"SELECT RelQualifierFk, NameId, Reference.RefId, NameCache, FullNameCache, Name.Notes AS NameNotes, RelPTQualifier AS RelQualifier, RelPTaxon.Notes AS RelNotes, Reference.RefCache, RelRefFk, is_congruent, is_included_in, includes, overlaps, excludes, doubtful, Reference_1.RefCache AS RelRefCache, RankFk "&_
"FROM RelPTQualifier INNER JOIN "&_
" RelPTaxon ON RelPTQualifier.RelPTQualifierId = dbo.f_core_Reverse(RelPTaxon.RelQualifierFk) INNER JOIN "&_
" Name ON RelPTaxon.PTNameFk1 = Name.NameId INNER JOIN "&_
" Reference ON RelPTaxon.PTRefFk1 = Reference.RefId INNER JOIN "&_
" Reference Reference_1 ON RelPTaxon.RelRefFk = Reference_1.RefId "&_
"WHERE (RelPTaxon.RelQualifierFk > 9) AND (RelPTaxon.PTRefFk2 = "&Rptaxon("PTRefFk")&") AND (RelPTaxon.PTNameFk2 = "&Rptaxon("PTNameFk")&") "&_
"order by RelQualifierFk, RelRefFk, RankFk, namecache"
Set Rcsyn = Server.CreateObject("ADODB.Recordset")
Rcsyn.ActiveConnection = MM_jun_STRING
Rcsyn.Source = SQL
Rcsyn.CursorType = 3
Rcsyn.CursorLocation = 2
Rcsyn.LockType = 1
Rcsyn.Open()
if Rcsyn.Recordcount>0 then
%>
Concept Synonym(s):
|
|
<%
contador=0
ult_ref=""
While NOT Rcsyn.EOF
contador=contador+1
%>
<%if Rcsyn("RelRefCache")<>ult_ref then%>
|
According to: <%=Rcsyn("RelRefCache")%> |
<%end if%>
|
<%
'Construct a string concatenating the images that are needed to represent the concept relation
concept_images=""
if Rcsyn("is_congruent")<>0 then concept_images=""
if Rcsyn("is_included_in")<>0 then
if concept_images<>"" then
concept_images=concept_images&","
else
concept_images=""
end if
end if
if Rcsyn("includes")<>0 then
if concept_images<>"" then
concept_images=concept_images&","
else
concept_images=""
end if
end if
if Rcsyn("overlaps")<>0 then
if concept_images<>"" then
concept_images=concept_images&","
else
concept_images=""
end if
end if
if Rcsyn("excludes")<>0 then
if concept_images<>"" then
concept_images=concept_images&","
else
concept_images=""
end if
end if
concept_images="{"&concept_images&"}"
if Rcsyn("doubtful")<>0 then concept_images="?"&concept_images
%>
<%=concept_images%> &PTRefFk=<%=Rcsyn("RefId")%>"><%=Rcsyn("FullNameCache")%> sec. <%=Rcsyn("RefCache")%> <%=Rcsyn("RelNotes")%> |
<%
Rcsyn.Movenext
if NOT Rcsyn.EOF then
ult_ref=Rcsyn("RelRefCache")
end if
Wend
Rcsyn.Close
set Rcsyn=Nothing
end if
end if
'------------------------------------------------------------------------------------------------------------------
%>
<%
'Look for missaplied names only if the potential taxon is accepted MISSAPLIED NAMES
if Rptaxon("StatusFk")=1 then
SQL="SELECT PTaxon_1.PTNameFk, PTaxon_1.PTRefFk AS PTRefFk_s, Name.NameCache, Name.FullNameCache, Name.Notes AS NameNotes, PTaxon.PTRefFk AS PTRefFk, RelPTQualifier.RelPTQualifier as RelQualifier, RelPTaxon.Notes as RelNotes, Reference.RefCache"&_
" FROM (PTaxon AS PTaxon_1 INNER JOIN (PTaxon INNER JOIN RelPTaxon ON (PTaxon.PTNameFk = RelPTaxon.PTNameFk2) AND (PTaxon.PTRefFk = RelPTaxon.PTRefFk2)) ON (PTaxon_1.PTNameFk = RelPTaxon.PTNameFk1) AND (PTaxon_1.PTRefFk = RelPTaxon.PTRefFk1)) INNER JOIN Name ON PTaxon_1.PTNameFk = Name.NameId INNER JOIN RelPTQualifier ON RelPTaxon.RelQualifierFk = RelPTQualifier.RelPTQualifierId INNER JOIN Reference ON PTaxon_1.PTRefFk = Reference.RefId"&_
" WHERE (((PTaxon.PTNameFk)="&Rptaxon("PTNameFk")&") AND ((PTaxon.PTRefFk)="&Rptaxon("PTRefFk")&") AND ((RelPTaxon.RelQualifierFk)=3)) ORDER BY Name.NameCache"
Set Rmiss = Server.CreateObject("ADODB.Recordset")
Rmiss.ActiveConnection = MM_jun_STRING
Rmiss.Source = SQL
Rmiss.CursorType = 3
Rmiss.CursorLocation = 2
Rmiss.LockType = 1
Rmiss.Open()
if Rmiss.Recordcount>0 then
contador=0
While NOT Rmiss.EOF
contador=contador+1
%>
<%if contador=1 then%>
Missaplied Name(s):
<%end if%>
|
&PTRefFk=<%=Rmiss("PTRefFk_s")%>"><%=Rmiss("FullNameCache")%> sec. <%=Rmiss("RefCache")%> [<%=Rmiss("RelQualifier")%>] <%=Rmiss("RelNotes")%> |
<%
Rmiss.Movenext
Wend
Rmiss.Close
set Rmiss=Nothing
end if
end if
'------------------------------------------------------------------------------------------------------------------
%>
<%
'There are two type of notes here, the one from the potential taxon and the one from the name. Show them if there´s something inside
'---------------------------------------------------------------------
if NameA(7)<>"" then %>
Name Notes: |
<%=NameA(7)%> |
<%end if%>
<% if Rptaxon("Notes")<>"" then %>
Taxon Notes: |
<%=Rptaxon("Notes")%> |
<%end if%>
|
|
<% 'Select all the facts and present them FACTS
'------------------------------------------------------------------------------------------------------------------------
'We need to see if the column "Visible" is in the FactCategory Table to use it or not.
'if it is no present then all factcategories will be shown.
SQL="SELECT sysobjects.name AS Exp1 FROM sysobjects INNER JOIN syscolumns ON sysobjects.id = syscolumns.id WHERE (sysobjects.name LIKE 'FactCategory') AND (syscolumns.name LIKE N'Visible')"
Set RVisibleCol = Server.CreateObject("ADODB.Recordset")
RVisibleCol.ActiveConnection = MM_jun_STRING
RVisibleCol.Source = SQL
RVisibleCol.CursorType = 3
RVisibleCol.CursorLocation = 2
RVisibleCol.LockType = 1
RVisibleCol.Open()
if RVisibleCol.RecordCount > 0 then
VisibleColExist= True
else
VisibleColExist= False
end if
RVisibleCol.close
set RVisibleCol=Nothing
'I create a different SQL depending if the Visible column exist or not in the database
if VisibleColExist= True then
SQL="SELECT PTaxon.PTNameFk, PTaxon.PTRefFk, FactCategory.FactCategory, FactCategory.FactCategoryId , FactCategory.Visible, Fact.Fact, FactCategory.MaxFactNumber FROM (PTaxon INNER JOIN Fact ON (PTaxon.PTRefFk = Fact.PTRefFk) AND (PTaxon.PTNameFk = Fact.PTNameFk)) INNER JOIN FactCategory ON Fact.FactCategoryFk = FactCategory.FactCategoryId WHERE (((PTaxon.PTNameFk)="&Rptaxon("PTNameFk")&") AND ((PTaxon.PTRefFk)="&Rptaxon("PTRefFk")&")) ORDER BY FactCategory.FactCategory"
Else
SQL="SELECT PTaxon.PTNameFk, PTaxon.PTRefFk, FactCategory.FactCategory, FactCategory.FactCategoryId , Fact.Fact, FactCategory.MaxFactNumber FROM (PTaxon INNER JOIN Fact ON (PTaxon.PTRefFk = Fact.PTRefFk) AND (PTaxon.PTNameFk = Fact.PTNameFk)) INNER JOIN FactCategory ON Fact.FactCategoryFk = FactCategory.FactCategoryId WHERE (((PTaxon.PTNameFk)="&Rptaxon("PTNameFk")&") AND ((PTaxon.PTRefFk)="&Rptaxon("PTRefFk")&")) ORDER BY FactCategory.FactCategory"
End if
Set Rfacts = Server.CreateObject("ADODB.Recordset")
Rfacts.ActiveConnection = MM_jun_STRING
Rfacts.Source = SQL
Rfacts.CursorType = 3
Rfacts.CursorLocation = 2
Rfacts.LockType = 1
Rfacts.Open()
if Rfacts.RecordCount > 0 then
'--------------------------------------------------------
' Just for debugging
'While not Rfacts.eof
' Response.Write("" & Rfacts("FactCategory")&": "&Rfacts("Fact")&", " & Rfacts("MaxFactNumber") &" ")
' Rfacts.Movenext
'wend
Rfacts.Requery
'--------------------------------------------------------
'To concatenate the facts by category first all of them are included in an array
Redim facts(1,0)
control=0
'I will use a different code depending if the Visible column exist or not, using the VisibleColExist= True
While not Rfacts.eof
if VisibleColExist= True then
if control> 0 then
'Only add the fact to the array if it can be output (MaxFactNumber<>0)
if Rfacts("Visible")=True then
if facts(0,control-1)=Rfacts("FactCategory") then
facts(1,control-1)=facts(1,control-1) & ", " & Rfacts("Fact")
else
Redim preserve facts(1,control)
facts(0,control)=Rfacts("FactCategory")
facts(1,control)=Rfacts("Fact")
control=control+1
end if
end if
else
if Rfacts("Visible")=True then
facts(0,0)=Rfacts("FactCategory")
facts(1,0)=Rfacts("Fact")
control=1
else
control=0
end if
end if
Else
if control> 0 then
if facts(0,control-1)=Rfacts("FactCategory") then
facts(1,control-1)=facts(1,control-1) & ", " & Rfacts("Fact")
else
Redim preserve facts(1,control)
facts(0,control)=Rfacts("FactCategory")
facts(1,control)=Rfacts("Fact")
control=control+1
end if
else
facts(0,0)=Rfacts("FactCategory")
facts(1,0)=Rfacts("Fact")
control=1
end if
End if
Rfacts.MoveNext
Wend
Rfacts.close
set Rfacts=Nothing
%>
<% for i=0 to ubound(facts,2) %>
<%=facts(0,i)%>: |
<%=facts(1,i)%> |
<%
next
end if
'-----------------------------------------------------------------------------------------------------------------------
%>
|