Friday, March 23, 2012
Performance Counters
--=_NextPart_000_0011_01C5191B.23066440
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi all.
I've got a SQL Server 2k sp3 on Win 2003.
It has the Performance Counters listed for SQL Server, but when I select = any of the counters, they don't show any activity.
Any ideas?
Thanks,
Rick
--=_NextPart_000_0011_01C5191B.23066440
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&
Hi all.
I've got a SQL Server 2k sp3 on Win = 2003.
It has the Performance Counters listed for SQL = Server, but when I select any of the counters, they don't show any activity.
Any ideas?
Thanks,
Rick
--=_NextPart_000_0011_01C5191B.23066440--Hi
You may want to check your event logs to see if anything is being
logged.
Check sysperfinfo to see what information is there.
Rebuild the performance counters:
http://support.microsoft.com/default.aspx?scid=kb;en-us;300956
John|||"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:1109147319.860891.81450@.f14g2000cwb.googlegroups.com...
> Hi
> You may want to check your event logs to see if anything is being
> logged.
> Check sysperfinfo to see what information is there.
> Rebuild the performance counters:
> http://support.microsoft.com/default.aspx?scid=kb;en-us;300956
> John
>
Okay... nothing in the sysperinfo table. That would explain why the
counters are reading 0. I'm still trying to track down the problems
though. I will try the rebuild later today and see what happens.
Ricksql
Monday, February 20, 2012
Percentages are rounding and I don't want them to
No matter how I format the percentage (using FormatPercent or "P" format
option, my text box in a table control rounds the percentage to a whole
percentage with zeroes in the decimal columns.
I don't want it to round off at all.
Any pointers?
--
John ShahanOn Jan 31, 12:49 pm, jp <j...@.discussions.microsoft.com> wrote:
> Using SQLRS 2005
> No matter how I format the percentage (using FormatPercent or "P" format
> option, my text box in a table control rounds the percentage to a whole
> percentage with zeroes in the decimal columns.
> I don't want it to round off at all.
> Any pointers?
> --
> John Shahan
I am not sure this will help but...
Leave the formatting alone and just use the expression builder
In database column (lets call is percentField), number is like this...
123.456789 then in expression builder '=Fields!percentField.Value +
"%" ' - field should look like 123.456789% on the report.
.123456789 then in expression builder '=(Fields!percentField.Value
*100) + "%" ' - field should look like 123.456789% on the report.
I hope that is what you were talking about and I hope that helps you.
Thanks and have a great day,
Kerrie|||Thank you very much for taking the time to respond.
I tried eliminating the formating as you suggested. And I now have
=Fields!JulPercentage.Value * 100 & "%" as the expression but it is still
taking a value like .026436346 (confirmed by looking at the result set in the
Data tab) and making it 3.00% in the table control on the report.
--
John Shahan
"Kerrie" wrote:
> On Jan 31, 12:49 pm, jp <j...@.discussions.microsoft.com> wrote:
> > Using SQLRS 2005
> > No matter how I format the percentage (using FormatPercent or "P" format
> > option, my text box in a table control rounds the percentage to a whole
> > percentage with zeroes in the decimal columns.
> >
> > I don't want it to round off at all.
> >
> > Any pointers?
> > --
> > John Shahan
> I am not sure this will help but...
> Leave the formatting alone and just use the expression builder
> In database column (lets call is percentField), number is like this...
> 123.456789 then in expression builder '=Fields!percentField.Value +
> "%" ' - field should look like 123.456789% on the report.
> ..123456789 then in expression builder '=(Fields!percentField.Value
> *100) + "%" ' - field should look like 123.456789% on the report.
> I hope that is what you were talking about and I hope that helps you.
> Thanks and have a great day,
> Kerrie
>|||On Feb 1, 4:49 am, jp <j...@.discussions.microsoft.com> wrote:
> Using SQLRS 2005
> No matter how I format the percentage (using FormatPercent or "P" format
> option, my text box in a table control rounds the percentage to a whole
> percentage with zeroes in the decimal columns.
> I don't want it to round off at all.
> Any pointers?
> --
> John Shahan
You can specify the number of decimal places you would like to see in
the percentage, using the
FormatPercent(number, DecimalPlaces) function. However, this will show
zeros if the percent is a whole number. If you want sometimes to show
decimal places, but to show no trailing zeros, then you probably need
to construct the number manually (division, then multiply by 100) and
add the % sign on the end as a string.
Rowen|||On Jan 31, 6:33 pm, "Rowen" <rowen...@.gmail.com> wrote:
> On Feb 1, 4:49 am, jp <j...@.discussions.microsoft.com> wrote:
> > Using SQLRS 2005
> > No matter how I format the percentage (using FormatPercent or "P" format
> > option, my text box in a table control rounds the percentage to a whole
> > percentage with zeroes in the decimal columns.
> > I don't want it to round off at all.
> > Any pointers?
> > --
> > John Shahan
> You can specify the number of decimal places you would like to see in
> the percentage, using the
> FormatPercent(number, DecimalPlaces) function. However, this will show
> zeros if the percent is a whole number. If you want sometimes to show
> decimal places, but to show no trailing zeros, then you probably need
> to construct the number manually (division, then multiply by 100) and
> add the % sign on the end as a string.
> Rowen
I would definitly try Rowan's suggestions, but what do you have the
format as on the table for that field? Something is set and it needs
to be turned off. I would leave it on 'General' or 'g' on the format
property.
Kerrie
percentage values storage and retrieval
displayed as 12.00% on the front end. That means, I should multiply by 100
when I am pulling the data from the table and divide by 100 when I am storin
g
the data in the table.
This does not make sense to me. How about I store the data as 12.00 to begin
with in the table? And just pull it as it is in the table and do proper
processing when the values gets stored in the table right in the beginning.
Does that make sense?
Since this is a very simple issue, I thought I did not need to post sample
table and data.
Please let me know.
TIA...To me, it makes better sense to store the percentage value as a number less
than one (e.g., 0.12). In addition to just representing a percentage (12%),
you could use the percentage to calculate a discount for a price or other
operation. For that use,
it's better to keep the percentage like 0.12 :
--pecentage like 0.12
discount = price x percentage
--percentage like 12
dicount = price x percentage / 100 --harder to keep track of, IMHO
"sqlster" wrote:
> I am told that percentages should be stored in a raw format like 0.12 and
> displayed as 12.00% on the front end. That means, I should multiply by 100
> when I am pulling the data from the table and divide by 100 when I am stor
ing
> the data in the table.
> This does not make sense to me. How about I store the data as 12.00 to beg
in
> with in the table? And just pull it as it is in the table and do proper
> processing when the values gets stored in the table right in the beginning
.
> Does that make sense?
> Since this is a very simple issue, I thought I did not need to post sample
> table and data.
> Please let me know.
> TIA...
>|||Percentages are decimals, and are used as decimals. The data should be
stored in a format according to what it means and how it is used, not how it
is displayed. As a rule, databases are built around the data you work with,
applications are built around how you display that data. These rules should
only be broken as a last resort, and wanting an easier way to display a
value does not qualify.
Yes, storing it as an integer rather than the actual decimal value may save
you some keystrokes now, but it will result in calculation errors later on,
and will be a nightmare for the next person who has to manage the code.
"sqlster" <nospam@.nospam.com> wrote in message
news:B40FDAC5-D090-4F0D-ACE7-FCA12CB50570@.microsoft.com...
> I am told that percentages should be stored in a raw format like 0.12 and
> displayed as 12.00% on the front end. That means, I should multiply by 100
> when I am pulling the data from the table and divide by 100 when I am
storing
> the data in the table.
> This does not make sense to me. How about I store the data as 12.00 to
begin
> with in the table? And just pull it as it is in the table and do proper
> processing when the values gets stored in the table right in the
beginning.
> Does that make sense?
> Since this is a very simple issue, I thought I did not need to post sample
> table and data.
> Please let me know.
> TIA...
>|||A percentage is a value derived from a numerator and denominator, and if the
x and y are contained in the table, then there is no reason to add the
additional percentage column. If you have only the percentage, then you are
potentially losing information, becuase the question may be asked later how
the value was derived. Therefore, the best method of storing a percentage
may be perhaps:
x smallint,
y smallint
"sqlster" <nospam@.nospam.com> wrote in message
news:B40FDAC5-D090-4F0D-ACE7-FCA12CB50570@.microsoft.com...
>I am told that percentages should be stored in a raw format like 0.12 and
> displayed as 12.00% on the front end. That means, I should multiply by 100
> when I am pulling the data from the table and divide by 100 when I am
> storing
> the data in the table.
> This does not make sense to me. How about I store the data as 12.00 to
> begin
> with in the table? And just pull it as it is in the table and do proper
> processing when the values gets stored in the table right in the
> beginning.
> Does that make sense?
> Since this is a very simple issue, I thought I did not need to post sample
> table and data.
> Please let me know.
> TIA...
>
Percentage of total
--=_NextPart_000_0181_01C87662.85ABCAC0
Content-Type: text/plain;
charset="windows-1255"
Content-Transfer-Encoding: quoted-printable
I want to create such a report:
Dep. Sales %T1 %T2
Division A
=3D=3D=3D=3D=3D=3D=3D
Department1 10 10% 2%
Department2 40 40% 8%
Department3 50 50% 10%
---
Total A 100 100% 20%
Division B
=3D=3D=3D=3D=3D=3D=3D
Department4 100 25% 20% Department5 300 75% 60%
---
Total A 400 100% 80%
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Total 500 100%
What is the right way to calculate the Percentage for each Department?
Should I calculate it in the SQL or could I use the abilities of SSRS?
--=_NextPart_000_0181_01C87662.85ABCAC0
Content-Type: text/html;
charset="windows-1255"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&
I want to create such a report:
Dep. = Sales %T1 %T2
Division A
=3D=3D=3D=3D=3D=3D=3D
Department1 = 10 10% 2%
Department2 = 40 40% 8%
Department3 = 50 50% 10%
---
Total A 100 &nb= sp; 100% 20%
Division B
=3D=3D=3D=3D=3D=3D=3D
Department4 100 25% 20%
Department5 300 75% 60%
---
Total A 400 &nb= sp; 100% 80%
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D
Total = 500 100%
What is the right way to calculate the = Percentage for each Department?
Should I calculate it in the SQL or = could I use the abilities of SSRS?
--=_NextPart_000_0181_01C87662.85ABCAC0--On Feb 23, 1:24 pm, "Geri Reshef" <gershon_res...@.recanati-
alum.tau.ac.il> wrote:
> I want to create such a report:
> Dep. Sales %T1 %T2
> Division A
> =======> Department1 10 10% 2%
> Department2 40 40% 8%
> Department3 50 50% 10%
> ---
> Total A 100 100% 20%
> Division B
> =======> Department4 100 25% 20%
> Department5 300 75% 60%
> ---
> Total A 400 100% 80%
> ========================> Total 500 100%
> What is the right way to calculate the Percentage for each Department?
> Should I calculate it in the SQL or could I use the abilities of SSRS?
You can do it either way. In SSRS, you could use an expression similar
to this to get the percentages per department.
=(Fields!Sales.Value/Sum(Fields!Sales.Value)) * 100
And then in the format section of the table column properties for the
T1 column, set the format to: #.00%
Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant'
Percentage Format problem with Subreports
Hello;
I have a container Report with some SubReports. I need the percentage fields with just 1 decimal.
Inside the SubReports I have fields with percentages and I have all of them with Format: P1
If I run the subreport, I see the percentage fields correctly.
But when I run the container Report some/several are with 2 decimals.
Thanks for help
Luis
Check all of your formatting codes on the parent report (I'm assuming that's what you mean by container report).
Just because you put the format P1 on the subreport doesn't mean the parent report automatically adapts to this change.
Percentage Format
I am trying to display a figure as a Percentage.
The figure is 2.00000. I want it to show as 2.00%.
When i go into the formatting i select P but it displays the figure as 200.00%.
What formatting code should i use to get 2.00%?
The format code 'P' multiplies your value by 100 then adds the % symbol at the end. You can do a couple things to get this fixed. Remove where you are multiplying the value by 100 in code, then set the format code to 'P'.
Another way is to use this as your expression for your field.
=Format(Fields!Field1.Value, "0.00") & "%"
Hope this helps.
Jarret
|||Using
=Format(Fields!Field1.Value, "0.00") & "%"
That works for fields where value is 0.00000 and retunrs it as 0.00%. which is great. But the firld with 2.00000 is coming back as 2200.00%?
i am not multiplying anything by 100 in code so how can i remove it. Maybe i'm not understanding. Where do i remove the multiply by 100?
|||What formula are you using to get the 2.00000? I am wondering how you got a value greater than 1.
If you use =Format(Fields!Field1.Value, "0.00") & "%" as the expression for your textbox, you will need to remove the format code 'P' from the textbox.
Jarret
|||I was putting it in where teh Format Expression was not the Textbox value.
thanks
|||Try this
Past this at Value filed instead of Format
=Format(Fields!OWNERSHIP_PERCENTAGE.Value,"P")
It should work. otherwise let me know
|||Vijay,
It seems that Duncan's values were already in decimal form and just needed to have 2 decimals and a % afterwards. Using the format code 'P' multiplies the value by 100, gets 2 decimals, and adds the % sign. The fact that it multiplies it by 100 is what was throwing off Duncan's values, and why we couldn't use the 'P' format code.
Jarret