Thursday, July 30, 2009

SQL Reporting Service Data Type

Design one reports with the filter of username using SQL reporting service. There are 2 kinds of username in system, one is 5 digits number, another is 3characters+5digits number. However, only user with 3 characters+ 5 digits numbers can see the report. There is another report designed in the same way doesn't have this problem. Finally, check the data field "user ID" of the database, the data type is nchar, not varchar, which means this data field use the fixed length. When reporting service try to match the user name with the "User ID", there are a 3 blank space if user name is only 5 digits number. Either change thedata type to varchar, or use trim to eliminate the space in "User ID" data field. All users can see the report now.

No comments:

Post a Comment