Click here to Skip to main content
14,695,085 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear all,

The crystal report ask for login details (ODBC) when deployed on server.

Please assist with a work around.


1 solution

This is a very common question:
CodeProject Quick Answers for "Crystal Reports Login Credentials"[^]

Basically you need to program to set the login information so that it won't prompt.

Dim rd As ReportDocument
rd = New ReportDocument
rd.Load(Server.MapPath("Reports/CrystalReport2.rpt")) 'path to your rpt file

'sql stuff i am using a datatable
Dim dt As DataTable = DataAdaptor.GetDataTable(sql)
dt.TableName = "yourtable"

rd.SetDatabaseLogon(dbloginname;, dbpassword;)

Note: This code was taken from Member 2965545[^]'s answer to this question:
Crystal Report asks for Login Credentials[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900