2

I am working on .net framework 3.5 and using RDLC files for reporting in my project. Problem that I am facing is that in my Dataset I have a numerically named field "63" and whenever I am using it in my RDLC file its showing me this error

"A field in the dataset ‘DataSet1’ has the name ‘63’. Field names must be CLS-compliant identifiers."

I have already performed few things like.

1.) [assembly: CLSCompliantAttribute(false)]

in my project's assemblyInfo.cs

2.) and placing attribute name under square brackets. eg :[63] in my Dataset.

But all went futile any help will be appreciated Thank You

Rahul
  • 1,070
  • 3
  • 21
  • 47
  • 1
    The warning is saying that it must be CLS-Compliant.. CLS compliance means you can't declare a variable/field/property starting with a number.. or a square bracket. Very strange naming convention you have there.. :/ – Simon Whitehead Jul 05 '13 at 04:52
  • I am having no control on database, and to fetch data from database my dataset schema should have to be same as that of db table schema(Same name and same type properties). So I am feeling a bit stuck up. :-? – Rahul Jul 05 '13 at 04:55

2 Answers2

4

Ok, then try this.

  1. Open the xsd file.

  2. Right click on the table.

  3. Select configure.

  4. Assign an alias in the select statement.

  5. Update report.

This link might help u out

Digital Alchemist
  • 2,324
  • 1
  • 15
  • 17
  • Thank you for the answer but my Datatable configure option is not enabled. Rest I have already gone through this link. – Rahul Jul 05 '13 at 04:57
0

Ok I got an answer for it. only thing that is to be done is to change the name of the variable like fro "63" to "a63". To turn the name alphanumeric.

Rahul
  • 1,070
  • 3
  • 21
  • 47