Showing posts with label models. Show all posts
Showing posts with label models. Show all posts

Sunday, March 11, 2012

Deploying Reports/Models with WSS 3.0 integrated mode

Using BIDS, and trying to deploy to a newly created reporting server. I can deploy the report but cannot figure out how to display it in the WSS 3.0 teamsite. My document library settings allow 'new report builder report' and 'new report datasource' but I don't see how to upload reports built in BIDS for use in the Sharepoint site.

Models that I created in BIDS I cannot deploy at all. Just get an error saying 'this operation is not supported in sharepoint integrated mode.

Anyone else worked through the deployment of existing datasources and reports yet to a WSS 3.0 reporting server in integrated mode?

If I just upload an RDL file to the document library and try to display it, I get the following:

System.Web.Services.Protocols.SoapException: An internal error occurred on the report server. See the error log for more details. > Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details. > System.InvalidCastException: Specified cast is not valid.
at Microsoft.ReportingServices.Library.Security.get_UserToken()
at Microsoft.ReportingServices.SharePoint.Server.SharePointSecurity.GetCatalogItemPermissions(ItemType catItemType, Byte[] secDesc, String itemPath)
at Microsoft.ReportingServices.Library.GetPermissionsAction.PerformActionNow()
at Microsoft.ReportingServices.Library.RSSoapAction`1.Execute()
End of inner exception stack trace
at Microsoft.ReportingServices.Library.RSSoapAction`1.Execute()
at Microsoft.ReportingServices.WebServer.ReportingService2005Impl.GetPermissions(String Item, String[]& Permissions)
End of inner exception stack trace
at Microsoft.ReportingServices.WebServer.ReportingService2005Impl.GetPermissions(String Item, String[]& Permissions)
at Microsoft.ReportingServices.WebServer.ReportingService2006.GetPermissions(String Item, String[]& Permissions)

Which authentication mode did you choose, on the Reporting Services integration page in Central Admin? SP2 CTP2 only supports Windows Authentication mode.|||

I've changed back to the windows mode. And I'm a little better off. After publishing the RDL file in my shared documents, I'm only lacking a datasource. Can't quite figure out how to get that there.

Maybe it's time to upgrade my visual studio 2005 with the Sharepoint package for wss 3. Would that enable me to publish reports again directly from the BIDS project?

Where I'm stuck then is putting both data models and datasources up on the sharepoint site using the reporting services integrated mode.

|||

Solved the datasource issue by just creating it in the Sharepoint document library. Then hooked it up to the report I had loaded in manually using the 'Upload' menu. For the report you will find a 'manage datasources' context menu item off the report object.

Now if someone comes up with the answer of how to get the data models up to my Sharepoint server so that the report builder can be called on, I'll be in pig heaven.

|||

You can upload an .SMDL file into SharePoint, and it will "just know" that it's a Reporting Services model (because of the file extension).

In CTP3, Models are fully supported -- you can design in Model Designer, autogen from SharePoint, manage drillthroughs and model item security, and launch Report Builder from a model's ECB menu.

|||

Slowly but surely it is coming together. Now, the magical CTP3, when will that be posted?

I have a suggestion for CTP3 if you have not thought of it. These RS documents display context menus in the shared document library. But if I do a search, the search results page does not give me the ability to use the Report/Model/Datasource with the same contextual choices. Same idea when I display things with the 'dependent items' choice (which is a slick feature in and of itself). And the last display I'd expect more of would be the page that opens when you click on the found file would offer the same contextual choices. (reports open fine, but models don't link to the report builder and open)

Now wouldn't that be a totally seamless feature that would sweeten the end-user experience?

BTW, I'm still constructing datasources for each model or report I upload to a document library. Can I simply copy a datasource (extension=rds, or ds) and just change the extension to rsds before uploading it?

Friday, March 9, 2012

deploying report models

Hi Friends
I've quick question ,we have a .net application and we want develop a report builder utility for our end users.I found sql server's built in Report builder is very useful so i created a report model which is easy enough for our end users to select different data items to create their own reports.
My questions is how can i deploy this from our production machine to client site ?what are the requirements etc.,

