none
crystal report missing paramater database log on fail RRS feed

  • Question

  • Hi,

    I'm trying to convert crystal report file to pdf in c#.  Each month my crystal report is getting refreshed. I have unchecked "Save data with report" so the file automatically refreshes every month.  I do not show this files in the crystal report viewer. If I check "Save data with report" everything works fine. If I don't, first, I was getting database logon failed. Then I have added connection to database. Now I get Missing parameter.

    This is how I load crystal file:

    string fileName = Path.GetFileName(reportPath);
                ReportDocument report = new ReportDocument();
                report.Load(reportPath);
    //added this line
                report.SetDatabaseLogon("username", "password", "server", "database");
                //added this line
                report.Refresh();

    Any suggestions on how I can fix this problem?

    Thank you.

    Thursday, August 2, 2012 11:49 PM