Drawing Histogram/chart

May 8, 2008

I have a following code to "draw" a "histogram" :-)


use tempdb
go

declare @temp table
(id int identity(1,1)
,valuess int)

insert into @temp (valuess) values (64)
insert into @temp (valuess) values (12)
insert into @temp (valuess) values (23)
insert into @temp (valuess) values (45)
insert into @temp (valuess) values (30)


select
id
,valuess
,histogram = cast(replicate('*', valuess*0.4) as nvarchar(50))
,length = len(cast(replicate('*', valuess*0.4) as nvarchar(50)))
from @temp

order by valuess desc


Is there any better way to do it; maybe even a function?

Thanks :)

View 2 Replies


ADVERTISEMENT

Drawing Polygon On Chart

Mar 17, 2008

I am working on a report which requires me to draw two polygons (rectangles) on a scatter chart to visually indicate "good" and "bad" ranges of plotted data. Is there a way to do this out-of-the-box?

Otherwise, if I must create a custom report item, how do I draw on the chart surface? I have looked at the following articles on Custom Report Items, but when I open the sample solutions I can't put the custom report items on the chart surface.

http://blogs.msdn.com/chrishays/default.aspx
http://msdn2.microsoft.com/en-us/magazine/cc188686.aspx

Do I have to create a custom report item which inherits from a chart control? If so, does anyone have any reference samples?

View 4 Replies View Related

Sql Histogram

Mar 20, 2008



Hi all -

I would like to know how in sql I can generate a histogram of data with a known range of values. Here is an example of what I would like to be able to generate.

I would like to see the count of how many values range from .0001 to .0002 and .0002 to .0003 and .0003 to .0004

up to .0019

Then I would like to see greater variation such as stepping every .005 instead of .0001 after .0019. So this would be .005 to .010, .010 to .015

VALUE




0.0001

0.0002

0.0001

0.0001

0.0001

0.0001

0.0006

0.0008

0.001

0.0012

0.0014

0.0016

0.0018

0.0017

0.0007

0.0019

0.002

0.005

0.006


INTERVAL FREQUENCY

------------------------- -------------------------

0 2762

0.0001 370

0.0002 338

0.0003 246

0.0004 175

0.0005 86

0.0006 41

0.0007 24

0.0008 12

0.0009 13

0.001 9

0.0011 10

0.0012 7

0.0013 5

0.0014 5

0.0015 4

0.0016 2

0.0017 1

0.0018 1

0.0019 2

0.005 26

0.01 8

0.015 5

0.02 3

0.025 0

0.03 1

View 3 Replies View Related

Creating Data For A Histogram.

Jul 23, 2005

I have a table, TableA with amongst other fields, a field for Qty.Qty can range from 0 to 100.How do I count the number of rows with a qty between 1 and 10, 11 and20, 21 and 30, and so on using one SQL statement? Regards,Ciarán

View 16 Replies View Related

DB Engine :: Histogram Of Wait Events

Oct 5, 2015

I would like to know what a particular session is waiting on (cpu, io, memory etc).

For that I try to figure out how to use extended events. I would prefer to avoid the use files written to db-server, why I tried "histogram target".

Well my attempt does not produce usefull output,

-- check current event sessions

SELECT a.name,
CASE WHEN b.name IS NOT NULL
THEN 'Started'
ELSE 'Stopped'
END AS current_state

[Code] ....

The intention was to get a pareto chart, to see the top wait events in the session. I would also like to see amount of cpu used. Based on this tuning effort could be prioritized.

View 6 Replies View Related

Drawing Two Lines On The Same Graph

Jan 7, 2008

i wanna create two line types on the same graph. I'm using the following queries.






Code Block
select count(l.created) as LoanOriginationNumberPreApproved , convert(char( 11), l.Created) as PreApprovedDate
from LoanApplication l
where l.Status <> 'Cancelled'
Group by l.Created






and





Code Block
select count(l.SubmittedOn) as LoanOriginationNumber , convert(char( 11), l.SubmittedOn) as SubmittedDate
from LoanApplication l
where l.Status <> 'Cancelled'
Group by l.SubmittedOn