I have looked web for any references but in vain.
Any help with this regard is much appreciated.
Thank you

Hi --

There are a number of ways to accomplish this:

First, export the model definition (smdl) from the production server using Report Manager.

Then:

- You can bring it to the client site and directly upload it via Report Manager

- You can use the CreateModel() method of the ReportingService2005 web service to programmatically create the model after you load the smdl into an array of bytes

Note that a deployed model contains the DSV definition it is based on inside the smdl document itself. Until you deploy it, the DSV is *not* “plugged” into the smdl file, however….So don’t just create a model using the Model Designer, and then expect to be able to take the resulting smdl and bring it to the client site. You must first deploy it in order to get Visual Studio to merge the DSV into a complete smdl document.

|||Thank you very much Russell.
I understand export and upload options you mentioned but i did not understand your 2nd point. ie

>>You can use the CreateModel() method of the ReportingService2005 web service to programmatically create the model after you load the smdl into an array of bytes

so does it mean that uploading SMDL file at the site will not be enough ,will it?
Thanks for your help on this. I really appreciate if you have some sample code or some links abt these deploying issues.

I looked MS help but they just talk abt deploy option from solution explorer and they dont talk abt deploying on completly different machine.|||As long as you've also uploaded the data source that the DSV in your model uses, just upload the model (smdl) and you'll be fine.|||Thanks Russell.That makes sense.

one more question on this one ,i'll upload data source also thats no problem but how can i change connection string easily. as you know sql server names can be different. we've no of client sites where we need to deploy our reporting models. our database name will be same but as you know server names can be different with each site.

