Showing posts with label studio. Show all posts
Showing posts with label studio. Show all posts

Friday, March 23, 2012

Link Report Builder with Visual Studio C#

How call a method of Visual Studio after close Report Builder?

Then in this method I must obtain the path and the name of created report with Report Builder.

Thanks for help me.

This is not supported. Interesting idea, though.

Wednesday, March 21, 2012

Linefeed Issue

All,
Why does chr(13) +chr(10) create a new line feed in Visual Studio, but does
not when you render using IE with the HTML viewer?
Any ideas'
JimWhich build are you running?
Did you try using the predefined VB constant VbCrLf ?
E.g. ="First line" & VbCrLf & "second line"
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Jim_OLAP" <JimOLAP@.discussions.microsoft.com> wrote in message
news:0EF1FE67-E355-49B6-BB08-18C247E7E321@.microsoft.com...
> All,
> Why does chr(13) +chr(10) create a new line feed in Visual Studio, but
> does
> not when you render using IE with the HTML viewer?
> Any ideas'
> Jim
>|||Robert,
Thanks for the reply; Yes, I tried the Vb constant but I still get
inconsistent line feeds in IE. As a solution, I had to make each line the
same character length using a combination of left() and format().
Thanks,
Jim
"Robert Bruckner [MSFT]" wrote:
> Which build are you running?
> Did you try using the predefined VB constant VbCrLf ?
> E.g. ="First line" & VbCrLf & "second line"
> -- Robert
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Jim_OLAP" <JimOLAP@.discussions.microsoft.com> wrote in message
> news:0EF1FE67-E355-49B6-BB08-18C247E7E321@.microsoft.com...
> > All,
> >
> > Why does chr(13) +chr(10) create a new line feed in Visual Studio, but
> > does
> > not when you render using IE with the HTML viewer?
> >
> > Any ideas'
> >
> > Jim
> >
>
>

Linear Regression and tolking the coefficient for each variabel?

When using linear regression in the SQL Server 2005 Business IntelIigence Studio I interpet the information below as follow: X has a standard deviation of +- 37.046. Is it possible to obtain the standard deviation of each coefficient in the regression expression?

You can get the variance of the coefficients from node_distribution of linear regression root node. The following DMX query will return the information you need:

select flattened Node_Distribution from [Model Name].Content where Node_type = 25

The query result is a DataTable with the following column names:

Node_Distribution.ATTRIBUTE_NAMENode_Distribution.ATTRIBUTE_VALUE

Node_Distribution.SUPPORTNode_Distribution.PROBABILITYNode_Distribution.VARIANCE

Node_Distribution.VALUETYPE

And the data rows will look like this:

C5Missing00.007874015748031501

C5228.58812310000.99212598425196997913.5033

C431.9528749318584006.737398583630157

C432.1589801071577000 8

C45.29710479474068006.737398583630159

59.33039676663630090944.677980779511

The rows with a value type 7 (emphasized in above table) contain the information you need. You might need to write a small C# program to iterate through the resulting datable to get the information you want.

Thanks,

Linear Regression and tolking the coefficient for each variabel?

When using linear regression in the SQL Server 2005 Business IntelIigence Studio I interpet the information below as follow: X has a standard deviation of +- 37.046. Is it possible to obtain the standard deviation of each coefficient in the regression expression?

You can get the variance of the coefficients from node_distribution of linear regression root node. The following DMX query will return the information you need:

select flattened Node_Distribution from [Model Name].Content where Node_type = 25

The query result is a DataTable with the following column names:

Node_Distribution.ATTRIBUTE_NAMENode_Distribution.ATTRIBUTE_VALUE

Node_Distribution.SUPPORTNode_Distribution.PROBABILITYNode_Distribution.VARIANCE

Node_Distribution.VALUETYPE

And the data rows will look like this:

C5Missing00.007874015748031501

C5228.58812310000.99212598425196997913.5033

C431.9528749318584006.737398583630157

C432.1589801071577000 8

C45.29710479474068006.737398583630159

59.33039676663630090944.677980779511

The rows with a value type 7 (emphasized in above table) contain the information you need. You might need to write a small C# program to iterate through the resulting datable to get the information you want.

Thanks,

sql

