Showing posts with label variables. Show all posts
Showing posts with label variables. Show all posts

Friday, March 30, 2012

Named Query and Global Variables

Hello,
I want to filter records right in the Data Source View.
I did a "Replace Table with new Named Query" but how can I get it to filter
records by User!UserID?
Thanks,
-Will"I want to filter records right in the Data Source View."
What do you mean by this?
you want to filter your DATA? or do you want to set different
permissions for different users?|||I want to filter my data.
So "select * from table where field1=user!userid"
"sorcerdon@.gmail.com" wrote:
> "I want to filter records right in the Data Source View."
> What do you mean by this?
> you want to filter your DATA? or do you want to set different
> permissions for different users?
>|||Query parameters do not have to map to report parameters. RS automatically
creates a report parameter for every query parameter but you can delete them
and use an expression.
So, do this:
select * from mytable where field1 = @.User
RS will create automatically a report parameter called User. Instead of
using this mapping, you want to change it.
Click on the ... in the dataset designer, go to the parameters tab. On the
right side change from using a report parameter to using an expression. This
will bring you to the expression builder where you can set it to =User!UserID
Now, in the layout tab, report parameters menu, delete the report parameter
which was created for you.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"WillG" <WillG@.discussions.microsoft.com> wrote in message
news:4DBBDA27-67CC-4873-97EF-38B90C1D1E9B@.microsoft.com...
>I want to filter my data.
> So "select * from table where field1=user!userid"
>
> "sorcerdon@.gmail.com" wrote:
>> "I want to filter records right in the Data Source View."
>> What do you mean by this?
>> you want to filter your DATA? or do you want to set different
>> permissions for different users?
>>|||I'm trying to use report models though.
So f I follow the example from msdn here:
http://msdn2.microsoft.com/en-us/library/ms156284.aspx
So after I create "Data Source View" I click on a Product table and click
replace with a named query, this let's me edit the sql or use the query
builder to filter records. In the "Filer" column for a field called user_id I
put =User!UserID, hoping that only products that user_id = User!UserId will
be returned. It does not like that filter, in fact I see nothing about global
variables or variables at all.
**The above is the way I'd like to do my filtering, but if not then:
I tried filtering in the "Report Model":
Looked at the fields, click "Add Group" and All must contain
dragged the user_id field into that "All must contain" box and set it to
user_id must contain GetUserID()
Not sure about the exact area's I clicked because I'm not by my development
pc. But I could not get the Report Model to Filter either.
I like the DataSource View filter because it's a universal way for anyone
who creates reports, in reportbuilder or dev. studio, to only have access to
records that have their userid.
-Will
.
"Bruce L-C [MVP]" wrote:
> Query parameters do not have to map to report parameters. RS automatically
> creates a report parameter for every query parameter but you can delete them
> and use an expression.
> So, do this:
> select * from mytable where field1 = @.User
> RS will create automatically a report parameter called User. Instead of
> using this mapping, you want to change it.
> Click on the ... in the dataset designer, go to the parameters tab. On the
> right side change from using a report parameter to using an expression. This
> will bring you to the expression builder where you can set it to => User!UserID
> Now, in the layout tab, report parameters menu, delete the report parameter
> which was created for you.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "WillG" <WillG@.discussions.microsoft.com> wrote in message
> news:4DBBDA27-67CC-4873-97EF-38B90C1D1E9B@.microsoft.com...
> >I want to filter my data.
> > So "select * from table where field1=user!userid"
> >
> >
> > "sorcerdon@.gmail.com" wrote:
> >
> >> "I want to filter records right in the Data Source View."
> >>
> >> What do you mean by this?
> >>
> >> you want to filter your DATA? or do you want to set different
> >> permissions for different users?
> >>
> >>
>
>|||Sorry, I don't have any experience with report models. Can't help you.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"WillG" <WillG@.discussions.microsoft.com> wrote in message
news:E1041A66-B463-4011-9EF6-0C0D11BF2E12@.microsoft.com...
> I'm trying to use report models though.
> So f I follow the example from msdn here:
> http://msdn2.microsoft.com/en-us/library/ms156284.aspx
> So after I create "Data Source View" I click on a Product table and click
> replace with a named query, this let's me edit the sql or use the query
> builder to filter records. In the "Filer" column for a field called
> user_id I
> put =User!UserID, hoping that only products that user_id = User!UserId
> will
> be returned. It does not like that filter, in fact I see nothing about
> global
> variables or variables at all.
> **The above is the way I'd like to do my filtering, but if not then:
> I tried filtering in the "Report Model":
> Looked at the fields, click "Add Group" and All must contain
> dragged the user_id field into that "All must contain" box and set it to
> user_id must contain GetUserID()
> Not sure about the exact area's I clicked because I'm not by my
> development
> pc. But I could not get the Report Model to Filter either.
> I like the DataSource View filter because it's a universal way for anyone
> who creates reports, in reportbuilder or dev. studio, to only have access
> to
> records that have their userid.
> -Will
>
> .
> "Bruce L-C [MVP]" wrote:
>> Query parameters do not have to map to report parameters. RS
>> automatically
>> creates a report parameter for every query parameter but you can delete
>> them
>> and use an expression.
>> So, do this:
>> select * from mytable where field1 = @.User
>> RS will create automatically a report parameter called User. Instead of
>> using this mapping, you want to change it.
>> Click on the ... in the dataset designer, go to the parameters tab. On
>> the
>> right side change from using a report parameter to using an expression.
>> This
>> will bring you to the expression builder where you can set it to =>> User!UserID
>> Now, in the layout tab, report parameters menu, delete the report
>> parameter
>> which was created for you.
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "WillG" <WillG@.discussions.microsoft.com> wrote in message
>> news:4DBBDA27-67CC-4873-97EF-38B90C1D1E9B@.microsoft.com...
>> >I want to filter my data.
>> > So "select * from table where field1=user!userid"
>> >
>> >
>> > "sorcerdon@.gmail.com" wrote:
>> >
>> >> "I want to filter records right in the Data Source View."
>> >>
>> >> What do you mean by this?
>> >>
>> >> you want to filter your DATA? or do you want to set different
>> >> permissions for different users?
>> >>
>> >>
>>sql

