Currently having problems with following script, which joins records from two tables ("egll_needs" and "logging") and produces a report.
when I run it from right-click menu on the "egll_needs" browse it works perfectly, when I run it as a stand-a-lone script it works perfectly, but when I run the same script from the right-click menu on the "logging" browse it fails with following error:
Any suggestions as to the work-around?
when I run it from right-click menu on the "egll_needs" browse it works perfectly, when I run it as a stand-a-lone script it works perfectly, but when I run the same script from the right-click menu on the "logging" browse it fails with following error:
variable join.m_field3 references a non-existant table logging->reg
Code:
'Date Created: 22-Apr-2014 08:53:24 AM 'Last Updated: 11-May-2014 01:17:42 PM 'Created By : Graham 'Updated By : Graham on error goto error_routine t1 = table.open("logging") join.t_db = "c:\my databases\aviation\data\egll_needs.dbf" join.o_file = "c:\my databases\aviation\data\egll_needs_temp1.dbf" join.m_key = "ICAO_CODE-ICAOTYPECODE" join.t_key = "ICAO_CODE-ICAOTYPECODE" join.m_filter = "isblank(\"as\").AND.isnotblank(\"icao_code\").and.isnotblank(\"icaotypecode\").AND.(status=\"C\".or.status=\"OO\")" join.t_filter = "isnotblank(\"icao_code\").and.isnotblank(\"icaotypecode\")" join.m_count = 6 join.delete_o_dd = .T. join.m_field1 = "@egll_needs->Icao_Code" join.m_field2 = "@egll_needs->Icaotypecode" [COLOR=#0000cd]join.m_field3 = "Logging->Reg"[/COLOR] join.m_field4 = "Logging->Ac_Unique" join.m_field5 = "logging->OP_UNIQUE" join.m_field6 = "logging->STATUS" t1.join() t1.close() t2 = table.open("egll_needs_temp1") t2.delete_range("isblank(\"Icao_Code\").AND.isblank(\"Icaotypecode\")") t2.close() :Report.Preview("egll_needs_list") end error_routine: err_msg = error_text_get(error_code_get()) script = error_script_get() line = error_line_number_get() ui_msg_box("Error",err_msg+" error occured at line "+alltrim(str(line,4,0))+" in Script "+alltrim(script)) end
Comment