on 09-11-2008 7:27 AM
I have a crystal report which is running succesfull in windows application. I used the same report to deploy from webservice Print automatically from webserver to a specific printer
In web.config file I am using u201C<identity impersonate="true" userName="DOMAIN\USERNAME" password="PASSWORD"/>u201D
When I call the method PrintToPrinter, getting a error as
u201CError in File C:\DOCUME1\VINOTH\ASPNET\LOCALS1\Temp\Copy of MISys Purchase Query {6E996346-B73A-4A42-8F3C-2818B5C97C88}.rpt: Unable to connect: incorrect log on parameters.u201D
Supplier - UserName, Password, ServerName, DBName are correct, using the same logon info in windows application which wors fine. Can any one help me?
Using CrystalDecisions version 10.2.3600.0 and Visual Studion 2005
Dim report As New CrystalDecisions.CrystalReports.Engine.ReportDocument()
report.Load(ReportPath)
report.SetDatabaseLogon(UserName, Password, ServerName, DBName)
Dim myLogin As CrystalDecisions.Shared.TableLogOnInfo
Dim myTable As CrystalDecisions.CrystalReports.Engine.Table
For Each myTable In report.Database.Tables
myLogin = myTable.LogOnInfo
myLogin.ConnectionInfo.ServerName = ServerName
myLogin.ConnectionInfo.DatabaseName = DBName
myLogin.ConnectionInfo.Password = Password
myLogin.ConnectionInfo.UserID = UserName
myLogin.ConnectionInfo.IntegratedSecurity = True
myTable.ApplyLogOnInfo(myLogin)
myTable.TestConnectivity()
Next
report.PrintOptions.PrinterName = PrinterName
report.PrintToPrinter(1, False, 0, 0)
Hi Vinoth,
To post in » .NET Development - Crystal Reports forums
click here
Hope this helps!!
Regards,
Shweta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Please post this question in the " .NET Development - BusinessObjects Enterprise, BusinessObjects Edge, Crystal Reports Server " forum.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.