Wednesday, March 21, 2012

naives bayes prediction

Hi,

I am trying to deploy a Naives bayes network.But in spite of I am getting an dependecy network that relates 3 variables,

I've got an classification Matrix where all the predicted values are the same.

Counts for nai 1 on [Cod Conceito]

Predicted

Missing (Actual)

0 (Actual)

1 (Actual)

2 (Actual)

3 (Actual)

4 (Actual)

5 (Actual)

6 (Actual)

7 (Actual)

8 (Actual)

9 (Actual)

Missing

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

1

2

0

57578

2499

11292

102

2374

317

80

271

989

2

0

0

0

0

0

0

0

0

0

0

0

3

0

0

0

0

0

0

0

0

0

0

0

4

0

0

0

0

0

0

0

0

0

0

0

5

0

0

0

0

0

0

0

0

0

0

0

6

0

0

0

0

0

0

0

0

0

0

0

7

0

0

0

0

0

0

0

0

0

0

0

8

0

0

0

0

0

0

0

0

0

0

0

9

0

0

0

0

0

0

0

0

0

0

0

I tried to deploy the same data on Tanagra's software and I've got predictions on the other values.

I tried to change all the parameters but the results are always the same

thanks in advance

Post This question in the data mining forum: http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=81&SiteID=1|||

What happens when you try to use decision trees?

One clarification - our Naive Bayes algorithm is a Naive Bayes classifier, not a Naive Bayes network. This may be the difference between the packages, but I'm not familiar with the package you mentioned.

|||

with decision trees it appears with several nodes but the classification matrix have the same distribution. only value 1 has predicted values

|||

Is the target column modeled as Discrete or Discretized? If Discretized, could you try changing it to discrete?

naives bayes prediction

Hi,

I am trying to deploy a Naives bayes network.But in spite of I am getting an dependecy network that relates 3 variables,

I've got an classification Matrix where all the predicted values are the same.

Counts for nai 1 on [Cod Conceito]PredictedMissing (Actual)0 (Actual)1 (Actual)2 (Actual)3 (Actual)4 (Actual)5 (Actual)6 (Actual)7 (Actual)8 (Actual)9 (Actual)Missing0000000000000000000000012057578249911292102237431780271989200000000000300000000000400000000000500000000000600000000000700000000000800000000000900000000000