I combined these queries. I add clumns of the second query to select statement of first code. also added group by l.submittedon to group by l,created as group by l.created, l.submiited on. This is the problem.(I mean grouping)

But then SSRS does not allow me to put preaaproveddate and submitteddate to drop category filed?
Does anyone know how to do that?

View 2 Replies View Related

Problem With System.drawing

May 9, 2007

Hi,



Our CLR stuff is running OK, as long as we do not touch the line:



using System.Drawing;



However, we do some image manipulation and then we get the error from SQL Server as



TITLE: Microsoft SQL Server Management Studio
------------------------------

Create failed for SqlAssembly 'ASP.IMAGE.CLR'. (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.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.ConnectionInfo)

------------------------------

Assembly 'system.drawing, version=2.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a.' was not found in the SQL catalog. (Microsoft SQL Server, Error: 6503)

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

------------------------------
BUTTONS:

OK
------------------------------
.



Any help is highly appreciated.



Thanks,

Ning

View 2 Replies View Related

A Drawing Error Occurred When Exporting To PDF

May 19, 2006

Hello,

I have a report that I need to export to PDF, when I do so and re-open the report, I get a message stating "A Drawing Error Occurred".

Plus when I have a textbox with a large amount of data, it always kicks to a different page, instead of print what it can fit on the previous page and the rest on the next page.

Any help on this would greatly be appreciated.

Thanks in advance.

View 5 Replies View Related

Query Question - Drawing A Blank On This One.

Nov 14, 2007

Hello everyone,

For whatever reason I can't figure out a query I need to write.

Let€™s say I have two tables, table 1 and 2. Table1 has columns A, B, and C with 10 rows.

I want to write a query that says: update table 2 where at least one value of column B in table 1 is not null.


How do i write this query?

Many thanks...

View 10 Replies View Related

Microsoft.ReportDesigner.Drawing.Language

May 17, 2007

I am getting the a big redX when attempting to open a report in VS.NET 2005, "Deserialization failed: The type initializer for "Microsoft.ReportDesigner.Drawing.Language" threw an exception". Has anyone else get this error? Would you please share your solution to me?


Thanks



View 2 Replies View Related

Reporting Services Report / Chart / Dynamically Hide-Unhide DataFields In A Chart

Mar 26, 2007



Hello All,

I have a reporting services report in the form of a chart. I have two datafields on the chart.

I need to be able to dynamically hide one datafield and view the chart for the other one and vice versa.

How do I do this ?

Any help would be appreciated..

Thanks!



View 4 Replies View Related

Reporting Services :: Export Server Report Chart To Excel As Editable Chart

Jul 17, 2014

When I export the report in excel format the chart is displayed as picture. I want it to be displayed as editable chart.Does Office Writer work in this situation and did anyone use Office Writer to accomplish same type of problem.Is there any other method or product we can use instead of the office writer.

View 2 Replies View Related

Reporting Services :: SSRS 2008 R2 Bar Chart Labels Not Staying Outside Chart Area?

Feb 13, 2012

I have a report designed in SSRS 2008 R2.My issue is that the data labels do not stay outside the bars for high values.

View 4 Replies View Related

Reporting Services :: How To Show Bar And Line Chart In Same Chart

Oct 21, 2015

I need to create a chart with the following features

1) Bar chart that has data for 3 years (3 series)
2) Line chart that has the same data as per the above points on the bar chart but this is a running total. (3 series)
3) These data points are for the 12 months
4) there should be a secondary axis for the cumulative one

Can I create this using the same data set?

View 6 Replies View Related

Deserialization Failed: The Type Initializer For 'Microsoft.ReportDesigner.Drawing.RptStyleConstValue' Threw An Exception

Sep 26, 2006

I have VS2003 and VS2005 installed as well as SQL Server 2000 and SQL Server 2005 Tools. I have RS2000 and RS2005 installed. RS2000 works fine in VS2003. When using VS2005 and opening a Microsoft sample project for 2005, I get the error listed in the subject line.

When trying to create a new project and connecting to an Oracle database or a SQL Server 2005 database, I get the following error: "A connection cannot be made to the database. Set and check the connection string." The connection works fine when the test button is clicked, but fails when continuing in the wizard.