can connection string be taken from a config file ?
Thanks for your help|||You can set the connection string for the model manually in Report Manager (or Management Studio). Bring up the model properties and go to the datasource tabs. If you want to do it programmatically / through script, you will want to call SetItemDataSources (http://msdn2.microsoft.com/en-us/library/ms160404(en-US,SQL.90).aspx).|||Thanks Brian
Will give it a try mate|||

Russell Christopher - msft wrote:

Hi --

There are a number of ways to accomplish this:

First, export the model definition (smdl) from the production server using Report Manager.

Then:

- You can bring it to the client site and directly upload it via Report Manager

- You can use the CreateModel() method of the ReportingService2005 web service to programmatically create the model after you load the smdl into an array of bytes

Russel, Why cant i find "Export " option on report manager page ? or am i missing something ?
anyway i managaed to find .smdl file on my machine (where i created the report model) and on production server i used "upload File" to import my report model and it worked fine and users could create reports fine.
but today i changed report model as users needed few more entities and i tried to deploy again the updated report model with same steps as above. But all existing reports created prior to this stopped working!! i get runtime errors.. but users can create new ones though.
am i doing anything wrong ?
Thanks for your help again. am still trying to get my head around on deploy issues.|||

"Export" is actually labeled "Edit" in Report Manager. It's a very small hyperlink on the General property tab of your report.

I'm not exactly sure why the previously published reports stopped working. Did they work after you reset the data source for each report?

|||Thank you very much Russell
finally i successfully did "export" at client machine.it worked nicely.Thanks you so much for you help on this .
BTW the other issue (ie, previous reports not working) i'll need to do little more testing and i'll see what happens if change report model and re-deploy again on the same client machine.|||

Russell,

I'd like some more information on your point 2, using the CreateModel() method. I know how to reference the ReportingServices2005 web service, and then instantiate it's class. Then I can do (for instance) rs.CreateModel(), but how do I load the smdl into an array of bytes? I've not done that. Do you have an online resource that can explain this process?

And I know that you can use Report Viewer in Visual Studio to avoid sending a user to a report server to view reports. Is this also an option with ad hoc reports? If I use the BI to create a Report Model, and then export it, can I now direct our users to a web page/site that I create (that I can have more control over) in order to avoid sending them to the Report Server?

Thanks in advance.

Marvin Hoffman

|||

FileStream stream = File.OpenRead(@."c:\MyReport.smdl");
definition = new Byte[stream.Length];
stream.Read(definition, 0, (int) stream.Length);
stream.Close();
//Now use CreateModel with "defintion" variable

|||

Hi,

This is what i came up with while searching for a way to create model programaticaly.

Uploading a Report Model

Dim DataSourceName As String = "/Adventure Works"

Dim ModelName As String = "/Adventure Works Model"

Dim MyServer As String = "MyReportServer"

Dim rs As New ReportingService2005

rs.Url = "http://" + MyServer + "/reportserver/reportservice2005.asmx"

rs.Credentials = System.Net.CredentialCache.DefaultCredentials

Dim props = Nothing

Dim modelPath As String = "./Adventure Works Model.smdl"

Dim fs As FileStream

fs = File.OpenRead(modelPath)

Dim modelDefinition As Byte() = New [Byte](fs.Length) {}

fs.Read(modelDefinition, 0, CInt(fs.Length))

fs.Close()

Try

rs.CreateModel("Adventure Works Model", "/", modelDefinition, props)

Catch e As SoapException

Console.WriteLine("Error : " + e.Detail.Item("ErrorCode").InnerText +

" (" + e.Detail.Item("Message").InnerText + ")")

End Try

Creating Data Source

Dim dsDefinition As New DataSourceDefinition

dsDefinition.Extension = "OLEDB-MD"

dsDefinition.CredentialRetrieval = CredentialRetrievalEnum.Integrated

dsDefinition.ConnectString = "data source=" + MyServer + ";initial catalog=Adventure Works DW"

dsDefinition.ImpersonateUserSpecified = True

dsDefinition.Enabled = True

dsDefinition.EnabledSpecified = True

Try

rs.CreateDataSource("Adventure Works", "/", False, dsDefinition, props)

Catch e As SoapException

Console.WriteLine("Error : " + e.Detail.Item("ErrorCode").InnerText +

" (" + e.Detail.Item("Message").InnerText + ")")

End Try

Associating Report Model with Data Source

Dim ds() As DataSource

ds = rs.GetItemDataSources(ModelName)

Dim dsref As New DataSourceReference

dsref.Reference = DataSourceName

ds(0).Item = dsref

Try

rs.SetItemDataSources("/Adventure Works Model", ds)

Catch e As SoapException

Console.WriteLine("Error : " + e.Detail.Item("ErrorCode").InnerText +

" (" + e.Detail.Item("Message").InnerText + ")")

End Try

deploying report models

Hi Friends
I've quick question ,we have a .net application and we want develop a report builder utility for our end users.I found sql server's built in Report builder is very useful so i created a report model which is easy enough for our end users to select different data items to create their own reports.
My questions is how can i deploy this from our production machine to client site ?what are the requirements etc.,

I have looked web for any references but in vain.
Any help with this regard is much appreciated.
Thank you

Hi --

There are a number of ways to accomplish this:

First, export the model definition (smdl) from the production server using Report Manager.

Then:

- You can bring it to the client site and directly upload it via Report Manager

- You can use the CreateModel() method of the ReportingService2005 web service to programmatically create the model after you load the smdl into an array of bytes

Note that a deployed model contains the DSV definition it is based on inside the smdl document itself. Until you deploy it, the DSV is *not* “plugged” into the smdl file, however….So don’t just create a model using the Model Designer, and then expect to be able to take the resulting smdl and bring it to the client site. You must first deploy it in order to get Visual Studio to merge the DSV into a complete smdl document.

|||Thank you very much Russell.
I understand export and upload options you mentioned but i did not understand your 2nd point. ie

>>You can use the CreateModel() method of the ReportingService2005 web service to programmatically create the model after you load the smdl into an array of bytes

so does it mean that uploading SMDL file at the site will not be enough ,will it?
Thanks for your help on this. I really appreciate if you have some sample code or some links abt these deploying issues.

I looked MS help but they just talk abt deploy option from solution explorer and they dont talk abt deploying on completly different machine.|||As long as you've also uploaded the data source that the DSV in your model uses, just upload the model (smdl) and you'll be fine.|||Thanks Russell.That makes sense.

one more question on this one ,i'll upload data source also thats no problem but how can i change connection string easily. as you know sql server names can be different. we've no of client sites where we need to deploy our reporting models. our database name will be same but as you know server names can be different with each site.

can connection string be taken from a config file ?
Thanks for your help|||You can set the connection string for the model manually in Report Manager (or Management Studio). Bring up the model properties and go to the datasource tabs. If you want to do it programmatically / through script, you will want to call SetItemDataSources (http://msdn2.microsoft.com/en-us/library/ms160404(en-US,SQL.90).aspx).|||Thanks Brian
Will give it a try mate|||

Russell Christopher - msft wrote:

Hi --

There are a number of ways to accomplish this:

First, export the model definition (smdl) from the production server using Report Manager.

Then:

- You can bring it to the client site and directly upload it via Report Manager

- You can use the CreateModel() method of the ReportingService2005 web service to programmatically create the model after you load the smdl into an array of bytes

Russel, Why cant i find "Export " option on report manager page ? or am i missing something ?
anyway i managaed to find .smdl file on my machine (where i created the report model) and on production server i used "upload File" to import my report model and it worked fine and users could create reports fine.
but today i changed report model as users needed few more entities and i tried to deploy again the updated report model with same steps as above. But all existing reports created prior to this stopped working!! i get runtime errors.. but users can create new ones though.
am i doing anything wrong ?
Thanks for your help again. am still trying to get my head around on deploy issues.|||

"Export" is actually labeled "Edit" in Report Manager. It's a very small hyperlink on the General property tab of your report.

I'm not exactly sure why the previously published reports stopped working. Did they work after you reset the data source for each report?

|||Thank you very much Russell
finally i successfully did "export" at client machine.it worked nicely.Thanks you so much for you help on this .
BTW the other issue (ie, previous reports not working) i'll need to do little more testing and i'll see what happens if change report model and re-deploy again on the same client machine.|||

Russell,

I'd like some more information on your point 2, using the CreateModel() method. I know how to reference the ReportingServices2005 web service, and then instantiate it's class. Then I can do (for instance) rs.CreateModel(), but how do I load the smdl into an array of bytes? I've not done that. Do you have an online resource that can explain this process?

And I know that you can use Report Viewer in Visual Studio to avoid sending a user to a report server to view reports. Is this also an option with ad hoc reports? If I use the BI to create a Report Model, and then export it, can I now direct our users to a web page/site that I create (that I can have more control over) in order to avoid sending them to the Report Server?

Thanks in advance.

Marvin Hoffman

|||

FileStream stream = File.OpenRead(@."c:\MyReport.smdl");
definition = new Byte[stream.Length];
stream.Read(definition, 0, (int) stream.Length);
stream.Close();
//Now use CreateModel with "defintion" variable

|||

Hi,

This is what i came up with while searching for a way to create model programaticaly.

Uploading a Report Model

Dim DataSourceName As String = "/Adventure Works"

Dim ModelName As String = "/Adventure Works Model"

Dim MyServer As String = "MyReportServer"

Dim rs As New ReportingService2005

rs.Url = "http://" + MyServer + "/reportserver/reportservice2005.asmx"

rs.Credentials = System.Net.CredentialCache.DefaultCredentials

Dim props = Nothing

Dim modelPath As String = "./Adventure Works Model.smdl"

Dim fs As FileStream

fs = File.OpenRead(modelPath)

Dim modelDefinition As Byte() = New [Byte](fs.Length) {}

fs.Read(modelDefinition, 0, CInt(fs.Length))

fs.Close()

Try

rs.CreateModel("Adventure Works Model", "/", modelDefinition, props)

Catch e As SoapException

Console.WriteLine("Error : " + e.Detail.Item("ErrorCode").InnerText +

" (" + e.Detail.Item("Message").InnerText + ")")

End Try

Creating Data Source

Dim dsDefinition As New DataSourceDefinition

dsDefinition.Extension = "OLEDB-MD"

dsDefinition.CredentialRetrieval = CredentialRetrievalEnum.Integrated

dsDefinition.ConnectString = "data source=" + MyServer + ";initial catalog=Adventure Works DW"

dsDefinition.ImpersonateUserSpecified = True

dsDefinition.Enabled = True

dsDefinition.EnabledSpecified = True

Try

rs.CreateDataSource("Adventure Works", "/", False, dsDefinition, props)

Catch e As SoapException

Console.WriteLine("Error : " + e.Detail.Item("ErrorCode").InnerText +

" (" + e.Detail.Item("Message").InnerText + ")")

End Try

Associating Report Model with Data Source

Dim ds() As DataSource

ds = rs.GetItemDataSources(ModelName)

Dim dsref As New DataSourceReference

dsref.Reference = DataSourceName

ds(0).Item = dsref

Try

rs.SetItemDataSources("/Adventure Works Model", ds)

Catch e As SoapException

Console.WriteLine("Error : " + e.Detail.Item("ErrorCode").InnerText +

" (" + e.Detail.Item("Message").InnerText + ")")

End Try

deploying report models

Hi Friends
I've quick question ,we have a .net application and we want develop a report builder utility for our end users.I found sql server's built in Report builder is very useful so i created a report model which is easy enough for our end users to select different data items to create their own reports.
My questions is how can i deploy this from our production machine to client site ?what are the requirements etc.,

I have looked web for any references but in vain.
Any help with this regard is much appreciated.
Thank you

Hi --

There are a number of ways to accomplish this:

First, export the model definition (smdl) from the production server using Report Manager.

Then:

- You can bring it to the client site and directly upload it via Report Manager

- You can use the CreateModel() method of the ReportingService2005 web service to programmatically create the model after you load the smdl into an array of bytes

Note that a deployed model contains the DSV definition it is based on inside the smdl document itself. Until you deploy it, the DSV is *not* “plugged” into the smdl file, however….So don’t just create a model using the Model Designer, and then expect to be able to take the resulting smdl and bring it to the client site. You must first deploy it in order to get Visual Studio to merge the DSV into a complete smdl document.

|||Thank you very much Russell.
I understand export and upload options you mentioned but i did not understand your 2nd point. ie

>>You can use the CreateModel() method of the ReportingService2005 web service to programmatically create the model after you load the smdl into an array of bytes

so does it mean that uploading SMDL file at the site will not be enough ,will it?
Thanks for your help on this. I really appreciate if you have some sample code or some links abt these deploying issues.

I looked MS help but they just talk abt deploy option from solution explorer and they dont talk abt deploying on completly different machine.|||As long as you've also uploaded the data source that the DSV in your model uses, just upload the model (smdl) and you'll be fine.|||Thanks Russell.That makes sense.

one more question on this one ,i'll upload data source also thats no problem but how can i change connection string easily. as you know sql server names can be different. we've no of client sites where we need to deploy our reporting models. our database name will be same but as you know server names can be different with each site.

can connection string be taken from a config file ?
Thanks for your help|||You can set the connection string for the model manually in Report Manager (or Management Studio). Bring up the model properties and go to the datasource tabs. If you want to do it programmatically / through script, you will want to call SetItemDataSources (http://msdn2.microsoft.com/en-us/library/ms160404(en-US,SQL.90).aspx).|||Thanks Brian
Will give it a try mate|||

Russell Christopher - msft wrote:

Hi --

There are a number of ways to accomplish this:

First, export the model definition (smdl) from the production server using Report Manager.

Then:

- You can bring it to the client site and directly upload it via Report Manager

- You can use the CreateModel() method of the ReportingService2005 web service to programmatically create the model after you load the smdl into an array of bytes

Russel, Why cant i find "Export " option on report manager page ? or am i missing something ?
anyway i managaed to find .smdl file on my machine (where i created the report model) and on production server i used "upload File" to import my report model and it worked fine and users could create reports fine.
but today i changed report model as users needed few more entities and i tried to deploy again the updated report model with same steps as above. But all existing reports created prior to this stopped working!! i get runtime errors.. but users can create new ones though.
am i doing anything wrong ?
Thanks for your help again. am still trying to get my head around on deploy issues.|||

"Export" is actually labeled "Edit" in Report Manager. It's a very small hyperlink on the General property tab of your report.

I'm not exactly sure why the previously published reports stopped working. Did they work after you reset the data source for each report?

|||Thank you very much Russell
finally i successfully did "export" at client machine.it worked nicely.Thanks you so much for you help on this .
BTW the other issue (ie, previous reports not working) i'll need to do little more testing and i'll see what happens if change report model and re-deploy again on the same client machine.|||

Russell,

I'd like some more information on your point 2, using the CreateModel() method. I know how to reference the ReportingServices2005 web service, and then instantiate it's class. Then I can do (for instance) rs.CreateModel(), but how do I load the smdl into an array of bytes? I've not done that. Do you have an online resource that can explain this process?

And I know that you can use Report Viewer in Visual Studio to avoid sending a user to a report server to view reports. Is this also an option with ad hoc reports? If I use the BI to create a Report Model, and then export it, can I now direct our users to a web page/site that I create (that I can have more control over) in order to avoid sending them to the Report Server?

Thanks in advance.

Marvin Hoffman

|||

FileStream stream = File.OpenRead(@."c:\MyReport.smdl");
definition = new Byte[stream.Length];
stream.Read(definition, 0, (int) stream.Length);
stream.Close();
//Now use CreateModel with "defintion" variable

|||

Hi,

This is what i came up with while searching for a way to create model programaticaly.

Uploading a Report Model

Dim DataSourceName As String = "/Adventure Works"

Dim ModelName As String = "/Adventure Works Model"

Dim MyServer As String = "MyReportServer"

Dim rs As New ReportingService2005

rs.Url = "http://" + MyServer + "/reportserver/reportservice2005.asmx"

rs.Credentials = System.Net.CredentialCache.DefaultCredentials

Dim props = Nothing

Dim modelPath As String = "./Adventure Works Model.smdl"

Dim fs As FileStream

fs = File.OpenRead(modelPath)

Dim modelDefinition As Byte() = New [Byte](fs.Length) {}

fs.Read(modelDefinition, 0, CInt(fs.Length))

fs.Close()

Try

rs.CreateModel("Adventure Works Model", "/", modelDefinition, props)

Catch e As SoapException

Console.WriteLine("Error : " + e.Detail.Item("ErrorCode").InnerText +

" (" + e.Detail.Item("Message").InnerText + ")")

End Try

Creating Data Source

Dim dsDefinition As New DataSourceDefinition

dsDefinition.Extension = "OLEDB-MD"

dsDefinition.CredentialRetrieval = CredentialRetrievalEnum.Integrated

dsDefinition.ConnectString = "data source=" + MyServer + ";initial catalog=Adventure Works DW"

dsDefinition.ImpersonateUserSpecified = True

dsDefinition.Enabled = True

dsDefinition.EnabledSpecified = True

Try

rs.CreateDataSource("Adventure Works", "/", False, dsDefinition, props)

Catch e As SoapException

Console.WriteLine("Error : " + e.Detail.Item("ErrorCode").InnerText +

" (" + e.Detail.Item("Message").InnerText + ")")

End Try

Associating Report Model with Data Source

Dim ds() As DataSource

ds = rs.GetItemDataSources(ModelName)

Dim dsref As New DataSourceReference

dsref.Reference = DataSourceName

ds(0).Item = dsref

Try

rs.SetItemDataSources("/Adventure Works Model", ds)

Catch e As SoapException

Console.WriteLine("Error : " + e.Detail.Item("ErrorCode").InnerText +

" (" + e.Detail.Item("Message").InnerText + ")")

End Try

deploying report models

Hi Friends
I've quick question ,we have a .net application and we want develop a report builder utility for our end users.I found sql server's built in Report builder is very useful so i created a report model which is easy enough for our end users to select different data items to create their own reports.
My questions is how can i deploy this from our production machine to client site ?what are the requirements etc.,

I have looked web for any references but in vain.
Any help with this regard is much appreciated.
Thank you

Hi --

There are a number of ways to accomplish this:

First, export the model definition (smdl) from the production server using Report Manager.

Then:

- You can bring it to the client site and directly upload it via Report Manager

- You can use the CreateModel() method of the ReportingService2005 web service to programmatically create the model after you load the smdl into an array of bytes

Note that a deployed model contains the DSV definition it is based on inside the smdl document itself. Until you deploy it, the DSV is *not* “plugged” into the smdl file, however….So don’t just create a model using the Model Designer, and then expect to be able to take the resulting smdl and bring it to the client site. You must first deploy it in order to get Visual Studio to merge the DSV into a complete smdl document.

|||Thank you very much Russell.
I understand export and upload options you mentioned but i did not understand your 2nd point. ie

>>You can use the CreateModel() method of the ReportingService2005 web service to programmatically create the model after you load the smdl into an array of bytes

so does it mean that uploading SMDL file at the site will not be enough ,will it?
Thanks for your help on this. I really appreciate if you have some sample code or some links abt these deploying issues.

I looked MS help but they just talk abt deploy option from solution explorer and they dont talk abt deploying on completly different machine.|||As long as you've also uploaded the data source that the DSV in your model uses, just upload the model (smdl) and you'll be fine.|||Thanks Russell.That makes sense.

one more question on this one ,i'll upload data source also thats no problem but how can i change connection string easily. as you know sql server names can be different. we've no of client sites where we need to deploy our reporting models. our database name will be same but as you know server names can be different with each site.

can connection string be taken from a config file ?
Thanks for your help|||You can set the connection string for the model manually in Report Manager (or Management Studio). Bring up the model properties and go to the datasource tabs. If you want to do it programmatically / through script, you will want to call SetItemDataSources (http://msdn2.microsoft.com/en-us/library/ms160404(en-US,SQL.90).aspx).|||Thanks Brian
Will give it a try mate|||

Russell Christopher - msft wrote:

Hi --

There are a number of ways to accomplish this:

First, export the model definition (smdl) from the production server using Report Manager.

Then:

- You can bring it to the client site and directly upload it via Report Manager

- You can use the CreateModel() method of the ReportingService2005 web service to programmatically create the model after you load the smdl into an array of bytes

Russel, Why cant i find "Export " option on report manager page ? or am i missing something ?
anyway i managaed to find .smdl file on my machine (where i created the report model) and on production server i used "upload File" to import my report model and it worked fine and users could create reports fine.
but today i changed report model as users needed few more entities and i tried to deploy again the updated report model with same steps as above. But all existing reports created prior to this stopped working!! i get runtime errors.. but users can create new ones though.
am i doing anything wrong ?
Thanks for your help again. am still trying to get my head around on deploy issues.|||

"Export" is actually labeled "Edit" in Report Manager. It's a very small hyperlink on the General property tab of your report.

I'm not exactly sure why the previously published reports stopped working. Did they work after you reset the data source for each report?

|||Thank you very much Russell
finally i successfully did "export" at client machine.it worked nicely.Thanks you so much for you help on this .
BTW the other issue (ie, previous reports not working) i'll need to do little more testing and i'll see what happens if change report model and re-deploy again on the same client machine.|||

Russell,

I'd like some more information on your point 2, using the CreateModel() method. I know how to reference the ReportingServices2005 web service, and then instantiate it's class. Then I can do (for instance) rs.CreateModel(), but how do I load the smdl into an array of bytes? I've not done that. Do you have an online resource that can explain this process?

And I know that you can use Report Viewer in Visual Studio to avoid sending a user to a report server to view reports. Is this also an option with ad hoc reports? If I use the BI to create a Report Model, and then export it, can I now direct our users to a web page/site that I create (that I can have more control over) in order to avoid sending them to the Report Server?

Thanks in advance.

Marvin Hoffman

|||

FileStream stream = File.OpenRead(@."c:\MyReport.smdl");
definition = new Byte[stream.Length];
stream.Read(definition, 0, (int) stream.Length);
stream.Close();
//Now use CreateModel with "defintion" variable

|||

Hi,

This is what i came up with while searching for a way to create model programaticaly.

Uploading a Report Model

Dim DataSourceName As String = "/Adventure Works"

Dim ModelName As String = "/Adventure Works Model"

Dim MyServer As String = "MyReportServer"

Dim rs As New ReportingService2005

rs.Url = "http://" + MyServer + "/reportserver/reportservice2005.asmx"

rs.Credentials = System.Net.CredentialCache.DefaultCredentials

Dim props = Nothing

Dim modelPath As String = "./Adventure Works Model.smdl"

Dim fs As FileStream

fs = File.OpenRead(modelPath)

Dim modelDefinition As Byte() = New [Byte](fs.Length) {}

fs.Read(modelDefinition, 0, CInt(fs.Length))

fs.Close()

Try

rs.CreateModel("Adventure Works Model", "/", modelDefinition, props)

Catch e As SoapException

Console.WriteLine("Error : " + e.Detail.Item("ErrorCode").InnerText +

" (" + e.Detail.Item("Message").InnerText + ")")

End Try

Creating Data Source

Dim dsDefinition As New DataSourceDefinition

dsDefinition.Extension = "OLEDB-MD"

dsDefinition.CredentialRetrieval = CredentialRetrievalEnum.Integrated

dsDefinition.ConnectString = "data source=" + MyServer + ";initial catalog=Adventure Works DW"

dsDefinition.ImpersonateUserSpecified = True

dsDefinition.Enabled = True

dsDefinition.EnabledSpecified = True

Try

rs.CreateDataSource("Adventure Works", "/", False, dsDefinition, props)

Catch e As SoapException

Console.WriteLine("Error : " + e.Detail.Item("ErrorCode").InnerText +

" (" + e.Detail.Item("Message").InnerText + ")")

End Try

Associating Report Model with Data Source

Dim ds() As DataSource

ds = rs.GetItemDataSources(ModelName)

Dim dsref As New DataSourceReference

dsref.Reference = DataSourceName

ds(0).Item = dsref

Try

rs.SetItemDataSources("/Adventure Works Model", ds)

Catch e As SoapException

Console.WriteLine("Error : " + e.Detail.Item("ErrorCode").InnerText +

" (" + e.Detail.Item("Message").InnerText + ")")

End Try

Wednesday, March 7, 2012

Deploying a Report Model

First, let me freely admit I know nothing about report models or how to deploy them. I was trying to learn by going through the tutorials. The creating part I get, but the deployment part seems to be over my head.

The error message I get is "A connection cannot be made to the report server http://hqjds02/Reports."

I don't understand why. Yeah...I get that it can't connect for some reason. Probably because I have messed things up somehow.

This is how I've got the deployment properties set:

TargetDataSourceFolder: Development (DV)/Data Sources

TargetModelFolder: Development (DV)/Models

TargetServerURL: http://hqjds02/Reports

In searching for an answer earlier I saw where someone wrote that I should be able to go to the URL and copy and paste it from IE. The actual URL is http://hqjds02/Reports/Pages/Folder.aspx?ItemPath=%2fDevelopment+(DV)&ViewMode=Detail . I tried it, but it didn't work.

What am I doing wrong?

Thanks,

Jennifer

Never mind. I finally figured it out. Smile

Friday, February 24, 2012

Deploy Report Model without VS

Is it possible to deploy report models without Visual Studio?
I ask this for when it comes to deploy an ASP.NET project to a
customer that includes reports and they would like to use the Report
Builder.
I've heard use of the RS Web Service but I have not seen any code.
This would normally be a one time event at time of deployment to
production but could involve future updates. These future update
deployments would not be possible with VS (except for the actual
editing of the update).I've used rs.exe to create folders, datasources, and reports, but what
I'm conerned about is the Models folder, the datasource view and
anything else that the "Report Builder" needs before it can be run for
the first time by the end users.