M
mike11d11
I have a simple report viewer in on one of my web pages and I have a
specific report chosen to view, not a crystal report but the built in
reports that are .rdlc files. I want to be able to send parameters to
this report to change the data shown. I initially want to pull the
report up based on one parameter (Users ID), then give the user the
option to fill in other text boxes on the screen for the rest of the
criteria. So some how i have to be ablet o change the GetData select
method to another select method that handles these parameters. Here
is teh code I used to try and change that but it didnt work. Any help
is appreciated...
ObjectDataSource1.SelectMethod = "GetDataByDateRange";
ObjectDataSource1.SelectParameters.Clear();
ObjectDataSource1.SelectParameters.Add("@BeginDate",
Convert.ToDateTime(txtBeginDate.Text).ToString());
ObjectDataSource1.SelectParameters.Add("@EndDate",
Convert.ToDateTime(txtEndDate.Text).ToString());
ObjectDataSource1.SelectParameters.Add("@BUMNewTechID",
Session["ID"].ToString());
ObjectDataSource1.DataBind();
ReportViewer1.DataBind();
specific report chosen to view, not a crystal report but the built in
reports that are .rdlc files. I want to be able to send parameters to
this report to change the data shown. I initially want to pull the
report up based on one parameter (Users ID), then give the user the
option to fill in other text boxes on the screen for the rest of the
criteria. So some how i have to be ablet o change the GetData select
method to another select method that handles these parameters. Here
is teh code I used to try and change that but it didnt work. Any help
is appreciated...
ObjectDataSource1.SelectMethod = "GetDataByDateRange";
ObjectDataSource1.SelectParameters.Clear();
ObjectDataSource1.SelectParameters.Add("@BeginDate",
Convert.ToDateTime(txtBeginDate.Text).ToString());
ObjectDataSource1.SelectParameters.Add("@EndDate",
Convert.ToDateTime(txtEndDate.Text).ToString());
ObjectDataSource1.SelectParameters.Add("@BUMNewTechID",
Session["ID"].ToString());
ObjectDataSource1.DataBind();
ReportViewer1.DataBind();