1
votes

i am working on crystal reports in asp.net using c#. i am using reportdocument object rpt for load crystal report. i am using following code

ConnectionInfo connectionInfo = new ConnectionInfo();
connectionInfo.ServerName = @"servername";
connectionInfo.DatabaseName = "databasename";
connectionInfo.UserID = "userid";
connectionInfo.Password = "password";
//connectionInfo.IntegratedSecurity = true;

// Assign to all tables used by the report
Tables tables = rpt.Database.Tables;

foreach (CrystalDecisions.CrystalReports.Engine.Table table in tables)
{
    TableLogOnInfo tableLogonInfo = table.LogOnInfo;
    tableLogonInfo.ConnectionInfo = connectionInfo;
    table.ApplyLogOnInfo(tableLogonInfo);
}

here i set database login detail. Now problem is that when i run it then it requires database login information on browser.

1
i have this problem any one know the solutions?. pls give!. - Sagotharan
Does the report contains a subreport? - Raphael

1 Answers

0
votes
  1. check whether all the connection details are correct
  2. Try adding connection after setting report source

these might solve the issues