cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports webservice vb.net

Former Member
0 Kudos

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)

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Vinoth,

To post in » .NET Development - Crystal Reports forums

click here

Hope this helps!!

Regards,

Shweta

Former Member
0 Kudos

Thank you

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

Please post this question in the " .NET Development - BusinessObjects Enterprise, BusinessObjects Edge, Crystal Reports Server " forum.