Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

RDLC File - Adding a new Field To existing file. C#

Options
  • 20-06-2011 3:45pm
    #1
    Registered Users Posts: 3,992 ✭✭✭


    I have to modify one of the reports that our system produces.
    These reports are generated using RDLC files.

    I've added the necessary back end to get the info needed for the new field "EmployeeName".
    //lunchtime report
    lunch.Reason = request.SqlDataReaderResult["Reason"].ToString();
    lunch.Record_No = (int)request.SqlDataReaderResult["Record_No"];
    lunch.Seq = (int)request.SqlDataReaderResult["Seq"];
    [B]lunch.EmployeeName = request.SqlDataReaderResult["EmployeeName"].ToString();[/B] // new field
    

    But when i do a call in my rdlc file

    "=Fields!EmployeeName.Value"

    it causes an error:
    Error 1 The Value expression for the textbox ‘textbox14’ refers to the field ‘EmployeeName’. Report item expressions can only refer to fields within the current data set scope or, if inside an aggregate, the specified data set scope.

    anyone have this issue before?


Comments

  • Registered Users Posts: 3,992 ✭✭✭Korvanica


    It Fixed Itself randomly somehow...

    Now I have to update another one. and am having the same issue... does anyone know anyway of fixing this?


  • Registered Users Posts: 297 ✭✭stesh


    Korvanica wrote: »
    It Fixed Itself randomly somehow...

    Now I have to update another one. and am having the same issue... does anyone know anyway of fixing this?

    You have possibly lost a column somewhere.


  • Registered Users Posts: 3,992 ✭✭✭Korvanica


    Lost a column? Doesn't seem like I have..

    Another Issue.. The datasource for the rdlc file no longer appears in the list of Datasources.

    I was creating a new one, (a copy) from scratch to see if it would sort out the error but no datasource can be found


Advertisement