SSRS 2005 - Report Model

  • I am having issues with updating my Report Model (.smdl) after I make changes to the Data Source View (.dsv).

    For example, I deleted one relationship and added another, but when I use Autogenerate to regenerate my Report Model, I get an error message. It is telling me that 'The Relation property of the Role '...' refers to the Relation '...' in the DataSourceView, which does not exist'.

    How do you update your Report Model after you make changes to your Data Source View?

    Thanks,

    SSRS Newbie

  • I'm having the exact same issue. Any updates on this problem?

  • Not sure if this is the issue that you guys are having, but I found this buried in the docs:

    If the underlying schema has changed or if the database has changed, you can refresh the model or refresh an item within the model by running Autogenerate. When Autogenerate runs, it never overwrites the entire model; it simply detects the added items and incorporates them into the model. Autogenerate does not detect deleted or modified database items; therefore, you need to manually delete the model item(s). Otherwise, you will see an error when using the actual field in Report Builder.

    Does that help?

  • Once changes have been made to the DB, open the model project and select the DSV.

    In the DSV tab, right click on a empty space and choose 'Refresh' in the context menu.

    Accept the changes. They would precisely be the chnages in the DB.

    Change the destination column in the relationship from the exisitng field to the changed field.

    Open the SMDL and select the coressponding entity/attrib and rebind the attrib to the new column.

    Select the attrib, in the properties window, reset the binding property to the new column name from the table. And if needed rename the attrib to the newly 'related' column

    Build the proj and if sucessful deploy it.

    Now Report Builder will list the newly added/related column.

    Ha! and no need to regenerate/ Autogenerate.

    Hope this helps.

    View Siva Gurusamy's profile on LinkedIn

    "Software changes. This is a rather obvious statement, but it is a fact that must be ever present in the minds of developers and architects. Although we tend to think of software development as chiefly an engineering exercise, the analogy breaks down very quickly. When was the last time someone asked the designers of the Empire State building to add ten new floors at the bottom, put a pool on the top, and have all of this done before Monday morning? " : Doug Purdy, Microsoft Corporation

  • There seems to be a bug (in 2008 at least) where if either end of the role relationship is referenced in a hidden field on another role, then the hidden field reference is not deleted when you delete the role (which you'd have to do if the Foreign Key linking the two entities is deleted from the underlying database).

    This is what was causing me the error:

    "The Relation property of the Role "X" refers to the Relation "FK_XYZ" in the DataSourceView, which does not exist."

    However, simply deleting the role wasn't enough - when I saved the project, closed it, then reopened, I'd get an error in VS "Object reference not set to an instance of an object.", meaning I couldn't open the Report Model.

    To fix, I had to manually search through the smdl file in notepad (or similar) for the GUID of the Role ID (note it can happen to either end of the relationship, either the Source or the Target!) and manually delete the offending lines.

    G0fa79e26-1d74-4d0f-bad2-1f578149e0fc

    Hope this helps someone else, because this caused me no end of grief today!

    Cheers,

    Pete.

    p.s. Just discovered this bug with the hidden fields also happens when deleting Attributes as well.

  • this helped a lot. I had the same problem with smdl file in SSRS 2008 - I've been renaming existing objects in DSV and it corrupted smdl. removing troubling objects from both dsv and model (in xml editor) solved this nasty issue!

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply