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

Monday, March 12, 2012

Manipulating and deploying report models

All, we are reviewing the ad hoc report builder in SSRS 2005. This could be a big boon to our clients. But we have to be able to do some things first. First of all when we define our datasource view we need to be able to "filter" the available data in the view prior to being "delivered" to the report builder app the client gets to manipulate. We don't currently see a way to do this. But I'm working on it.

I'm thinking we may need to go the manual manipulation route using the Reporting Service2005 web service. So in a nutshell, I need to be able to pre filter the data a client gets prior to using the ad hoc report builder, we have too many clients to create views for each of them. So I've started giving it a go.

Thanks in advance

Marvin Hoffman

here's what I have so far, and it seems to be working, but I think maybe the URL is wrong, or I'm not calling the model name correctly. I'm getting this error "Client found response content type of '', but expected 'text/xml'.
The request failed with an empty response.
"

using System;

using System.Data;

using System.Configuration;

using System.Collections;

using System.Net;

using System.Web;

using System.Web.Security;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;

using System.Web.UI.HtmlControls;

using ReportServiceAPI;

public partial class ReportBuilderExample : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

ReportingService2005 rs = new ReportingService2005();

rs.Url = "http://servername/reportserver/ReportingService2005.asmx";

NetworkCredential nc = new NetworkCredential("username", "password");

rs.Credentials = nc;

byte[] b = rs.GetModelDefinition("modelname");

}

}

I think that model name includes path and should start with slash, i.e.

byte[] b = rs.GetModelDefinition("/modelname");

Wednesday, March 7, 2012

Managing reporting services models

Hi everybody,

I have the following scenario: I have web application which is creting new SQL Server database each time when new customer is created in the application.

I would like to give users the possibility of creating ad hoc reports and thus I need to create new connection and report model (and deploy them to my reoport server) each time when the new database is created (report models can not use multiple databases). Does anybody knows how can I do that?

Maybe there is another approach to this kind of problem?

Thank you in advance,

Marek

You can create datasources and autogenerate models from these datasources using the SSRS SOAP API. Check out this article in BOL for information on how to get started using the SOAP API:

http://msdn2.microsoft.com/en-us/library/ms159162.aspx