Problem with newly added table RRS feed

  • Question

  • Hi All,

    I have a MainReport (.rdlc) and it contains about 10 sub-reports. I was using ".ReportPath()" to identify my MainReport, but I needed to add fields & a Table on the fly and so I changed from the above to ".LoadReportDefinition()". My table has been added with its own fields and DataSetName, but when I get to the following line of code I get an exception:


    "int paramsCount = reportViewer1.LocalReport.GetParameters().Count;"


    Exception at its lowest level gives me the following:


    "Message = "The table ‘Table1’ refers to an invalid DataSetName ‘UDFSQL’." "


    UDFSQL is the name I gave the dataSet my table would be accessing and I have ensured that it is populated. Is their anyone out there who knows whay this is happening?


    Thanks a million!! 

    Tuesday, May 29, 2007 5:33 PM

All replies

  • I just came across your post and not sure if you got an answer, but here is what you have to do:


    Click on the table in the layout mode and right click on it to view its
    properties.  Under the DataSet name: section in the dropdown, select the newly named/added dataset.

    Going in and changing in the RDL can be done with the XML, but if you don't know what/where to change then it could cause more errors.

    I have the same problem and this suggestion works fine.



    Friday, August 31, 2007 5:59 PM