0
Need Help Here
Hi Fred
Need help here, need to display the data in DatosCSVText, the botton work in 'Archivo CSV' but need display the data in DatosCSVText
Thanks.
let xResponse := dialog(" General Archivo CSV ", " Esta impresion solo se ejecuta desde la Web ?", ["SI", "CANCELA"]);
if xResponse = "SI" then
'Archivo CSV' := null;
DatosCSVText := " ";
let xMd := 'Busqueda por Mes';
let csvHeader := "Codigo Documento,'Nombre Documento','Disciplina',Monto,Rev 0";
let dataArray := for a in (select 'Datos Transferidos' where month('Rev 0') = xMd) order by 'Rev 0' do
a.CodigoDoc + "," + a.Documento_dt + "," + a.Disciplina_dt + "," + a.number(Monto) +
"," +
a.date('Rev 0')
end;
let csvBody := join(dataArray, "
");
let finalCSV := csvHeader +
"
" +
csvBody;
'Archivo CSV' := createTextFile(this, finalCSV, "ArchivoCSV.csv");
" Retrieve the email address of the recipient from the 'Datos Empresa' table ";
let destinatario := first(select 'Datos Empresa').Email;
" Send an email with the CSV file attached ";
let destinatario := first(select 'Datos Empresa').Email;
sendEmail({
from: userEmail(),
to: destinatario,
subject: "Datos Transferidos en formato CSV",
text: "Adjunto se encuentra el archivo de datos transferidos.",
html: "<h1>Datos Transferidos</h1>",
attachments: 'Archivo CSV'
})
end
2 replies
-
i created a new button and put this in the code:
let xMd := 'Busqueda por Mes'; let csvHeader := "Codigo Documento,'Nombre Documento','Disciplina',Monto,Rev 0"; let dataArray := for a in (select 'Datos Transferidos' where month('Rev 0') = xMd) order by 'Rev 0' do a.CodigoDoc + "," + a.Documento_dt + "," + a.Disciplina_dt + "," + a.number(Monto) + "," + a.date('Rev 0') end; let csvBody := join(dataArray, " "); let finalCSV := csvHeader + " " + csvBody; DatosCSVText := finalCSV
and got:
You can add line 14 to your code after line 17.
-
Work Thanks Fred.
Content aside
- Status Answered
- 1 mth agoLast active
- 2Replies
- 35Views
-
2
Following