views:

74

answers:

2

Hi all.

I designed a CrystalReport using CrystalReport Designer that embedded with VisulaStudio.NET 2005, while running the report using report viewer, it runs properly and retrieves the required data. While running it throught the application, no data is retrieved?!

Is running a CrystalReport through a .NET application differs from running it using CrystalReport Designer, embedded with VisulaStudio?

Any suggestions?

A: 

Hi Ahmed, I face a similar issue. http://stackoverflow.com/questions/506915/error-opening-crystalreport-viewer

I don't think there is any difference as it works fine on my dev. setup and also when the application is run on the same machine as the db. I guess it has some security/ credential issue.

Let me know if you figure out something.

Thanks, Ramjee

rAm
A: 

Hi Ramjee, if you think that it's related to security/credential, you can use this code to solve this problem. Even, I did this, I still have the problem.

// Provides current ReportDocument with LogonInfo.
CrystalGen cg = new CrystalGen(this.Page);
cg.CrystalReportLogOn(rptDoc, ConfigurationManager.AppSettings["ReportDataSource"], ConfigurationManager.AppSettings["ReportUserID"], ConfigurationManager.AppSettings["ReportPassword"]);

Of course, change login access with yours. Try and feedback us.

Ahmed
This does not solve the problem. I tried a lot of methdods but the problem remains.
rAm