Hi,
I'm working on a web application in VB.NET 2005 that creates dynamic crystal reports. I use the built-in version of Crystal Report and when a user want to print the report, a window is opened asking the number of pages to print and then the report is exported in .pdf to allow the user to print it himself.
I decided to export the report in pdf myself to C:\WINDOWS\Temp et redirect the user to this file. I used the following code:
<code>
Protected
Sub Page_Load(ByVal sender AsObject, ByVal e As System.EventArgs) HandlesMe.Load
Dim dfdoCustomers AsNew _
CrystalDecisions.Shared.DiskFileDestinationOptions()
Dim szFileName AsString = ("C:\WINDOWS\Temp\Rapport2.pdf")
dfdoCustomers.DiskFileName = szFileName
With RemplirDataSet() '// Function that returns report document object
.ExportOptions.ExportDestinationType = _
CrystalDecisions.Shared.ExportDestinationType.DiskFile
.ExportOptions.ExportFormatType = _
CrystalDecisions.Shared.ExportFormatType.PortableDocFormat
.ExportOptions.DestinationOptions = dfdoCustomers
.Export()
EndWith
Response.Redirect(szFileName)
EndSud</code>
I'm redirected to the error page "Can't find server or DNS error".
Rapport.pdf is in the folder.
I thought it could be a rights problem, but all possible users have the necessary rights on the folder and I can't find any ASPNET user to add.
Any help would be appreciated, thank you.
Kotor2000
Kotor2000