Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Crystal Reports webservice

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?

Connection status successes - Connecting database directly using Connection Provider

_Using CrystalDecisions version 10.2.3600.0, Visual Studion 2005 and IBM DB2 _

Dim report As New CrystalDecisions.CrystalReports.Engine.ReportDocument()


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




report.PrintOptions.PrinterName = PrinterName

report.PrintToPrinter(1, False, 0, 0)

Edited by: vinoth kumar on Sep 11, 2008 9:02 AM

Former Member
Former Member replied

Thanks for your reply. Now I am using windows service to print.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question