Hello,
What we'd like to do is programmatically generate and maintain a report model based on how the individual install is configured. I've found some documentation that makes me believe this is possible, but I'm hoping someone can nudge me in the right direction. The ReportingServices2005 class has several model related methods (CreateModel) and I found the .xsd for the semantic model XML file
(http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/SemanticModeling.xsd),
but no real documentation on how to put together a Report Model document from scratch. Looking at the files generated from BIDS is somewhat overwhelming and I have no idea where I'd pull most of the information.
Finally, I want to create Report Model(.smdl) file without Report Model Designer.
I want to Implement CreateModel Method to create new model, any source code sample..?
Any help that can be provided would be greatly appreciated. Thanks!
Sandip.
I am not positive but I don't think that the CreateModel method is for what you think it is for. I think it is for creating an instance of the model, uploading it to a ReportServer. IOW you read in an SMDL file and push it to a server, update it -- various management purposes.
Or I could be looking at a different part of the RS API than you are, and you could be right <s>.
IAC, fond as I am of reading schemas and creating XML files from scratch, this one is tough because of all the guids. Probably your best bet would be to start with a basic one and add nodes into it based on the privileges and configuration for an individual install or user, for example adjust the data sources or adding some fields.
>L<
|||How can I update report models in the report server programmatically?
I was able to publish report models from one server to another using .rss file. I used the method ".createmodel". However, this doesn't have the overwrite parameter unlike ".createreport" method.
Is there a way or command to do this?
Any help would be greatly appreciated(",). Thanks.|||To start with, I should say that I'm not clear enough about models to understand why you think there are associated parameters. I don't understand the connection, I'm not that familiar with models and didn't think they had parameters.
IAC, yes there is some scripting associated with models and the best advice I can give you is to become familiar with the scripting utilitiy you'll find here: http://www.sqldbatips.com/showarticle.asp?ID=62 It will interrogate your reporting services server and generate scripts for you (including models). And you will learn a lot from what it shows. There is an example of the script it generates here: http://www.sqldbatips.com/samples/code/RSScripter/readme.htm#_script_model
>L<
|||Lisa,
Thanks. Actually, I was able to find the answer on the same site you've given me( http://www.sqldbatips.com/showarticle.asp?ID=62 ) ...
I downloaded the scripter, run rsscripter.exe, on the scripting options>data/model, i checked update existing model and generate the script. On the generated script, I noticed that they have used .SetModelDefinition method to do this. So, to sum up:
.SetModelDefinition - used to update report models in the report server
.CreateReport - used to create/add report models in the report server
Thanks again
No comments:
Post a Comment