I'm new to the world of Crystal Reports, and I've found a variety of articles on creating a new Crystal Report in VS 2010, but nothing about taking an existing report and using it to generate a PDF that can be exported by a user.
This is the article I found I was trying to use as a start: Crystal Reports in ASP.NET MVC
I ran SQL Profiler when running the original report in our ERP system, and tried to use this query as my DataSource, but each time I get to the point where I am loading my report file, it throws an exception:
Exception Details: System.Runtime.InteropServices.COMException: Database logon failed.
If I debug through the code, the HasRecords
'((CrystalDecisions.CrystalReports.Engine.ReportDocument)(rptH)).HasRecords' threw an exception of type 'CrystalDecisions.CrystalReports.Engine.LogOnException'
I've also tried adding the SetDatabaseLogin method, with a username and password with DBO access to the database, but got the same results.
rptH.SetDatabaseLogon("username", "password");
So to make a long story longer, I'm wondering if anyone knows of a good article, or can give me some foolproof steps to get the report working in my code, where I can have a PDF returned (even if I hardcode the SQL first... I just want to see it working).
Thanks!