Showing posts with label built. Show all posts
Showing posts with label built. Show all posts

Thursday, March 29, 2012

Description for Calculated Members

You can add descriptions to measures that are built under the Cube Structure tab. But I cannot see how to add a description to a Calculated Member. Is it possible to add a description to a Calculated Member?
Looks like this has already been answered.

Anyone interested, here is the link.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=325816&SiteID=1
|||You might be interested in looking at BIDSHelper www.codeplex.com/bidshelper it's free addin for BI Development Studio that adds a number of useful features including the ability to add descriptions to calculated members (through the member properties dialog) http://www.codeplex.com/bidshelper/Wiki/View.aspx?title=Calculation%20Helpers&referringTitle=Home

Tuesday, March 27, 2012

Derived column not processing any records

Hi,

I have built a package in which i use a derived column to create a new set of columns and then pass the same to another target transformation.

The issue now what I am facing is, the re are certain number of records coming from source(16 rows) and gets processed before the Derived Column transformation, but after that, no records gets processed after the derived column transformation.

The package status shows as Success, but there is no records being written in the target table.

Any idea what could be the issue here?

Thanks,

Manish

Have you used data viewers on the data flow to see why records are not "passing" through? The records HAVE to go through the derived column -- it can't stop them.

Are you positive the records are not coming out of the derived column transformation?|||

Are no records being written to your destination, or you're just missing the derived values?

If the latter, I'd also check your column mappings in your destination (or any transformations downstream of your Derived Column Trx and upstream of your destination) to make sure your new columns are mapped. This is particularly important if you added the Derived Column Trx later in the development of your data flow. The mappings won't automatically appear.

|||

Hi Phil,

Thanks for the response.

Yes, I have put data viewers before and after the derived column transformation. The data viewer before the transformation shows the 13 records being passed, but the data viewer after the transformation doesnt show up any record, it is blank. I have tried many option in the mapping, but no luck.

I am now re-creating the mapping to check if the issue persists.

THough, let me know if you can think of any other scenario which could help in resolving this.

Thanks,

Manish

|||

ManishSingh wrote:

Hi Phil,

Thanks for the response.

Yes, I have put data viewers before and after the derived column transformation. The data viewer before the transformation shows the 13 records being passed, but the data viewer after the transformation doesnt show up any record, it is blank. I have tried many option in the mapping, but no luck.

I am now re-creating the mapping to check if the issue persists.

THough, let me know if you can think of any other scenario which could help in resolving this.

Thanks,

Manish

What mapping? There are no mappings in the derived column transformation.|||By mapping I was referring to the package. I tried various options to delete transformation and add another etc in the package to check for the data flow|||

ManishSingh wrote:

By mapping I was referring to the package. I tried various options to delete transformation and add another etc in the package to check for the data flow

Make a copy of your package for this test.

Leave everything as is, but remove EVERYTHING AFTER the derived column transformation and add a row count transformation. Hook it up to the derived column transformation. This will be your new destination. You'll need to add a variable for the row counter, of course.

Run the package. What happens? Does the derived column pass all rows through now?|||

Phil,

Thanks for your response. I was out of office, so couldnt reply back.

I tried adding the row count as the destination after the derived column transformation, and it was running successfully. Then again, I removed the row count and added the transformation again, and it started working. I am not sure, what could be the issue, but now its running fine.

Thanks for all your help. Really appreciate it!!!!!!!!

sql

Derived column not processing any records

Hi,

I have built a package in which i use a derived column to create a new set of columns and then pass the same to another target transformation.

The issue now what I am facing is, the re are certain number of records coming from source(16 rows) and gets processed before the Derived Column transformation, but after that, no records gets processed after the derived column transformation.

The package status shows as Success, but there is no records being written in the target table.

Any idea what could be the issue here?

Thanks,

Manish

Have you used data viewers on the data flow to see why records are not "passing" through? The records HAVE to go through the derived column -- it can't stop them.

Are you positive the records are not coming out of the derived column transformation?|||

Are no records being written to your destination, or you're just missing the derived values?

If the latter, I'd also check your column mappings in your destination (or any transformations downstream of your Derived Column Trx and upstream of your destination) to make sure your new columns are mapped. This is particularly important if you added the Derived Column Trx later in the development of your data flow. The mappings won't automatically appear.

|||

Hi Phil,

Thanks for the response.

Yes, I have put data viewers before and after the derived column transformation. The data viewer before the transformation shows the 13 records being passed, but the data viewer after the transformation doesnt show up any record, it is blank. I have tried many option in the mapping, but no luck.

I am now re-creating the mapping to check if the issue persists.

THough, let me know if you can think of any other scenario which could help in resolving this.

Thanks,

Manish

|||

ManishSingh wrote:

Hi Phil,

Thanks for the response.

Yes, I have put data viewers before and after the derived column transformation. The data viewer before the transformation shows the 13 records being passed, but the data viewer after the transformation doesnt show up any record, it is blank. I have tried many option in the mapping, but no luck.

I am now re-creating the mapping to check if the issue persists.

THough, let me know if you can think of any other scenario which could help in resolving this.

Thanks,

Manish

What mapping? There are no mappings in the derived column transformation.|||By mapping I was referring to the package. I tried various options to delete transformation and add another etc in the package to check for the data flow|||

ManishSingh wrote:

By mapping I was referring to the package. I tried various options to delete transformation and add another etc in the package to check for the data flow

Make a copy of your package for this test.

Leave everything as is, but remove EVERYTHING AFTER the derived column transformation and add a row count transformation. Hook it up to the derived column transformation. This will be your new destination. You'll need to add a variable for the row counter, of course.

Run the package. What happens? Does the derived column pass all rows through now?|||

Phil,

Thanks for your response. I was out of office, so couldnt reply back.

I tried adding the row count as the destination after the derived column transformation, and it was running successfully. Then again, I removed the row count and added the transformation again, and it started working. I am not sure, what could be the issue, but now its running fine.

Thanks for all your help. Really appreciate it!!!!!!!!

Wednesday, March 21, 2012

Deployment files needed by sqlserver 2005 driver

Hello all

I built an application that connect to MS SqlServer2005 using Native driver (sqlncli.msi) I install that file from MS site, I need to deply my application to the end-user, and I would like to know what files do I need to deploy to make sure the application is gona run okay on the client PC's.

I search in the registry for the driver, and I found this "sqlncli.dll", is it enough or I need to include more files !!

Thanks and best regrdas

Waleed

SQLNCLI does not have specific dependencies, however your customers should have MDAC installed, which should be not a problem with the recent releases of Windows.

See also http://technet.microsoft.com/en-us/library/ms131334.aspx

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 website with user authentication - getting errors

I have built a site that uses form-based authentication. Am I correct in assuming that the users and passwords will be stored in the SQLServer database in the aspnetdb.mdf file? The website works great and the authentication works how I want it to. However, I've tried to copy over the file onto a remote machine. The first page is a login screen and this is displayed without any problems but as soon as I attempt to log in I get an error message of:

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)


I'm wondering if this is something to do with the fact I installed SQLServer Express edition on the remote machine. The website works no problem on the local machine in debug mode of Visual Studio 2005 (Professional Edition). I followed instructions to enable remote connections on SQLServer Express from a Microsoft support doc. If anybody can point me in the right direction I'll be very grateful as I've hit a wall here.

Did you check the connection string in web.config if it is pointing to the right server. Also, if you are using aspnetdb.mdf, you should have at least SQL Server Express edition installed on the machine hosting the website.

|||

Hi. Thanks for replying. The only connection string I have in my webconfig file is for an Oracle database that I access elsewhere in the website. Since the original website works in the debug mode of Vis Studio 2005 without any other connection string then I just copied the webconfig file over to the remote server as it was. Does that mean I have to add a connection string to the aspnetdb.mdf file? (The server has SQLServer Express installed on it.)

|||

Have a look at this and try adding a connectionstring to the server.
https://help.maximumasp.com/SmarterTicket/Customer/KBArticle.aspx?articleid=878

You might have to attach the local mdf file using this in the connection string.

AttachDBFilename=|DataDirectory|aspnet.mdf 
connectionStrings> <remove name="LocalSqlServer" /> <add name="LocalSqlServer" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/></connectionStrings>

Saturday, February 25, 2012

Deployed files reduced size

I am wondering why deployed packages are so much smaller than built packages. What is removed and why isn't it removed when the packages are built?

I have a package that goes from 3Mb to 1.5Mb

Any answers|||We don't remove anything from package during deployment. The things that may affect package size:
1) XML encoding. UTF-16 (usually called just "Unicode") may take twice as much as UTF-8. I think we use UTF-8 in most places, but not sure.
2) Encryption. If you encrypt the whole package (instead of just sensitive information) it may noticeably increase package size.
How you do deploy, and to what location?|||

You're spot on with the unicode, which concerns me.

The package file in the bin folder is unicode with no directive in the xml clause i.e. <?xml version="1.0"?>, the deployed file is utf-8 but with the same xml directive.

The file is deployed by double clicking on the deployment manifest and selecting "file system".

Surely this is a problem if the package contains unicode, whats more it means the file being deployed isn't the file that is built. Thats not common practice

|||Interesting. Did you do anything special with the package?

I always get utf-8 encoded DTSX files (you are right, without encoding specified in XML clause): both the project folder and bin folder contain utf-8 encoded files. I don't know a way to make designer save utf-16 files.

Friday, February 24, 2012

Deploy on the hoster

Dears,

I have devoloped an application ASP.NET 2.0.

Before I have builded the aspnetdb throught the command then I built some tables and stored procedures on this db. (My db is sql express 2005 and my hoster db is sql 2005 workgroup)

My hoster doesn't allow connection Management studio express, doesn't allow attach or restore functionalities.

Than I have built my script db (contains Tables, Views and Stored Procedures), I have substituted the dbo with my user account in the script because my hoster doesn't allow the dbo access.

I have also transfered my site files (.aspx, img, etc.) on the server.

When I try to access the db I receive this error (for example when I push on the button create user):

The SSE Provider did not find the database file specified in the connection string. At the configured trust level (below High trust level), the SSE provider can not automatically create the database file.

Please could you help me?

Thank you.

I Forgot one thing!!

For allow the access throught an user different from dbo I have modified the "ASP.NET Provider Toolkit SQL Samples".

Thank you

Friday, February 17, 2012

Dependency Network Graph Question

I have some problems in understanding the dependency network graph which is built in the association rules algorithm. My questions are:

1) Assuming an arrow goes from Node A to Node B ( A --> B), is Node A dependent from Node B or is Node B dependent from Node A?
2) Are only rules used with one element on each side of the rule (itemset size = 2) or is the graph also influenced by rules with more elements?
3) it is said that the slider on the left side is related to the probability of the rules. when viewing my rules table I don't understand why some rules are viewable later then other ones because they have the same probability. Is there another parameter influencing this slider? Which one?

I would be grateful for your help!

Regards, David

1: read it as A -> B, that means that the presence of A imples the presence of B.

2: The dep net currently only uses rules generated from two itemsets

3: I believe the slider is more the importance of the rule than the probability. A rule A->B where both occur 100% in the data isn't very interesting, so I think that's what you are seeing.