Step 1: Create a typed Dataset and add DataAdapters for Main and Sub rdlcs by pulling table or thru Stored procedure.
Step 2: Design two RDLCs Main.rdlc and Sub.rdlc
Step 3: Create Paramater in Sub.rdlc
Step 4: in Main.rdlc, right click on the column-'Text Box Properties'. Go to Action - Choose 'Go to Report'. Choose Sub.rdlc under 'Specify a report' then add the Parameter, give the one you created in Sub.rdlc and select the database column value to pass.
Step 5. Create a webform, drag the report viewer and go to its Drilldown event in code behind and write the code as below
protected void ReportViewer1_Drillthrough(object sender, DrillthroughEventArgs e)
{
LocalReport report = (LocalReport)e.Report;
int MakeId = 0;
IList<ReportParameter> list = report.OriginalParametersToDrillthrough;
foreach (ReportParameter param in list)
{
MakeId = Convert.ToInt32(param.Values[0]);
}
DataSets ds = new DataSets();
ds.EnforceConstraints = false;
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["Cons"].ConnectionString);
con.Open();
SqlCommand cmd = new SqlCommand("ModelSivaa");
cmd.CommandType = CommandType.StoredProcedure;
cmd.Connection = con;
cmd.Parameters.AddWithValue("@MakeId", MakeId);
cmd.ExecuteNonQuery();
SqlDataAdapter adap = new SqlDataAdapter(cmd);
adap.Fill(ds, "Modeltable");
report.DataSources.Add(new ReportDataSource("ModelSet", ds.Tables["Modeltable"]));