Any suggestions. We are trying to migrate from RS2000 to RS2005 and nothing in 2005 works.

View 6 Replies View Related

Refresh Chart Value On Behalf Of Clicking On The Chart

Mar 27, 2008



Hi Guys..

i don't know weather is it possible or not..but Can any One tell's me How can i refresh the Chart Values.. acutally what's happening..

i have two Chart in a reprot .. One is Main Category and other one is SubCategory... acutally what i want.. in Main Category chart sum of Quantities of Subcategory values comes in bar or any other format.. and when i click on Main chart any bar it's refresh the other chart and return the result of subcategory under that main category in details...

i don't know is this possible .. acutally i m very new in reproting.. infact that's my first report.. so i want to do this.. if any article or any help anyone can provide me..


Thanks

View 1 Replies View Related

How Get The Lift Chart In Datamining.i Am Not Geeting Mining Accuracy Chart And Mining Model Prediction

Sep 14, 2007



Hi,
I am not getting Mining Accuracy Chart and Min ing Model Prediction
Plz tel me how to do.And how to use the filter input data used to generate the lift chart and
select predictable mining model columns to show in the lift chart

View 1 Replies View Related

Org Chart

Apr 2, 2008

Hi,

trying to build Orgchart with MS Access
columns: Name (text), Boss (data source, Name), Phone (int)

the question - how to avoid the "loop"?

1. prohibit choice for the current employee to choose himself as a leader
2. prohibit choice for the current employee to choose any subordinate level employee as a leader

VBA is not an option, we are planning to move this table to MS SQL server, so it should be a choice with "SELECT from Name...." with exceptions or any other checks with warning/error message...?

thank you
Anthony

View 5 Replies View Related

Need Help With Chart

Feb 18, 2008

Hi there,

I'd like to ask how to approach a chart layout when I have the following table:

|--------------------------------------------------------||[Client Name] | [March 2008] | [April 2008] | [May 2008]|
| Client 1 | 200 | 100 | 500 |
| Client 2 | 150 | 600 | 300 || Client 3 | 540 | 102 | 256 ||--------------------------------------------------------|

And I would like the table to be like the one below:

It seems to me that I have to do some sort of pivot with my dataset/query before I could use it for the chart. Any ideas would be highly appreciated. I really need help with this. Thanks in advanced!

Regards,
Ver

View 3 Replies View Related

Chart Top N

Jun 22, 2007

With 2k5 I am trying to make the "Top N" operator, used in a chart "category," return only N categories. But it almost always returns more than N categories. Can someone explain the nuances of the Top N operator, so I can get past this?

View 6 Replies View Related

Chart - Bar Colors

May 4, 2005

Hi All,

I like RS for SQL server.
However, I am surprised (and frustrated) how limited the chart capabilities are; perhaps we have been spoiled by Excel...

Anyway, is there any way to change the color of the chart bars programatically.
I can select different schemas (excel, pastel, grayscale, etc) but I need to go a little bit further, is that much to ask?

Oh, by the way, we can't mix chart styles, can't we?
Need to show a chart and a line in the same report...

I appreciate your help on this, hopefully any answers to my questions might also help with other RS users with the same needs,

Thanks,
L

View 7 Replies View Related

Chart Problems

Nov 8, 2005

Hey all, I'm in a bit of a problem. I have a set of data on an excel spread sheet and i want that data to make a chart on a user form. I figured out how to get a blank chart on the user form but don't know how to link any data. Anyone think they can help?

View 1 Replies View Related

Organisation Chart

Mar 8, 2006

Hi folks,
I have a Employee Master table named "Employee_Master". This has got the fields like as follows,

Employee_ID
Employee_Name
Reporting_To


Now I need a query that can help me to build up the organisation chart. I have a query that gives me some data......... Its like

select emp.employee_id,emp.employee_name,
mgr.employee_name as reporting_manager
from employee_master emp ,employee_master mgr
where emp.reporting_to=mgr.employee_id

But the problem with this query is, it gives only 1:1 mapping. And my requirement is to build a tree structure.........

So please help me oput in this regard........


Please lemme know if the problem is not understood to ya guys.......


Waiting for the earliest reply..........


Thanks,
Rahul Jha

View 1 Replies View Related

Something Like A Pivot Chart

Jun 12, 2008

Hi,

Thanks a lot for answering my previous questions.
Here's one more thing that I need. I have my data in one table called as Team_Aggregate.
The fields there are TeamID, Date (1st of every month), Permanent Employeed, Contractor, Open Positions, Total Employees, Max Posns.

Now, when a user selects some months data that he wants to display I want it to appear something like this -

Columns as Month Names (Jan 08 Feb 08...June 08)
Rows as Team Name
and each cell = Team Total for that month and the corresponding team.
Can I do something like this in sql? I want to display the data on the web eventually where I am using Gridview with datasource and databind methods.


Thanks a lot

View 11 Replies View Related

SSRS Chart

Mar 19, 2007

Hi,

I have created an area graph.My requirement is the following:-

When the user moves his mouse over the graph on different points, the values corresponding to that points should be shown as a tool tip or as a textbox value.

Any idea to capture the values in the graph(Category,Series and Data values) and display them in a textbox or tool tip in a SSRS chart?



Thanks

Arobind.B

View 2 Replies View Related

Lift Chart

Feb 13, 2007

Is there a Lift chart viewer like the model viewers that can be embedded within your windows apps ? If not, then can this be easily created via Adomd.net api calls ? Has anyone done this easily in custom DM applications ?

Thanks in advance,

anil

View 3 Replies View Related

Bar Chart Scale

Sep 7, 2007



Can you have different scales on a bar chart. I want to chart sales and quantity. Oracle lets you label the top of the bar chart as money and the bottom as quantity.

I am dividing my sales by one million and quantity by one thousand to make them similar in size on the same chart. I am using the sum of the sales/1000000 as a point label. Is there any way to limit the number of decimal places displayed. Currently it is displaying something like 1.94889312043; 1.95M would be better.

Thank you.

View 2 Replies View Related

Lift Chart

Dec 25, 2007

how can i change the language of lift chart for description of vertical axis and horizontal axis and howcan i see the script of this chart for time series algorithm

View 1 Replies View Related

Regarding Chart Control

Mar 3, 2008



Hi All,

I have got a query regarding SSRS report chart control. Can i have a chart with both bars and lines within it?

I have a dataset which has two columns as my outputs.Can i have a chart showing bars for one column and line chart for the other column in the same chart?

I will appreciate if somebody can help me out.

Dinesh

View 3 Replies View Related

Chart Axis

Oct 17, 2007

I created a graph which retrieves value from database.And currently,my axis is in ranged 0-10.But i have a doubt that my value in will exceed my maximum y-axis value 10..My question is, could it be possible that i make my y-axis dynamic??Thanks!!

View 5 Replies View Related

Pie Chart Having Percentage

Aug 22, 2007



Hello,
I am working on generating a Pie Chart in Reporting Services. I want to display percentage (%) in the pie chart slices, rather than having the actual values, since it does not fit properly into charts. A percentage would be better as a report.

Hope the question is clear. I would be grateful to anyone who answers this question.

thanks a lot.

View 5 Replies View Related

Set Chart Properties

May 12, 2008

Hi,

I have a chart that is created in SSRS with the size property set to '15cm, 8.5cm', I want to set the height based on a parameter that is passed to the chart ( so that it fits onto a 1 page report it is fed through to), I have tried putting =Code.SetChartHeight() in the height property but it brings up an error saying it needs to be in a format like '8.5cm'. The SetChartHeight() function just returns the height parameter + 5.

Does anyone know how I can do this?

Many thanks in advance

View 4 Replies View Related

Problem In Chart

Jan 17, 2007

Hai all,

I am generating chart using the Sql Reporting services.I have done 2 charts. when i am clicking one chart it will navigate to another chart.It is happened in reports.

when i used in UI page(web Page). when click the chart it is not navigating to another chart.The same chart will appear when i click the chart.

Can u guys help me soon to solve this problem..

Thanks In advance.





View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved