Click to See Complete Forum and Search --> : how can I refresh Crystal Reprot after passing parameters?


mitok
04-28-2008, 01:01 PM
Hi guys,

I am using crystal report in C# to create report, the problem is whenever I come through my report page and select a period of date for report, page is empty, actuly I pass the parameteres to Data source and the DataTable which is returned has data, only Crystal report does not show any thing.
any help would be appreciate.
Thanks


FYI here is the code:

protected void BtnView_Click(object sender, EventArgs e)
{
ObjectDataSource2.SelectParameters["User_ID"].DefaultValue = DropDownList1.SelectedItem.Value.ToString();
ObjectDataSource2.SelectParameters["StartDate"].DefaultValue = ADate.Value.ToString();
ObjectDataSource2.SelectParameters["EndDate"].DefaultValue = ADate1.Value.ToString();

ObjectDataSource2.DataBind();
CrystalReportSource1.DataBind();
CrystalReportViewer1.RefreshReport();

}