I am trying to deploy Crystal Reports
in my MVC
application. To get full use of the Crystal Report Viewer, I have to use a webform
, which
Have a look at my Blog post here on this.
There are a couple of actions required, but the main one is to create a new TableLogOnInfo
instance, and then apply is using ApplyLogOnInfo
.
You have to provide credentials for each datasouce
in the report.
Ideally, the report will have a single datasource
. If this is not possible, you need to provide credentials for each, or data for each.
Something like this works well if you want to provide the data:
rd.Database.Tables[0].SetDataSource(testDt);
rd.Database.Tables[1].SetDataSource(micssys);
Otherwise, something like this will allow the report to access the db directly for each datasource
:
rd.SetDatabaseLogon("username","password}");