Friday, March 23, 2012

How to Refresh a Data Source View and autogenerate/Re-Deploy the corresponding Report Model

Hi everyone!,

Our team is new to SSRS and we are trying to figure out how to refresh the data source view, autogenerate the corressponding report model and Re-Deploy the Report Model (rewrite existing Report Model) on the server on a periodoc basis or trigger the whole action whenever there is a change in the database on some specific tables.

We prefer to do this action through a Agent job ( a diff approach is also welcome).

Are there any stored procs out there?

Appreciate your time.

-PN

Can anybody please tell me if this is possible or not in the current version of SSRS or VS.

Appreciate your time guys.

|||This won't be easy but I think it is possible. There is no eventing that RS provides to help you with this. The DSV schema information gets embedded in the model definition (under the <Schema> element). So, you need to load the model defintion (GetModelDefinition() API), make the changes to the DSV schema, update the model, and save it back (SetModelDefinition). As far subscribing for notifications, you are on your own. Probably CLR DDL trigger will be your best joice to sink the table schema change event.|||

Hi Teo,

Thanks for your answer. I was thinking around the same lines but did not know the Methods to accomplish this task.

|||

Hi,

My project requirements goes the same way. I was trying to refresh the Report Model in the way mentioned by Teo. But the GetModelDefinition will fetch the report model SMDL.

How to get the DSV schema? Is there anything am missing out?

Did any one got the solution for the same?

Thanks.

|||Assuming a model on top of a relational database, the DSV schema gets embedded in the model definition (see <DataSourceView> element) upon deploy.|||Hi Teo,

Thanks for ur help. I tried in the same lines and was able to achieve my task.

I need to know whether it is recomended to change the xml definition of the Report Model.

Thanks

No comments:

Post a Comment