how to pass datetime parameter to crystal reports
I m using crystal reports in .net2.0 I want to pass datetime parameter to crystal report I m using stored procedure
in SQL server2005 I m using the code in C# to run the report as
I have to deploy the project on client mechine and therefore
included
using CrystalDecisions.Shared;
using CrystalDecisions.CrystalReports.Engine;
on report launch event
i wrote
================================================== ===============
ReportViewer vr = new ReportViewer()
CrystalDecisions.Shared.TableLogOnInfo tliCurrent;
ReportDocument rpt = new ReportDocument();
try
{
rpt.Load(@"..\..\DailyActivityReport.rpt");
foreach (CrystalDecisions.CrystalReports.Engine.Table tbCurrent in rpt.Database.Tables)
{
tliCurrent = tbCurrent.LogOnInfo;
tliCurrent.ConnectionInfo.ServerName = "FROM app.config";
tliCurrent.ConnectionInfo.UserID = "FROM app.config";
tliCurrent.ConnectionInfo.Password = "FROM app.config";
tliCurrent.ConnectionInfo.DatabaseName = "FROM app.config";
tbCurrent.ApplyLogOnInfo(tliCurrent);
}
rpt.SetParameterValue("@todate", dtptodate.Value.ToString());
rpt.SetParameterValue("@AccountID", txtuseraccountcode.Text);
vr.crystalReportViewer1.ReportSource = rpt;
vr.Show();
================================================== ================
report logins but NO VALUE OF parameter IS passed
how DO I DO it
hyder_master
hyder_master
|