Report Viewer and ObjectDataSource changing in asp.net rdlc

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();
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,829
Latest member
PIXThurman

Latest Threads

Top