Re: Is anyone using �report.saveas()" in a web application?
Tom, I think you are right and that notice was written without considering that someone would be launching a report using report.saveas() or the new a5w_report_saveas(). It is of course true that an Alias is not need to find the DATA for an SQL app. You do appear to either need an Alias or hard-code the path to the ALB file when using those functions.
But I'd like to point out that for an SQL application, the ALB and associated files are NOT in the "data" folder, commonly using "[PathAlias.ADB_Path]". The ALB is in fact published to the webroot, not anywhere else, unless YOU manually move them somewhere else. Maybe this is incorrect if Active Link tables are used, not sure.
If you move them to the data folder, then the old [PathAlias.ADB_Path] would make perfect sense. By the way, I always include that Alias in all of my SQL applications because I use it to store stuff out of the webroot.
If you do allow Publishing to place the ALB and other files where it wants to, in the webroot, then the following scripts will save PDF to the designated folder. I hard coded the path folder below, but you could use an Alias:
Tom, I think you are right and that notice was written without considering that someone would be launching a report using report.saveas() or the new a5w_report_saveas(). It is of course true that an Alias is not need to find the DATA for an SQL app. You do appear to either need an Alias or hard-code the path to the ALB file when using those functions.
But I'd like to point out that for an SQL application, the ALB and associated files are NOT in the "data" folder, commonly using "[PathAlias.ADB_Path]". The ALB is in fact published to the webroot, not anywhere else, unless YOU manually move them somewhere else. Maybe this is incorrect if Active Link tables are used, not sure.
If you move them to the data folder, then the old [PathAlias.ADB_Path] would make perfect sense. By the way, I always include that Alias in all of my SQL applications because I use it to store stuff out of the webroot.
If you do allow Publishing to place the ALB and other files where it wants to, in the webroot, then the following scripts will save PDF to the designated folder. I hard coded the path folder below, but you could use an Alias:
<%A5
printoptions = ""
args = ""
options = ""
path = "c:\a5webroot\framework_v3\framework_v3.alb"
filename = "c:\mypdf1.pdf"
vReport = a5w_report_saveas("users_by_company@"+path,"PDF","","",filename,global_variables(),printOptions,args,options)
filename = "c:\mypdf2.pdf"
vreport2 = report.saveas("users_by_company@"+path,"PDF","","",filename)
%>
printoptions = ""
args = ""
options = ""
path = "c:\a5webroot\framework_v3\framework_v3.alb"
filename = "c:\mypdf1.pdf"
vReport = a5w_report_saveas("users_by_company@"+path,"PDF","","",filename,global_variables(),printOptions,args,options)
filename = "c:\mypdf2.pdf"
vreport2 = report.saveas("users_by_company@"+path,"PDF","","",filename)
%>
Comment