Showing posts with label setting. Show all posts
Showing posts with label setting. Show all posts

Wednesday, March 28, 2012

How to change the color of a bar in a bar chart?

I am having a problem setting the colors of the bars in a bar chart. It seems like it would be the simplest thing, but apparently it's not.

The "series" is grouped on whether or not the value is positive -- if so, the bars are blue (by default) and if not, green (by default). I want to change it so the positive color is blue and the negative color is red.

I found that I can change ALL the bars to one color by going to chart properties, Data tab, Values Edit, Appearance tab, Series Style, Fill. There I set the color to red and ALL the bars became red. But this is not what I want.

I tried using a conditional statement like IIf(Fields!IsPositive.Value=True,Blue,Red) for the color, but (not surprisingly), it told me I hadn't defined Blue and Red.

Does anyone know exactly how to do this?

Nobody has even a clue how to do this? I can't find it documented anywhere .. is it impossible?|||

hi there

there is some information on the following link - not sure if it will help but look at figure 14 P10

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql90/html/MoreSSRSCharts.asp

cheers

|||

IIf(Fields!IsPositive.Value=True,Blue,Red)

Try to use blue and red in double quotes, it should solve the problem.

i hope by now you figured how to change the colors of the bars , the previous link has all the information, but to be in depth, for your case, you can write a code snippet in the code tab of the report properties by writing a simple vb code. for the logic you want to do it.

you can do something like this, pass a parameter ( i mean the value : fields!Positive.Value )

If (so and so.. )

Color = '03938x'

-- something like this.

Let me know if this helps.

and call this method in the data field properties.

=Code.YourFunc(Parameters)

--

Kishore

|||Yes, thank you very much! Putting the colors in quotes does it (duh!). And that link has great information. Thanks again!|||

Hi!!

I do it in this way: in the "Chart Properties", data tab, I edit the value and in "Appearance" I go to "Series style..." and in fill tab, in Color, I set the next sentence:

=Code.GetColor(Fields!Criticity.Value)

And in the Report Properties, Code tab:

Public Function GetColor(ByVal strCriticity As String) As String
Select Case strCriticity
Case 0
Return "LemonChiffon"
Case 1
Return "Gold"
Case 2
Return "DarkOrange"
Case 3
Return "DarkRed"
End Select
End Function

Well, it works... but this has a problem: if in the bar chart appear the 4 colors in the different rows but the last bar only has 2 of them, in the legend only will appear that two colors, and the other 2 will be by default (a blue and a green, it will depend of the selected palette)...

How can I do it to show the legend with the correct colors?

If I put the code like cedubose:

= Switch (Fields!Criticity.Value = 0, "LemonChiffon", Fields!Criticity.Value = 1, "Gold", Fields!Criticity.Value = 2, "DarkOrange", Fields!Criticity.Value = 3, "DarkRed")

it works different but not correctly, i means, in 3 of the 4 legends appear the same color and in the other legend the another color...

All suggestions will be wellcome... thx!!

|||

Problem solved!!!

If somebody has the same problem, here is the solution:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=13958&SiteID=1

|||

The only way I've found of doing it is to

1) Select Tools/Options/Color

2) Modify the colours in "Chart Fill"

...should be easier, but.

How to change the color of a bar in a bar chart?

I am having a problem setting the colors of the bars in a bar chart. It seems like it would be the simplest thing, but apparently it's not.

The "series" is grouped on whether or not the value is positive -- if so, the bars are blue (by default) and if not, green (by default). I want to change it so the positive color is blue and the negative color is red.

I found that I can change ALL the bars to one color by going to chart properties, Data tab, Values Edit, Appearance tab, Series Style, Fill. There I set the color to red and ALL the bars became red. But this is not what I want.

I tried using a conditional statement like IIf(Fields!IsPositive.Value=True,Blue,Red) for the color, but (not surprisingly), it told me I hadn't defined Blue and Red.

Does anyone know exactly how to do this?

Nobody has even a clue how to do this? I can't find it documented anywhere .. is it impossible?|||

hi there

there is some information on the following link - not sure if it will help but look at figure 14 P10

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql90/html/MoreSSRSCharts.asp

cheers

|||

IIf(Fields!IsPositive.Value=True,Blue,Red)

Try to use blue and red in double quotes, it should solve the problem.

i hope by now you figured how to change the colors of the bars , the previous link has all the information, but to be in depth, for your case, you can write a code snippet in the code tab of the report properties by writing a simple vb code. for the logic you want to do it.

