"Logon failed" for Crystal Report

K

Karun Karunakaran

Hi,

I am using the Crystal Enterprise .NET assemblies to generate and
display a crystal report in a webform. This report connects to an SQL
server (running locally) using a specific username and password. I use
the InfoStore object to query for the report from the CE server (also
running locally) and bind it to the CrystalReportViewer control in the
webform.

I am getting an "SQL Server logon failed" when I try to generate this
report from the ASPX page. This happens even when the
username/password is specified for this report in the Crystal
Enterprise server (under Database tab of Crystal Management Console).

But I can generate the same report successfully from the Crystal
Management Console. Also, I am able to display reports that do not
require logon credentials (like reports based off .mdb files) using
the same code.

And of course, the SQL server has mixed mode authentication enabled.

Can someone help me out here?

Thanks,
Karun.
 
G

Guest

Hi Ken

Thanks for your reply. Looks like that is exactly the problem. But the solution described in that article applies only to ReportDocument objects created by giving the name of the .rpt file; it does not apply to reports queried from the InfoStore. This is what I am doing

'User given a list of reports from which he selects one. The corresponding ReportID is used below
Dim Result As InfoObjects = objInfoStore.Query("SELECT * From CI_INFOOBJECTS Where SI_ID=<ReportID>"
Dim rptObject As Report = CType(Result(1),Report

crRptViewer.ReportSource = rptObjec

The issue here is, since different reports query different databases, I cannot supply the username/password in the application code. Is there any way I can get around this

Thanks
Karun

----- Ken Cox [Microsoft MVP] wrote: ----

Is it this


PRB: Crystal Report in Web Application Fails to Log On to SQL Serve

"For security reasons, the SQL Server password is not persisted in the
Crystal Report at run time.

http://support.microsoft.com/default.aspx?scid=kb;en-us;31926

<snip>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top