Problems using "order by" in a complex report
I'm doing a complex report that selects the dtree name for an item, but also lists various category attribute values, and I cannot get the sort function to work on dtree.name - in fact I can't make out exactly what the "order by" is doing with the names.Here's the SQL:SELECT distinct %3, dtree.name, a1.valstr "Tier Level",a3.valstr "Process Domain",a4.valstr "Region or Scope",a5.valstr "Country or Location",a6.valstr "Status",a7.valstr "Year of latest test"FROM DTree dtree, LLAttrData a1,LLAttrData a3,LLAttrData a4,LLAttrData a5,LLAttrData a6,LLAttrData a7WHERE dtree.DataID = a1.ID and dtree.VersionNum = a1.VerNum and a1.EntryNum = 1 and a1.DefID = 4126208and a1.AttrID = 3and upper(a1.ValStr) like '%%'||upper(ltrim(rtrim(%1,' '),' '))||'%%'and dtree.DataID = a3.ID and dtree.VersionNum = a3.VerNum and a3.EntryNum = 1 and a3.DefID = 2588379 and a3.AttrID=2and dtree.DataID = a4.ID and dtree.VersionNum = a4.VerNum and a4.EntryNum = 1 and a4.DefID = 2588379 and a4.AttrID = 5and dtree.DataID = a5.ID and dtree.VersionNum = a5.VerNum and a5.EntryNum = 1 and a5.DefID = 2588379 and a5.AttrID = 6 and dtree.DataID = a6.ID and dtree.VersionNum = a6.VerNum and a6.EntryNum = 1 and a6.DefID = 2588379 and a6.AttrID = 10and dtree.DataID = a7.ID and dtree.VersionNum = a7.VerNum and a7.EntryNum = 1 and a7.DefID = 4126208and a7.AttrID = 10order by dtree.name ascwhere %1 is the tier level, and %3 is the report fields shown below (and %2 is permissions). This is a LiveReport where the columns are: a1.valstr "Tier Level","Process Domain", "Region or Scope", "Country or Location", "Status","Year of latest test"I already have a ticket in on this one (Livelink v9.0 May 2002 patch) because aliases don't show an icon and URLs are missing the actual href values (though the name link is a URL it doesn't work).But getting back to the problem itself - the "order by" clause does not actually seem to be sorting the results.Any ideas?Thanks,Allen Brown