1

Re: Linking reports to survey_events

I have an XML report that returns a list of TOKs, Sample keys and survey event keys. I want to link to the relevant object in the object hierarchy by clicking on any key in the report.

It works for taxon_occurrence_key and sample_key but not for survey_event_key. I want to be able to select a survey event from the survey_event_key itself so that I can see all of its child samples.

Here's my code. When I click on a survey_event_key in the report, R6 falls over. Is it possible to link to survey events in this way?

<SQL>
        <Where keytype="Default">   
          SELECT  TAXON_OCCURRENCE.TAXON_OCCURRENCE_KEY,
              SAMPLE.SAMPLE_KEY, SURVEY_EVENT.SURVEY_EVENT_KEY
              FROM SAMPLE INNER JOIN SURVEY_EVENT ON 
              SAMPLE.SURVEY_EVENT_KEY = SURVEY_EVENT.SURVEY_EVENT_KEY 
              INNER JOIN TAXON_OCCURRENCE ON SAMPLE.SAMPLE_KEY =
             TAXON_OCCURRENCE.SAMPLE_KEY WHERE
                      
        <Condition field= "TAXON_OCCURRENCE.Taxon_Occurrence_key" operator="like" type="Text"  name="TOK"  />
        </Where>
</SQL>

<Columns>  
    <Column name="Taxon_Occurrence_Key" width="120" position="1" caption="TOK"  keycolumn="Taxon_Occurrence_Key" tablename="Taxon_Occurrence"/>
    <Column name="Sample_Key" width="120" position="2" caption="Sample Key"  keycolumn="Sample_Key" tablename="Sample"/>
    <Column name="Survey_Event_Key" width="120" position="3" caption="Survey Event Key"  keycolumn="Survey_Event_Key" tablename="Survey_Event"/>
</Columns>
Richard Burkmar
Biodiversity Project Officer
Field Studies Council

2

Re: Linking reports to survey_events

Probaby the tablename is wrong and shoud be  Event (not Survey_Event)

Alllowed  values for table name  are Survey,Event,Sample, Taxon_Occurrence, Biotope_Occurrence,Location ,Name, Location, Feature, Document, Taxon, Biotope and Admin 

Mike

Mike Weideli

3

Re: Linking reports to survey_events

I don't know what I'd do without you!

It works with 'event' instead of 'survey_event' - ta.

Rich

Richard Burkmar
Biodiversity Project Officer
Field Studies Council