Tomado del Foro de genexus:
Al utilizar FCKEditor.
Procedure con main protocol Http
&HttpResp, es de tipo HttpResponse
&HttpResp.AddHeader('Content-type', 'text/html; charset=charset=ISO-8859-1')
&HttpResp.AddHeader('Content-Disposition', 'attachment;filename='+ 'Contrato_' + trim(&Nro.ToString()) + '.doc')
&HttpResp.AddHeader('Content-type', 'application/vnd.text')
&HttpResp.AddString('<HTML>')
&HttpResp.AddString('<HEAD>')
&HttpResp.AddString('<META content="text/html; charset=utf-8" http-equiv="Content-Type" />')
&HttpResp.AddString('<STYLE />')
&HttpResp.AddString('</HEAD>')
&HttpResp.AddString('<BODY>')
&Celda='<TABLE>'
do 'Next'
&Celda = &Datos // datos guardados con FCKEditor
do 'Next'
&Celda='</TABLE>'
do 'Next'
&HttpResp.AddString('</BODY>')
&HttpResp.AddString('</HTML>')
Sub 'Next'
&HttpResp.AddString(&Celda)
EndSub
&HttpResp, es de tipo HttpResponse
&HttpResp.AddHeader('Content-type', 'text/html; charset=charset=ISO-8859-1')
&HttpResp.AddHeader('Content-Disposition', 'attachment;filename='+ 'Contrato_' + trim(&Nro.ToString()) + '.doc')
&HttpResp.AddHeader('Content-type', 'application/vnd.text')
&HttpResp.AddString('<HTML>')
&HttpResp.AddString('<HEAD>')
&HttpResp.AddString('<META content="text/html; charset=utf-8" http-equiv="Content-Type" />')
&HttpResp.AddString('<STYLE />')
&HttpResp.AddString('</HEAD>')
&HttpResp.AddString('<BODY>')
&Celda='<TABLE>'
do 'Next'
&Celda = &Datos // datos guardados con FCKEditor
do 'Next'
&Celda='</TABLE>'
do 'Next'
&HttpResp.AddString('</BODY>')
&HttpResp.AddString('</HTML>')
Sub 'Next'
&HttpResp.AddString(&Celda)
EndSub
No hay comentarios:
Publicar un comentario