Topic: A reporting problem
I thought I had transferred successfully to a new W11 machine – until I tried to run a report I have been using without trouble for years. The script was copied over from the old W10 machine. It works fine on the old, but an omission was immediately obvious when I tried on the new one. It was the field Sample Altitude (None).
I have spent hours trying to find why, without success. Creating reports sequentially in the wizard has established that all the 12 required fields can be added, displayed correctly in the wizard, and exported to Excel, and saved as .wzd. However, when I run the saved report the Sample Altitude (None) field is not included. The problem seems specific to that field, as a report including the other two altitude fields (Min and Max) only loses that one. I have failed to find any relevant advice in Settings or the Help pages.
My R6 is 6.30.1.291. The code that works correctly on the old machine follows. The altitude field is included as
<Attribute visible="True" type="Measurement" key="NBNSYS0000000003" position="5" context="SAMPLE_DATA"/>
<?xml version="1.0"?>
<Report><SQL>SELECT Distinct Taxon_Occurrence.Taxon_Occurrence_Key AS Occurrence_Key, 'T' AS Type
FROM ((Taxon_Occurrence LEFT JOIN Sample ON Taxon_Occurrence.sample_Key = Sample.Sample_Key )
LEFT JOIN Survey_Event ON Survey_Event.Survey_Event_Key = Sample.Survey_Event_Key )
LEFT JOIN Survey ON Survey.Survey_Key = Survey_Event.Survey_Key
WHERE Survey.Survey_Key NOT IN (SELECT Survey_Key FROM User_Survey_Restriction USR WHERE USR.Name_Key = 'CI0001660000016Y') AND ((Survey.Survey_Key IN ('CI0001660000003Z')))</SQL>
<additional_filters>
<confidential state="0"/><unchecked state="0"/><invalid state="0"/><zero_abundance state="0"/>
</additional_filters>
<Attributes>
<Attribute visible="True" type="Standard" key="JNCCDEV100000004" position="11"/>
<Attribute visible="True" type="Standard" key="JNCCDEV100000014" position="6"/>
<Attribute visible="True" type="Measurement" key="NBNSYS0000000003" position="5" context="SAMPLE_DATA"/>
<Attribute visible="True" type="Standard" key="NBNSYS0000000019" position="2"/>
<Attribute visible="True" type="Standard" key="NBNSYS0000000024" position="3"/>
<Attribute visible="True" type="Standard" key="NBNSYS0000000027" position="4"/>
<Attribute visible="True" type="Standard" key="NBNSYS0000000049" position="8"/>
<Attribute visible="True" type="Standard" key="NBNSYS0000000053" position="7"/>
<Attribute visible="True" type="Standard" key="NBNSYS0000000063" position="9"/>
<Attribute visible="True" type="Standard" key="NBNSYS0000000064" position="10"/>
<Attribute visible="True" type="Standard" key="SRA0000400000026" position="0"/>
<Attribute visible="True" type="Standard" key="SRA0000400000029" position="1"/>
</Attributes></Report>
Any advice on solving this will be gratefully received.
Murdo