Hi All,
In version 11, see "Front" picture below, basically you choose PDF, XLS or Word click submit then a message box will pop up asking you to open and save.
I am trying to do that in version 12 but for XLS and Word it is giving an error message (the PDF print option works fine by loading a pdf with data in it).
I have inserted functions to catch the error, see error picture.
It works fine in V11 but not in V12, see code used below to save a report file.
Front:
1.png
Error:
2.png
Sorry this question is for the Mobile & Browser Applications forum.
In version 11, see "Front" picture below, basically you choose PDF, XLS or Word click submit then a message box will pop up asking you to open and save.
I am trying to do that in version 12 but for XLS and Word it is giving an error message (the PDF print option works fine by loading a pdf with data in it).
I have inserted functions to catch the error, see error picture.
It works fine in V11 but not in V12, see code used below to save a report file.
Front:
1.png
Error:
2.png
Code:
if e.dataSubmitted.ReportType="0" 'PDF filename = a5w_report_saveAs(reportname,"pdf","","",filename,global_variables(),"",null_value(),null_value()) if file.exists(filename) session.SaveDataAsFile(filetitle+".pdf",file.to_blob(filename)) e.url = session.FormatFileDataURL(filetitle+".pdf") + "?" + time("hms3") end if end if if e.dataSubmitted.ReportType="1" 'EXCEL filename = a5w_report_saveAs(reportname,"xls","","",filename,global_variables(),"",null_value(),null_value()) if file.exists(filename) session.SaveDataAsFile(filetitle+".xls",file.to_blob(filename)) e.url = session.FormatFileDataURL(filetitle+".xls") + "?" + time("hms3") end if end if if e.dataSubmitted.ReportType="2" 'WORD filename = a5w_report_saveAs(reportname,"rtf","","",filename,global_variables(),"",null_value(),null_value()) if file.exists(filename) session.SaveDataAsFile(filetitle+".rtf",file.to_blob(filename)) e.url = session.FormatFileDataURL(filetitle+".rtf") + "?" + time("hms3") end if end if
Comment