you can do something like this, pass a parameter ( i mean the value : fields!Positive.Value )

If (so and so.. )

Color = '03938x'

-- something like this.

Let me know if this helps.

and call this method in the data field properties.

=Code.YourFunc(Parameters)

--

Kishore

|||Yes, thank you very much! Putting the colors in quotes does it (duh!). And that link has great information. Thanks again!|||

Hi!!

I do it in this way: in the "Chart Properties", data tab, I edit the value and in "Appearance" I go to "Series style..." and in fill tab, in Color, I set the next sentence:

=Code.GetColor(Fields!Criticity.Value)

And in the Report Properties, Code tab:

Public Function GetColor(ByVal strCriticity As String) As String
Select Case strCriticity
Case 0
Return "LemonChiffon"
Case 1
Return "Gold"
Case 2
Return "DarkOrange"
Case 3
Return "DarkRed"
End Select
End Function

Well, it works... but this has a problem: if in the bar chart appear the 4 colors in the different rows but the last bar only has 2 of them, in the legend only will appear that two colors, and the other 2 will be by default (a blue and a green, it will depend of the selected palette)...

How can I do it to show the legend with the correct colors?

If I put the code like cedubose:

= Switch (Fields!Criticity.Value = 0, "LemonChiffon", Fields!Criticity.Value = 1, "Gold", Fields!Criticity.Value = 2, "DarkOrange", Fields!Criticity.Value = 3, "DarkRed")

it works different but not correctly, i means, in 3 of the 4 legends appear the same color and in the other legend the another color...

All suggestions will be wellcome... thx!!

|||

Problem solved!!!

If somebody has the same problem, here is the solution:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=13958&SiteID=1

|||

The only way I've found of doing it is to

1) Select Tools/Options/Color

2) Modify the colours in "Chart Fill"

...should be easier, but.

How to change the color of a bar in a bar chart?

I am having a problem setting the colors of the bars in a bar chart. It seems like it would be the simplest thing, but apparently it's not.

The "series" is grouped on whether or not the value is positive -- if so, the bars are blue (by default) and if not, green (by default). I want to change it so the positive color is blue and the negative color is red.

I found that I can change ALL the bars to one color by going to chart properties, Data tab, Values Edit, Appearance tab, Series Style, Fill. There I set the color to red and ALL the bars became red. But this is not what I want.

I tried using a conditional statement like IIf(Fields!IsPositive.Value=True,Blue,Red) for the color, but (not surprisingly), it told me I hadn't defined Blue and Red.

Does anyone know exactly how to do this?

Nobody has even a clue how to do this? I can't find it documented anywhere .. is it impossible?|||

hi there

there is some information on the following link - not sure if it will help but look at figure 14 P10

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql90/html/MoreSSRSCharts.asp

cheers

|||

IIf(Fields!IsPositive.Value=True,Blue,Red)

Try to use blue and red in double quotes, it should solve the problem.

i hope by now you figured how to change the colors of the bars , the previous link has all the information, but to be in depth, for your case, you can write a code snippet in the code tab of the report properties by writing a simple vb code. for the logic you want to do it.

you can do something like this, pass a parameter ( i mean the value : fields!Positive.Value )

If (so and so.. )

Color = '03938x'

-- something like this.

Let me know if this helps.

and call this method in the data field properties.

=Code.YourFunc(Parameters)

--

Kishore

|||Yes, thank you very much! Putting the colors in quotes does it (duh!). And that link has great information. Thanks again!|||

Hi!!

I do it in this way: in the "Chart Properties", data tab, I edit the value and in "Appearance" I go to "Series style..." and in fill tab, in Color, I set the next sentence:

=Code.GetColor(Fields!Criticity.Value)

And in the Report Properties, Code tab:

Public Function GetColor(ByVal strCriticity As String) As String
Select Case strCriticity
Case 0
Return "LemonChiffon"
Case 1
Return "Gold"
Case 2
Return "DarkOrange"
Case 3
Return "DarkRed"
End Select
End Function

Well, it works... but this has a problem: if in the bar chart appear the 4 colors in the different rows but the last bar only has 2 of them, in the legend only will appear that two colors, and the other 2 will be by default (a blue and a green, it will depend of the selected palette)...

How can I do it to show the legend with the correct colors?

If I put the code like cedubose:

