How to solve "Report item not linked to Dataset" error in RDLC?

20,820

Solution 1

Select the Tablix and then right click on the left top Square. Select Tablix Properties.

In the Tablix Properties window make sure you have your Dataset name selected.

I ran into this problem after I deleted the previous Dataset and it was left blank. If you don't see one in the dropdown you might need to go to View|Report Data and Refresh it.

Solution 2

You have to add the dataset for the rdlc report. In report design you can configure the dataset fields.

You can find the configuration option in View -> Report Data

If you have already added the dataset for this, there is other case that you have to refresh the dataset if you modify it.

Share:
20,820
Ezhilan
Author by

Ezhilan

I am Working as a Software Developer in a private concern in Puducherry

Updated on January 28, 2021

Comments

  • Ezhilan
    Ezhilan over 3 years

    I am using Visual studio 2010 and i have created a rdlc report without using report wizard and added the dataset to it but when i right click on a textbox,choose expression and then navigate to datasets i could see my dataset added to report but when i click on the fields it shows "Report item not linked to a dataset". I not facing this issue in VS 2008 and the report works correctly in it. I don't know how to solve this issue in VS2010. So somebody help me regarding this issue. I have attached the screenshot of the issue below. Please check it.

    Fields not populated by dataset

    Error when using Dataset

    The code i used to display values in table is given below but i would like to know how to display the values in textboxes instead of table.

    protected void Page_Load(object sender, EventArgs e)
    {
        LocalReport lr = null;
        DataSet ds = new DataSet();
        con.Open();
        SqlCommand cmd = new SqlCommand();
        SqlDataAdapter da = new SqlDataAdapter("Select CatalogNo as CatalogNo, Productname as ProductName, Quality_Plan_Ref_No as QPRefNo,Drawing_No as DrawingNo,ISR_No as ISRNo,BatchNo as BatchNo,Allotted_Qty as AllottedQty,CONVERT(VARCHAR(10),Allotted_Date,105) as AllottedDate from Batch_Allott where CatalogNo='0464' ", con);
        da.Fill(ds, "temp");
        ReportViewer1.LocalReport.DataSources.Clear();
        ReportViewer1.ProcessingMode = ProcessingMode.Local;
        lr = ReportViewer1.LocalReport;
        lr.ReportPath = "Report1.rdlc";
        lr.DataSources.Add(new ReportDataSource("Dataset1_Batch_Allott", ds.Tables[0]));
    }