Hello to all,
I have spent too much time and it is time to ask for help.
I am trying to print a pdf file from a web application. It is working on my localhost machine, but not on my server, so I am hoping I am not far from a solution. I am using SQL Server as the database, and active-linked Alpha files. I have two reports, Invoice1 and Invoice1_VGV.
Here's the code I am trying to execute:
However, when I execute this, I get the following error:
Here are some other details of my setup:
My webroot is \\Server\a5webroot\myapp
My SQL Server data is located at \\Server\mydata
My Alpha FIve linked data is published to \\Server\mydata\linkeddata
I have alias of [CustData] = \\Server\mydata\linkeddata
and [PathAlias.ADB_Path] = \\Server\a5webroot\myapp
If anyone could offer some suggestion as to what might be causing this, I would be most appreciative.
It seems obvious that my routine is having difficulty locating the linked data. But I am at a loss to try to fix this.
Thanks in advance.
Gordon Purcey
I have spent too much time and it is time to ask for help.
I am trying to print a pdf file from a web application. It is working on my localhost machine, but not on my server, so I am hoping I am not far from a solution. I am using SQL Server as the database, and active-linked Alpha files. I have two reports, Invoice1 and Invoice1_VGV.
Here's the code I am trying to execute:
dim filter as c
dim order as c
Filter = "(Custid = "+quote(session.custid)+" ) .and. (Invoice_ = "+quote(session.invnum)+" )"
Order = ""
Dim filename as c
filename = session.session_folder + "tempreport.pdf"
if substr(custid,7,1)="V" then
filename = report.saveas("Invoice1_VGV@[CustData]\s_autoinv.set","pdf",filter,order,filename,.f.)
else
filename = report.saveas("Invoice1@[CustData]\s_autoinv.set","pdf",filter,order,filename,.f.)
end if
if file.exists(filename)
currentform.RedirectTarget = session.session_url + "tempreport.pdf?" + time("hms3")
end if
dim order as c
Filter = "(Custid = "+quote(session.custid)+" ) .and. (Invoice_ = "+quote(session.invnum)+" )"
Order = ""
Dim filename as c
filename = session.session_folder + "tempreport.pdf"
if substr(custid,7,1)="V" then
filename = report.saveas("Invoice1_VGV@[CustData]\s_autoinv.set","pdf",filter,order,filename,.f.)
else
filename = report.saveas("Invoice1@[CustData]\s_autoinv.set","pdf",filter,order,filename,.f.)
end if
if file.exists(filename)
currentform.RedirectTarget = session.session_url + "tempreport.pdf?" + time("hms3")
end if
Amyuni Low Level Print:
Layout name: Invoice1@[CustData]\s_autoinv.set
Layout type: report
Unable to connect to backend database while opening local cache C:\DOCUME~1\Gordon\LOCALS~1\Temp\$$1E78_DATA_arsum.dbf for table arsum.
Invalid syntax for connection string. Must be formatted in one of the following ways:
name1 + chr(9) + value1 + crlf() + name2 + chr(9) + value2 + crlf() ... or
{name1='value1',name2='value2'...nameN='valueN'}
Layout name: Invoice1@[CustData]\s_autoinv.set
Layout type: report
Unable to connect to backend database while opening local cache C:\DOCUME~1\Gordon\LOCALS~1\Temp\$$1E78_DATA_arsum.dbf for table arsum.
Invalid syntax for connection string. Must be formatted in one of the following ways:
name1 + chr(9) + value1 + crlf() + name2 + chr(9) + value2 + crlf() ... or
{name1='value1',name2='value2'...nameN='valueN'}
My webroot is \\Server\a5webroot\myapp
My SQL Server data is located at \\Server\mydata
My Alpha FIve linked data is published to \\Server\mydata\linkeddata
I have alias of [CustData] = \\Server\mydata\linkeddata
and [PathAlias.ADB_Path] = \\Server\a5webroot\myapp
If anyone could offer some suggestion as to what might be causing this, I would be most appreciative.
It seems obvious that my routine is having difficulty locating the linked data. But I am at a loss to try to fix this.
Thanks in advance.
Gordon Purcey
Comment