ASP.NET ....... Crystal Logon failed

A

anil

I am having problem when trying to display crystal report from webform
using SQL server as backend. This gives Logon failed error.
This error comes in when I use data from more than one table. The same
report works fine if MS access is the back end.
Single table report is working fine with SQL server as backend.

I have tried all steps in thsi article:
http://support.microsoft.com/default.aspx?scid=kb;en-us;319264

But teh issue remains the same.
Please help.
 
R

Reva Baum

You can create a single view in sql server based on those two tables. Then create a dataset from the view in your application, and set the crystal report data source to the dataset in the crystal report wizard.

dataset1.Reset()
adapter.SelectCommand = New SqlCommand("select * from MYVIEW", connection)
adapter.Fill(dataset1, "MYVIEW")
myReport.SetDataSource(dataset1)
CrystalReportViewer1.ReportSource = myReport

Or you can have a report with a subreport - so the report will be based on one table and the subreport the other table. Then right click on the subreport and choose "change subreport links" to link the report to the subreport. (Links can also be set in the subreport wizard.)
 
A

Ayaz Ahmed

Hello,

try to define once report datasource at page load event
so its not asking report data source name if u call crystal report.

Warm Regards,

Ayaz Ahmed
Software Engineer & Web Developer
Creative Chaos (Pvt.) Ltd.
"Managing Your Digital Risk"
http://www.csquareonline.com
Karachi, Pakistan
Mobile +92 300 2280950
Office +92 21 455 2414
 

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