Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Report Viewer and ObjectDataSource changing in asp.net rdlc

1 view
Skip to first unread message

mike11d11

unread,
Apr 25, 2008, 1:05:11 PM4/25/08
to
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();

0 new messages