Showing posts with label model. Show all posts
Showing posts with label model. Show all posts

Sunday, March 25, 2012

customizable report model ?

Hi friends
we created report model for our clients to create reports using report builder which works fine.
we have a situation now , as we've different clients for e.g.,individual doctors, hospitals etc.,
so we need to have smart report model which hides some entities/attributes if client is individual doctors or hospitals.
what i mean some entities and attributes are unique to a particular type of client. so we want to hide some entities/attributes based on client type .
is it possible.?
Thanks for ur help.
we are using sql server 2005 standard edition.

You can use model item security to control the visibility of various entities and attributes to different sets of users.

I have an article on my blog that goes into some depth on how to do this.

|||Thanks BOB.i'll have a read of this article :)

Monday, March 19, 2012

Custom Security + Object Moved to here

I have the Custom Security model in place, and it all seems to be working. I
authenticate the user upon login.
when i try the code below, i get the follwing error:
object Move to here. The hyperlink being
http://somedomina/ReportServer/logon.aspx?ReturnUrl=Reportservice2005.asmx
Does anyone now how to get around this?
Dim rs As New ReportingService2005
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
Dim item As CatalogItem
For Each item In rs.ListChildren("/Reports", False)
If item.Type = ItemTypeEnum.Report Then
Me.ddReports.Items.Add(New ListItem(item.Name, item.Path))
End If
NextYou have to call LogonUser from your report service proxy.
that gets you the cookie to request such operations.
"ghoff12" <ghoff12@.discussions.microsoft.com> wrote in message
news:68E2E101-9CAD-443A-8670-9EFE677D20CB@.microsoft.com...
>I have the Custom Security model in place, and it all seems to be working.
>I
> authenticate the user upon login.
> when i try the code below, i get the follwing error:
> object Move to here. The hyperlink being
> http://somedomina/ReportServer/logon.aspx?ReturnUrl=Reportservice2005.asmx
> Does anyone now how to get around this?
> Dim rs As New ReportingService2005
> rs.Credentials = System.Net.CredentialCache.DefaultCredentials
> Dim item As CatalogItem
> For Each item In rs.ListChildren("/Reports", False)
> If item.Type = ItemTypeEnum.Report Then
> Me.ddReports.Items.Add(New ListItem(item.Name,
> item.Path))
> End If
> Next|||Thanks for replying back. When i called LogonUser, i received an error. I
read that LogonUser only works with SSL enabled. Is there a way to call
LogonUser without SSL? Can you give me some example code, to make sure i did
not miss anything?
"Chris Taylor" wrote:
> You have to call LogonUser from your report service proxy.
> that gets you the cookie to request such operations.
>
> "ghoff12" <ghoff12@.discussions.microsoft.com> wrote in message
> news:68E2E101-9CAD-443A-8670-9EFE677D20CB@.microsoft.com...
> >I have the Custom Security model in place, and it all seems to be working.
> >I
> > authenticate the user upon login.
> >
> > when i try the code below, i get the follwing error:
> > object Move to here. The hyperlink being
> >
> > http://somedomina/ReportServer/logon.aspx?ReturnUrl=Reportservice2005.asmx
> >
> > Does anyone now how to get around this?
> >
> > Dim rs As New ReportingService2005
> > rs.Credentials = System.Net.CredentialCache.DefaultCredentials
> > Dim item As CatalogItem
> > For Each item In rs.ListChildren("/Reports", False)
> > If item.Type = ItemTypeEnum.Report Then
> > Me.ddReports.Items.Add(New ListItem(item.Name,
> > item.Path))
> > End If
> > Next
>
>|||No LogonUser works without SSL, it's not a "Best Practice" or anything like
that, but it works just fine.
Can you tell me about the error you received calling it?
Thanks,
Chris
"ghoff12" <ghoff12@.discussions.microsoft.com> wrote in message
news:1478ACC7-DF13-48E8-9D24-9080A3255D75@.microsoft.com...
> Thanks for replying back. When i called LogonUser, i received an error.
> I
> read that LogonUser only works with SSL enabled. Is there a way to call
> LogonUser without SSL? Can you give me some example code, to make sure i
> did
> not miss anything?
> "Chris Taylor" wrote:
>> You have to call LogonUser from your report service proxy.
>> that gets you the cookie to request such operations.
>>
>> "ghoff12" <ghoff12@.discussions.microsoft.com> wrote in message
>> news:68E2E101-9CAD-443A-8670-9EFE677D20CB@.microsoft.com...
>> >I have the Custom Security model in place, and it all seems to be
>> >working.
>> >I
>> > authenticate the user upon login.
>> >
>> > when i try the code below, i get the follwing error:
>> > object Move to here. The hyperlink being
>> >
>> > http://somedomina/ReportServer/logon.aspx?ReturnUrl=Reportservice2005.asmx
>> >
>> > Does anyone now how to get around this?
>> >
>> > Dim rs As New ReportingService2005
>> > rs.Credentials = System.Net.CredentialCache.DefaultCredentials
>> > Dim item As CatalogItem
>> > For Each item In rs.ListChildren("/Reports", False)
>> > If item.Type = ItemTypeEnum.Report Then
>> > Me.ddReports.Items.Add(New ListItem(item.Name,
>> > item.Path))
>> > End If
>> > Next
>>|||It just seems like it never does authenticate. Can you give me some sample
code to go off of?
"Chris Taylor" wrote:
> No LogonUser works without SSL, it's not a "Best Practice" or anything like
> that, but it works just fine.
> Can you tell me about the error you received calling it?
> Thanks,
> Chris
> "ghoff12" <ghoff12@.discussions.microsoft.com> wrote in message
> news:1478ACC7-DF13-48E8-9D24-9080A3255D75@.microsoft.com...
> > Thanks for replying back. When i called LogonUser, i received an error.
> > I
> > read that LogonUser only works with SSL enabled. Is there a way to call
> > LogonUser without SSL? Can you give me some example code, to make sure i
> > did
> > not miss anything?
> >
> > "Chris Taylor" wrote:
> >
> >> You have to call LogonUser from your report service proxy.
> >>
> >> that gets you the cookie to request such operations.
> >>
> >>
> >> "ghoff12" <ghoff12@.discussions.microsoft.com> wrote in message
> >> news:68E2E101-9CAD-443A-8670-9EFE677D20CB@.microsoft.com...
> >> >I have the Custom Security model in place, and it all seems to be
> >> >working.
> >> >I
> >> > authenticate the user upon login.
> >> >
> >> > when i try the code below, i get the follwing error:
> >> > object Move to here. The hyperlink being
> >> >
> >> > http://somedomina/ReportServer/logon.aspx?ReturnUrl=Reportservice2005.asmx
> >> >
> >> > Does anyone now how to get around this?
> >> >
> >> > Dim rs As New ReportingService2005
> >> > rs.Credentials = System.Net.CredentialCache.DefaultCredentials
> >> > Dim item As CatalogItem
> >> > For Each item In rs.ListChildren("/Reports", False)
> >> > If item.Type = ItemTypeEnum.Report Then
> >> > Me.ddReports.Items.Add(New ListItem(item.Name,
> >> > item.Path))
> >> > End If
> >> > Next
> >>
> >>
> >>
>
>|||I still get the Object Moved to here message. Can anyone help me?
my code looks like:
Dim rs As New wsEcho.ReportingService2005
rs.Url ="http://domainname/reportserver/reportexecution2005.asmx?wsdl"
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
rs.LogonUser("admin", "somepassword", Nothing)
Dim item As wsEcho.CatalogItem
For Each item In rs.ListChildren("/Reports", False)
If item.Type = ItemTypeEnum.Report Then
Me.ddReports.Items.Add(New ListItem(item.Name, item.Path))
End If
Next|||Let me ask you this about wsEcho.ReportingService2005. Is this a direct
reference to the web service itself?
If so, it doesn't quite work that way. In the samples that come with 2005
in the UILogon.aspx.cs file there is *another* class embedded in there
called ReportProxy. This is very very important as it overrides two
important methods
GetWebRequest,
GetWebResponse
which does all the cookie work for you in this case.
It looks like you are not doing so. Which is why you are having it redirect
you.
also, setting rs.Credentials really isn't important since you have anonymous
access probably turned on.
"ghoff12" <ghoff12@.discussions.microsoft.com> wrote in message
news:48EA1A8C-2F49-413C-BD4C-7CEAB367698C@.microsoft.com...
>I still get the Object Moved to here message. Can anyone help me?
> my code looks like:
> Dim rs As New wsEcho.ReportingService2005
> rs.Url => "http://domainname/reportserver/reportexecution2005.asmx?wsdl"
> rs.Credentials = System.Net.CredentialCache.DefaultCredentials
> rs.LogonUser("admin", "somepassword", Nothing)
> Dim item As wsEcho.CatalogItem
> For Each item In rs.ListChildren("/Reports", False)
> If item.Type = ItemTypeEnum.Report Then
> Me.ddReports.Items.Add(New ListItem(item.Name,
> item.Path))
> End If
> Next
>|||Perfect! Makes total sense now. I wasn't even thiking. I took your advice,
and now it works the way i need it. Much thanks for all your help!!!
"Chris Taylor" wrote:
> Let me ask you this about wsEcho.ReportingService2005. Is this a direct
> reference to the web service itself?
> If so, it doesn't quite work that way. In the samples that come with 2005
> in the UILogon.aspx.cs file there is *another* class embedded in there
> called ReportProxy. This is very very important as it overrides two
> important methods
> GetWebRequest,
> GetWebResponse
> which does all the cookie work for you in this case.
> It looks like you are not doing so. Which is why you are having it redirect
> you.
> also, setting rs.Credentials really isn't important since you have anonymous
> access probably turned on.
>
> "ghoff12" <ghoff12@.discussions.microsoft.com> wrote in message
> news:48EA1A8C-2F49-413C-BD4C-7CEAB367698C@.microsoft.com...
> >I still get the Object Moved to here message. Can anyone help me?
> >
> > my code looks like:
> >
> > Dim rs As New wsEcho.ReportingService2005
> > rs.Url => > "http://domainname/reportserver/reportexecution2005.asmx?wsdl"
> > rs.Credentials = System.Net.CredentialCache.DefaultCredentials
> >
> > rs.LogonUser("admin", "somepassword", Nothing)
> >
> > Dim item As wsEcho.CatalogItem
> > For Each item In rs.ListChildren("/Reports", False)
> > If item.Type = ItemTypeEnum.Report Then
> > Me.ddReports.Items.Add(New ListItem(item.Name,
> > item.Path))
> > End If
> > Next
> >
>
>|||I tried this but I am still getting the 401 error. In the 2005 Security
Extension Sample (Readme_FormsAuthenication.htm), there is the following:
**************** FROM Readme_FormsAuthenication.htm
Using the Web Service with Custom Security
You can use the Web service API with Forms Authentication just as you would
with Windows Authentication. However, you must call LogonUser in your Web
service code and pass the credentials of the current user. In addition, your
Web service client will not have the benefit of automatic cookie management,
which is provided by Internet Explorer or other Web browsers. You will have
to extend the Microsoft.ReportingServices proxy class to include cookie
management. This can be done by overriding the GetWebRequest and
GetWebResponse methods of the Web service class.
****************
I think what is holding us up now is this, because the code in
UILogon.aspx.cs that does the above, in the routines WebRequest and
WebResponse runs, but has not been modififed. Then the IIS 401 error occurs.
LogonUser apparently never gets called. I am not sure how to do this, so I
am looking for a pointer to the correct direction.
It appears some modification of these overrides is called for, but I am not
sure how to do this. Can you provide some direction?
nickpup
nickpup@.yahoo.comNONSPAM
Please let me know...
"ghoff12" wrote:
> Perfect! Makes total sense now. I wasn't even thiking. I took your advice,
> and now it works the way i need it. Much thanks for all your help!!!
> "Chris Taylor" wrote:
> > Let me ask you this about wsEcho.ReportingService2005. Is this a direct
> > reference to the web service itself?
> >
> > If so, it doesn't quite work that way. In the samples that come with 2005
> > in the UILogon.aspx.cs file there is *another* class embedded in there
> > called ReportProxy. This is very very important as it overrides two
> > important methods
> >
> > GetWebRequest,
> > GetWebResponse
> >
> > which does all the cookie work for you in this case.
> >
> > It looks like you are not doing so. Which is why you are having it redirect
> > you.
> >
> > also, setting rs.Credentials really isn't important since you have anonymous
> > access probably turned on.
> >
> >
> >
> > "ghoff12" <ghoff12@.discussions.microsoft.com> wrote in message
> > news:48EA1A8C-2F49-413C-BD4C-7CEAB367698C@.microsoft.com...
> > >I still get the Object Moved to here message. Can anyone help me?
> > >
> > > my code looks like:
> > >
> > > Dim rs As New wsEcho.ReportingService2005
> > > rs.Url => > > "http://domainname/reportserver/reportexecution2005.asmx?wsdl"
> > > rs.Credentials = System.Net.CredentialCache.DefaultCredentials
> > >
> > > rs.LogonUser("admin", "somepassword", Nothing)
> > >
> > > Dim item As wsEcho.CatalogItem
> > > For Each item In rs.ListChildren("/Reports", False)
> > > If item.Type = ItemTypeEnum.Report Then
> > > Me.ddReports.Items.Add(New ListItem(item.Name,
> > > item.Path))
> > > End If
> > > Next
> > >
> >
> >
> >

