Cannot delete logical primary keys in data source view

Last post 06-15-2009 9:10 AM by new_to_ssrs. 2 replies.

Sort Posts:

  • Cannot delete logical primary keys in data source view

    06-11-2009, 10:43 AM
    • Member
      point Member
    • new_to_ssrs
    • Member since 06-11-2009, 10:39 AM
    • Posts 4

    Hello,

    I am creating a model based on a data source view which has all sql views (no tables). When I create the DSV, a primary key automatically gets defined for some of these views. The problem is, in some cases this primary key is incorrect and I want to change it but it doesn't let me do that. In the design view, when I select the field in the view and right-click, the "Set Logical Primary Key" and "Delete Logical Primary Key" options are grayed out.

    Any ideas on why this could be happening would be greatly appreciated.

    Thanks!

  • Re: Cannot delete logical primary keys in data source view

    06-15-2009, 2:27 AM

    Hi,

    Based on my test, I have found the same issue with you. So in this scenario, I suggest to remove the primary key  when you create the view table, then the "Set Logical Primary Key" and "Delete Logical Primary Key" options can be used in the data source view.

     

    Please feel free to let me know if I’ve misunderstood anything.

    Sincerely,
    Zong-Qing Li
    Microsoft Online Community Support
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as
    Answer” if a marked post does not actually answer your question.
  • Re: Cannot delete logical primary keys in data source view

    06-15-2009, 9:10 AM
    • Member
      point Member
    • new_to_ssrs
    • Member since 06-11-2009, 10:39 AM
    • Posts 4

    Thanks for the reply. Actually there are no keys defined for the SQL views that I am using. When I add the views to the DSV, somehow SSRS automatically creates a primary key for some of them. For such views, I cannot delete the key created by SSRS and specify a new logical primary key within the data source view. However, what I found out was that if I replace these views with named queries in the DSV, it does let me delete and reset logical primary keys. I'm still interested to know why SSRS creates logical primary keys only for some views and why it doesn't let me reset them later. Thank you!

Page 1 of 1 (3 items)