Wednesday, March 7, 2012

Limited number of assemblies available in Visual Studio SQL Server Projects

Hi,

When starting a SQL Server Project in Visual Studio, there are a very limited number of assemblies available to reference. Does anyone know why?

Specifically I would like to use "Microsoft.AnalysisServices.AdomdClient". Does anyone know how I could do that?

Best Regards,

Johan ?hln,
IFS

Hi,

if you want more than these one, you have to register them in the GAC to see them in VS. The ones listed were intensivly tested by Microsoft not to produce any memory leaks being threadsafe etc. Additional (custom) resources have to be listed first for the computer and marked with the security policy level they need. "Doing the stack walk" while registering them at deployment time, SQL Server makes sure that called ressources reflect the at most the security settings of the registered assembly.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

|||

Hi Jens,

Thanks for your answer.

Microsoft.AnalysisServices.AdomdClient is already registered in the GAC, but I don't see it in Visual Studio. What else do I have to do to be able to reference it?

From what I can see it has unrestricted permissions in .NET Runtime Security Policy.

Best Regards,

Johan ?hln

|||

Hi Johan,

As the previous person mentions, the assemblies that are available to references in a sql server project are restricted. I think what this person meant to say is that these system assemblies are loaded from the GAC by sql server, yet this has nothing to do with when you wish to use an unsupported system assembly.

Note here about my terminology, system assembly = .Net BCL, user assembly = custom assembly.

You are wishing to reference an unsupported system assembly in sql server, this can be attempted (I say this because depending upon what the individual assembly tries to do, even in unsafe it will not be allowed to run when called upon and it's corresponding app. domain will be unloaded).

To do this, first run a create assembly statement referencing the adomd client assembly. Second, create a new regular class library project and add your reference to the adomd client libary. Then build the class in VS. Next, run the create assembly statement for your newly created class.

*You may have to set lower permission sets on the adomd client depending upon its attributes etc. There is a concept known as Host Protection Attributes (HPAs) which help sql server in determing which managed libaries should be allowed to execute within the hosted clr context. Basically, you may have to set the adomd client to unsafe it is "threatening" enough. But again, even with unsafe, sql server will only allow so much to occur aka you cannot kill sqlservr.exe from sqlclr code.

Hope this helps,

Derek

|||

Two additional points:

1. Actually, VS has a nice feature where if the assembly you're looking for is already registered in your SQL Server database, then you can reference it directly from your VS Database Project, even if it is a custom assembly or one that is not on the supported system assemblies list. It should show up normally under "Add Reference".

2. There are extremely few things that do not work in unsafe permission set, and the restrictions that are in place weren't done with reliability in mind. There are a number of ways to effectively kill your SQL Server process when running under unsafe, if you wanted to.

Steven

|||Noted on the unsafe being able to kill sqlservr. I did find that HPAs are only used in safe and unsafe perm buckets.|||i meant safe and external access :)|||

Thank you for your answers.

It seems impossible to reference AdomdClient from a SQL Server assembly:

It cannot be added using CreateAssembly|||

Johan ?hln wrote:

It seems impossible to reference AdomdClient from a SQL Server assembly:

It cannot be added using CreateAssembly

|||

TITLE: Microsoft SQL Server Management Studio Express

Create failed for SqlAssembly 'Microsoft.AnalysisServices.AdomdClient'. (Microsoft.SqlServer.Express.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Create+SqlAssembly&LinkId=20476


ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)

CREATE ASSEMBLY failed because type 'ShilohSchemas' in safe assembly 'Microsoft.AnalysisServices.AdomdClient' has a static field 'shilohSchemas'. Attributes of static fields in safe assemblies must be marked readonly in Visual C#, ReadOnly in Visual Basic, or initonly in Visual C++ and intermediate language.
Warning: The SQL Server client assembly 'microsoft.analysisservices.adomdclient, version=9.0.242.0, culture=neutral, publickeytoken=89845dcd8080cc91, processorarchitecture=msil.' you are registering is not fully tested in SQL Server hosted environment. (Microsoft SQL Server, Error: 6211)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=6211&LinkId=20476


BUTTONS:

OK

|||

I have solved this. It works if you create it as unsafe.

Thanks for your answers,

Johan