Title : Browser SQL Code
Toolbars
call CloseForm(True)
call CloseForm(False)
Buttons
Fields
Code (AU_FORM_BR_SQL.ACODE)
Title (AU_FORM_BR_SQL.FTITLE)
Applied Filters (AU_FORM_BR_SQL.FCODE)
System (AU_FORM_BR_SQL.SYSTEM_FLAG)
Published (AU_FORM_BR_SQL.PUBLISH_FLAG)
Title (AU_FORM_BR_SQL.FRMNAME)
Default (AU_FORM_BR_SQL.DEFAULT_FLAG)
AutoScript
lib
proc Form_Start()
pivot_flag = False
f = TopForm()
task = FormTask(f)
fp = FindComponent(_app,"PivotCubeForm")
if (fp > 0) then
pivot_flag = True
call OnOpenForm_HideField("FCODE")
else
fp = PreviousForm()
endif
if (task = ptAppend) then
call get_sql()
endif
end
proc get_sql()
f = TopForm()
fp = PreviousForm(f)
p = PByName(f,"AU_FORM_BR_SQL")
t = TByName(p,"AU_FORM_BR_SQL")
sql = get_form_sql(fp)
nl = Escape(13,10,-1)
text = TGetFld(t,"FCODE")
text = strcat(text,nl,nl,sql)
call TEdit(t)
call TSetFld(t,"FCODE",text)
call TPost(t)
call ReLoadEditFields(f)
end