= Switch (Fields!Criticity.Value = 0, "LemonChiffon", Fields!Criticity.Value = 1, "Gold", Fields!Criticity.Value = 2, "DarkOrange", Fields!Criticity.Value = 3, "DarkRed")

it works different but not correctly, i means, in 3 of the 4 legends appear the same color and in the other legend the another color...

All suggestions will be wellcome... thx!!

|||

Problem solved!!!

If somebody has the same problem, here is the solution:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=13958&SiteID=1

|||

The only way I've found of doing it is to

1) Select Tools/Options/Color

2) Modify the colours in "Chart Fill"

...should be easier, but.

Monday, March 26, 2012

How to change QUOTED_IDENTIFIER for table?

Hi,
I want to change QUOTED_IDENTIFIER setting for table because it makes
problem with DBCC DBREINDEX. I don't want to drop and recreate table because
it is huge. How can I change it?
I use SS2000, SP4, Win 2000 Advance, SP4.
Thanks in advance
Nikola MilicSyntax
SET QUOTED_IDENTIFIER { ON | OFF }
Thanks,
Sree
[Please specify the version of Sql Server as we can save one thread and time
asking back if its 2000 or 2005]
"Nikola Milic" wrote:

> Hi,
> I want to change QUOTED_IDENTIFIER setting for table because it makes
> problem with DBCC DBREINDEX. I don't want to drop and recreate table becau
se
> it is huge. How can I change it?
> I use SS2000, SP4, Win 2000 Advance, SP4.
> Thanks in advance
> Nikola Milic
>
>|||Hi,
You didn't understand me. Table was created with SET QUOTED_IDENTIFIER OFF
and I want to change it to be ON.
Thanks for reply
Nikola
"Sreejith G" <SreejithG@.discussions.microsoft.com> wrote in message
news:1A122A1B-1631-42D2-8CB7-5E2BF2876E69@.microsoft.com...
> Syntax
> SET QUOTED_IDENTIFIER { ON | OFF }
> --
> Thanks,
> Sree
> [Please specify the version of Sql Server as we can save one thread and
> time
> asking back if its 2000 or 2005]
>
> "Nikola Milic" wrote:
>|||On Thu, 9 Mar 2006 08:36:05 +0200, Nikola Milic wrote:

>Hi,
>You didn't understand me. Table was created with SET QUOTED_IDENTIFIER OFF
>and I want to change it to be ON.
Hi Nikola,
As far as I know, there's no easy way to do this. You'll have to
1. Drop all constraints referencing the table
2. Drop all triggers on the table
3. Rename the table
4. Create a new table with the required setting and the same structure
5. Use INSERT INTO NewTable (Col1, Col2, ...) SELECT Col1, Col2, ...
FROM OldTable to move over all existing data
6. Recreate all triggers you dropped in step 2
7. Recreate all constraints you dropped in step 1
And finally (but you could postpone this a while, to give you some other
fallback scneario options)
8. Drop the "old" table
Hugo Kornelis, SQL Server MVP|||Thanks for reply,
I said in my first post that I don't want to drop and recreate table
because it is huge.
I will avoid problem with DBCC DBREINDEX by dropping calculated column (it
makes problem) and recreating it after re-indexing.
Regards
Nikol
"Hugo Kornelis" <hugo@.perFact.REMOVETHIS.info.INVALID> wrote in message
news:tjd112lpcn6bo75hfct2vhvhio6anj6sdc@.
4ax.com...
> On Thu, 9 Mar 2006 08:36:05 +0200, Nikola Milic wrote:
>
> Hi Nikola,
> As far as I know, there's no easy way to do this. You'll have to
> 1. Drop all constraints referencing the table
> 2. Drop all triggers on the table
> 3. Rename the table
> 4. Create a new table with the required setting and the same structure
> 5. Use INSERT INTO NewTable (Col1, Col2, ...) SELECT Col1, Col2, ...
> FROM OldTable to move over all existing data
> 6. Recreate all triggers you dropped in step 2
> 7. Recreate all constraints you dropped in step 1
> And finally (but you could postpone this a while, to give you some other
> fallback scneario options)
> 8. Drop the "old" table
> --
> Hugo Kornelis, SQL Server MVP

Wednesday, March 21, 2012

How to change collation settings after install

