Howto upload programaticaly SMDL file&
I need upload smdl file in setup. Howto do it?
Things wont work like that with model files (*.smdl). If you try to just upload a model file, you will get the following error:
“The DataSourceView is missing for the SemanticModel. SemanticModel must have exactly one DataSourceView element. (MissingDataSourceView).”
So you need to have the information about data source view inside your model file.
The report model file is an xml file containing information about the model in a language called ‘Semantic Model Definition Language’. Data source view file is also in xml format. You need to take the whole contents of the data source view (*.dsv) xml file and put it into the model file exactly after the ‘Entities’ node, ie, just before the closing tag of semantic model.
After that, you need to remove all the attributes of the Now you can safely upload this model file to the Report Server using Report Manager and then associate a data source to make it work. All these steps can be done programmatically by using Reporting Services web service. repService.CreateModel(destFileName, U might have to use CreateDataSource to attach a data source.
I am able to create both the model and the data source programmatically using the ReportService2005 web service but when I examine the model data source in the web site, the following error is displayed: "The shared data source reference is no longer valid". If I manually associate the model with the newly created data source, it works fine.
The <DataSourceID> is correct in the smdl file. What am I doing wrong? Why won't this work programmatically?
I am using SQL Server 2005 Workgroup Edition. Any help would be greatly appreciated.
Hi,
I am confused about the step of " copying the code from .dsv file and then pasting into the .smdl file". how can I avoid this manual step ?
Please let me know
Regards,
bala
model = model.Replace("</SemanticModel>", dsvText + "\n</SemanticModel>");