Sunday, March 11, 2012

custom plugin error: how to pass information to Mining Model Viewer?

Good morning,

Well... As I said in other topics, I'm doing a clustering plugin for text mining. I'm facing many problems and, with your help, solving them one by one.

First of all, thanks a lot again.

Well... I've made a clustering function that is actually working very well. But I'm exporting its results to a log file I use as an algorithm trace for debugging.

My clustering method returns a vector containing information of what cluster each register belongs. For instance:

vector[0] = 1 -> The register of index 0 belongs to cluster 1.

vector[1] = 9 -> The register of index 1 belongs to cluster 9.

vector[2] = 2 -> The register of index 2 belongs to cluster 2.

...

And so on.

But... I know that none of the Navigation methods receives a structure like this one discribed above. I only use it to log the results to debug the algorithm.

But how to pass this information (what register (or test case) belongs to what cluster) to the Navigation ?

Thanks a lot again, and any help will be very appreciated.

Actually, you can use the GetNodeDistribution method of the navigator, then use the ATTRIBUTE_NAME and ATTRIBUTE_VALUE properties of a distribution row to present, say, the register index and the cluster. Effectively, NODE_DISTRIBUTION is a table inside a content node.

The tutorial for managed plug-in algorithms (as well as the sample) detail how to add custom rows to a NODE_DISTRIBUTION (nodes that are not attribute/value pairs). The information is useful even if you use the C++ infrastructure