I need to change the collation setting on a server which has already been
installed and setup. How do I do this?
Thanks.
moondaddy@.newsgroup.nospamIt depends on to what extent you want to change collation. The collation for system databases you
change using rebuildm.exe (2000) or setup (2005). See books online for details. This will rebuild
the system databases, so you need to recreate everything you need in the system databases.
A user database is a different thing...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"moondaddy" <moondaddy@.newsgroup.nospam> wrote in message
news:eTbPg7gAIHA.4232@.TK2MSFTNGP04.phx.gbl...
>I need to change the collation setting on a server which has already been installed and setup. How
>do I do this?
> Thanks.
>
> moondaddy@.newsgroup.nospam
>|||Take a look at this tip:
http://www.sqlcommunity.com/Default.aspx?grm2id=25&tabid=77
Hope this helps.
Saleem
WWW.SQLCOMMUNITY.COM
SQL Server Tips, SQL Server Scripts, SQL Server Forums, SQL Server Blogs,
SQL Server Radio, SQL Server Events..
"Tibor Karaszi" wrote:
> It depends on to what extent you want to change collation. The collation for system databases you
> change using rebuildm.exe (2000) or setup (2005). See books online for details. This will rebuild
> the system databases, so you need to recreate everything you need in the system databases.
> A user database is a different thing...
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "moondaddy" <moondaddy@.newsgroup.nospam> wrote in message
> news:eTbPg7gAIHA.4232@.TK2MSFTNGP04.phx.gbl...
> >I need to change the collation setting on a server which has already been installed and setup. How
> >do I do this?
> >
> > Thanks.
> >
> >
> > moondaddy@.newsgroup.nospam
> >
>|||Hi,
I agree with Tibor. Just add some helpful links here for your reference.
For SQL 2000, please refer to:
How to rebuild the master database (Rebuild Master utility)
http://msdn2.microsoft.com/en-us/library/aa197950(sql.80).aspx
For SQL 2005, you may refer to:
Setting and Changing the Server Collation
http://msdn2.microsoft.com/en-us/library/ms179254.aspx
How to: Install SQL Server 2005 from the Command Prompt
http://msdn2.microsoft.com/en-us/library/ms144259.aspx
Additionally if you would like to change your user database collation, you
can use ALTER DATABASE statement which is applicable for both SQL 2000 and
2005:
Setting and Changing the Database Collation
http://msdn2.microsoft.com/en-us/library/ms175835.aspx
ALTER DATABASE (Transact-SQL)
http://msdn2.microsoft.com/en-us/library/ms174269.aspx
Please feel free to let us know if you have any questions or concerns.
Best regards,
Charles Wang
Microsoft Online Community Support
======================================================When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
======================================================This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================

Monday, March 19, 2012

How to change "sa" password after installation?

I just installed MS SQL SERVER2000, but seems the password I was setting didn't look good. So I want to change it, but how? Thanks!run stored procedure using account with sysadmin role priveleges

sp_password @.new = 'newprd' , @.loginame = 'sa'

ask if you have any questions|||run stored procedure using account with sysadmin role priveleges

sp_password @.new = 'newprd' , @.loginame = 'sa'

ask if you have any questions

I've figured it out, thanks!

How to CASE a SmallInt to a Varchar value

Why does this syntax work for bit but not for smallint ?
-- This works OK - Setting = BIT
CASE (dbo.tblAssessment.Setting)
WHEN 1 THEN 'Internal'
WHEN 0 THEN 'External'
END AS Setting,
-- This fails - error converting value 'N/A' to column of datatype smallint
-- Credit = SMALLINT
CASE (dbo.tblAssessment.Credit)
WHEN 101 THEN 'N/A'
ELSE dbo.tblAssessment.Credit
END AS Credit,
Thanks.Hi
It is expecting to return a smallint as one of the ELSE's in a smallint.
CASE (dbo.tblAssessment.Credit)
WHEN 101 THEN CONVERT(CHAR(10), 'N/A' )
ELSE CONVERT(CHAR(10), dbo.tblAssessment.Credit)
END AS Credit
Regards
Mike
"hals_left" wrote:

> Why does this syntax work for bit but not for smallint ?
>
> -- This works OK - Setting = BIT
> CASE (dbo.tblAssessment.Setting)
> WHEN 1 THEN 'Internal'
> WHEN 0 THEN 'External'
> END AS Setting,
> -- This fails - error converting value 'N/A' to column of datatype smallin
t
> -- Credit = SMALLINT
> CASE (dbo.tblAssessment.Credit)
> WHEN 101 THEN 'N/A'
> ELSE dbo.tblAssessment.Credit
> END AS Credit,
> Thanks.
>