I run into a major bug in 2011.3. This is causing compiler errors on preview/viewing the report.
If I have a column in the database (or a table name) called NAME or TYPE or IMPORTS then then names are used unqualified in the code which the designer generates. I am using VB as the code type, therefore all of these names should have squares brackets around them in the code in case they are reserved words. ie [Name], [Type] etc.
Unsafe (reserved words) column names bug
Unsafe (reserved words) column names bug
Hello.
Thank you.
We know this problem. You should change Data Source name. Please, see attached image.hunter wrote:I run into a major bug in 2011.3. This is causing compiler errors on preview/viewing the report.
If I have a column in the database (or a table name) called NAME or TYPE or IMPORTS then then names are used unqualified in the code which the designer generates. I am using VB as the code type, therefore all of these names should have squares brackets around them in the code in case they are reserved words. ie [Name], [Type] etc.
Thank you.
- Attachments
-
- 1439.DataSourceName.png (30.24 KiB) Viewed 2309 times
Unsafe (reserved words) column names bug
Since I pre-populate (and refresh in case of schema changes) a set of tables and columns automatically from the database on each designer load, manually changing name is not really possible. We plan to use this with many of our web apps, so we are automating everything we can for the end users.
For now, I am importing all of the columns with square brackets since that works with VB and SQL. Lucky we don't currently uses C#. It would be good - and easy for you - to add the square (vb) or angled (C#) brackets in the generated code to stop this from happening in future.
Thanks.
For now, I am importing all of the columns with square brackets since that works with VB and SQL. Lucky we don't currently uses C#. It would be good - and easy for you - to add the square (vb) or angled (C#) brackets in the generated code to stop this from happening in future.
Thanks.
Unsafe (reserved words) column names bug
Update: Square brackets is causing some issues. Looks like it needs to be fixed in your code generation.
I tried the above method of using a different name than what is used in the data source. If done on the columns (above screen shot is for a table) then it does not work.
If the settings are as follows:
I am using 2011.3.1106. Still trying to download 2011.3.1116 but the link is still down.
Also, one other minor issue. If there is an error in the SQL, the designer shows no error and no preview. Web viewer shows the error. ie if my SQL is:
"SELECT order as order_ FROM Users" then nothing displayed. (The correct SQL being "SELECT [order] as order_ FROM Users")
Please show all errors.
I tried the above method of using a different name than what is used in the data source. If done on the columns (above screen shot is for a table) then it does not work.
If the settings are as follows:
then instead of displaying the contents of Name/Name_ it simply displays: "Name_" where the persons name should be.Name in Source: Name
Name: Name_
Alias: Name_
I am using 2011.3.1106. Still trying to download 2011.3.1116 but the link is still down.
Also, one other minor issue. If there is an error in the SQL, the designer shows no error and no preview. Web viewer shows the error. ie if my SQL is:
"SELECT order as order_ FROM Users" then nothing displayed. (The correct SQL being "SELECT [order] as order_ FROM Users")
Please show all errors.
Unsafe (reserved words) column names bug
Hello.
There is no 2011.3.1116 version now.
We add your problem to our to-do list. But it may be problems in realisation due backward compatibility.
Thank you.
There is no 2011.3.1116 version now.
We add your problem to our to-do list. But it may be problems in realisation due backward compatibility.
Thank you.