I tried to deploy the same data on Tanagra's software and I've got predictions on the other values.

I tried to change all the parameters but the results are always the same

thanks in advance

Post This question in the data mining forum: http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=81&SiteID=1|||

What happens when you try to use decision trees?

One clarification - our Naive Bayes algorithm is a Naive Bayes classifier, not a Naive Bayes network. This may be the difference between the packages, but I'm not familiar with the package you mentioned.

|||

with decision trees it appears with several nodes but the classification matrix have the same distribution. only value 1 has predicted values

|||

Is the target column modeled as Discrete or Discretized? If Discretized, could you try changing it to discrete?

naives bayes prediction

Hi,

I am trying to deploy a Naives bayes network.But in spite of I am getting an dependecy network that relates 3 variables,

I've got an classification Matrix where all the predicted values are the same.

Counts for nai 1 on [Cod Conceito]PredictedMissing (Actual)0 (Actual)1 (Actual)2 (Actual)3 (Actual)4 (Actual)5 (Actual)6 (Actual)7 (Actual)8 (Actual)9 (Actual)Missing0000000000000000000000012057578249911292102237431780271989200000000000300000000000400000000000500000000000600000000000700000000000800000000000900000000000

I tried to deploy the same data on Tanagra's software and I've got predictions on the other values.

I tried to change all the parameters but the results are always the same

thanks in advance

Post This question in the data mining forum: http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=81&SiteID=1|||

What happens when you try to use decision trees?

One clarification - our Naive Bayes algorithm is a Naive Bayes classifier, not a Naive Bayes network. This may be the difference between the packages, but I'm not familiar with the package you mentioned.

|||

with decision trees it appears with several nodes but the classification matrix have the same distribution. only value 1 has predicted values

|||

Is the target column modeled as Discrete or Discretized? If Discretized, could you try changing it to discrete?

sql

naives bayes prediction

Hi,

I am trying to deploy a Naives bayes network.But in spite of I am getting an dependecy network that relates 3 variables,

I've got an classification Matrix where all the predicted values are the same.

Counts for nai 1 on [Cod Conceito]

Predicted

Missing (Actual)

0 (Actual)

1 (Actual)

2 (Actual)

3 (Actual)

4 (Actual)

5 (Actual)

6 (Actual)

7 (Actual)

8 (Actual)

9 (Actual)

Missing

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

1

2

0

57578

2499

11292

102

2374

317

80

271

989

2

0

0

0

0

0

0

0

0

0

0

0

3

0

0

0

0

0

0

0

0

0

0

0

4

0

0

0

0

0

0

0

0

0

0

0

5

0

0

0

0

0

0

0

0

0

0

0

6

0

0

0

0

0

0

0

0

0

0

0

7

0

0

0

0

0

0

0

0

0

0

0

8

0

0

0

0

0

0

0

0

0

0

0

9

0

0

0

0

0

0

0

0

0

0

0

I tried to deploy the same data on Tanagra's software and I've got predictions on the other values.

I tried to change all the parameters but the results are always the same

thanks in advance

Post This question in the data mining forum: http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=81&SiteID=1|||

What happens when you try to use decision trees?

One clarification - our Naive Bayes algorithm is a Naive Bayes classifier, not a Naive Bayes network. This may be the difference between the packages, but I'm not familiar with the package you mentioned.

|||

with decision trees it appears with several nodes but the classification matrix have the same distribution. only value 1 has predicted values

|||

Is the target column modeled as Discrete or Discretized? If Discretized, could you try changing it to discrete?

Monday, February 20, 2012

My package does not take the values configured in the configuration file.

Hi all,

I created a simple file system task to copy a file from one location to another on my local system.

I used variables to specify the source and destination paths and now in my configuration file if I configure the values to something else also the package is taking the initial default values and not the values specified in the configuration file.

Can anyone throw some light on this.

Thanks in advance.

first of all check that u are using configutaion file in your package correclty

second check that variable is being mapped (present) in your configuration

these are all i can assume from ur explained scenario

write back to me if u find ne luck

regards,

Anas

|||Also, look at the execution log of the package; a warningis generated each time a configuration does not take place. If you are executing it via BIDS, go to the progress tab; otherwise enable package logging.