OK, I seemed to have figured it out.
In my Master table, I joined with the same table 3 times, pulling out 3 seperate fields of information so that I could display it on the _list.asp page. Apparently, this caused some kind of problem in _masterprint.asp.
The piece of offending code:
[codebox]'// IT Effort -
value=""
if len(rsm("IT Effort"))>0 then
strdata = make_db_value("IT Effort",rsm("IT Effort"),"","")
LookupSQL="SELECT "
LookupSQL=LookupSQL & "[AttributeValue]"
LookupSQL=LookupSQL & " FROM [dbo].[ProjectAttribute] WHERE [AttributeValue] = " & strdata
LookupSQL=LookupSQL & " and (" & "AttributeID = '1004'" & ")"
LogInfo(LookupSQL)
response.write(strdata)
rss.open LookupSQL,dbConnection
if not rss.eof then
value=ProcessLargeText(rss(0),"","",MODE_PRINT)
else
value=ProcessLargeText(GetData(rsm,"IT Effort", ""),"field=IT+Effort" & keylink,"",MODE_PRINT)
end if
end if
rss.close
smarty.Add "showmaster_IT_Effort",value
'// Project Sponser -
value=""
if len(rsm("Project Sponser"))>0 then
strdata = make_db_value("Project Sponser",rsm("Project Sponser"),"","")
LookupSQL="SELECT "
LookupSQL=LookupSQL & "[AttributeValue]"
LookupSQL=LookupSQL & " FROM [dbo].[ProjectAttribute] WHERE [AttributeValue] = " & strdata
LookupSQL=LookupSQL & " and (" & "AttributeID = '1001'" & ")"
LogInfo(LookupSQL)
rss.open LookupSQL,dbConnection
if not rss.eof then
value=ProcessLargeText(rss(0),"","",MODE_PRINT)
else
value=ProcessLargeText(GetData(rsm,"Project Sponser", ""),"field=Project+Sponser" & keylink,"",MODE_PRINT)
end if
end if
rss.close
smarty.Add "showmaster_Project_Sponser",value
[/codebox]
I compared this with the _print.asp page of the master table (which worked just fine, I figured the detail page should work too) and found that there was a slight difference between when rss is closed. I replaced:
[codebox] end if
end if
rss.close[/codebox]
with:
[codebox] rss.close
else
value=""
end if[/codebox]
Is it possible to get this fix added to the next build? I don't want to keep having to change it manually :P