Crystal Reports Runtime High Quality Official
using CrystalDecisions.CrystalReports.Engine; using CrystalDecisions.Shared; // Load the report ReportDocument report = new ReportDocument(); report.Load(@"C:\Reports\MyReport.rpt");
// Apply to all tables foreach (CrystalDecisions.CrystalReports.Engine.Table table in report.Database.Tables) { TableLogOnInfo logOnInfo = table.LogOnInfo; logOnInfo.ConnectionInfo = connInfo; table.ApplyLogOnInfo(logOnInfo); } crystal reports runtime
// Set parameters if needed report.SetParameterValue("@StartDate", DateTime.Now.AddDays(-30)); report.SetParameterValue("@EndDate", DateTime.Now); using CrystalDecisions
Requires CrystalDecisions.CrystalReports.Engine and CrystalDecisions.Shared DLLs (SAP Crystal Reports runtime for .NET). logOnInfo.ConnectionInfo = connInfo