Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Graphics with microsoft sql server

Author  Topic 

mym21
Starting Member

10 Posts

Posted - 2002-08-21 : 09:07:37
Hi there
I would like to know if it's possible to create graphics with a query? I mean, graphics as a pie or something like that.
Thanks in advance
Myriam

KnooKie
Aged Yak Warrior

623 Posts

Posted - 2002-08-21 : 09:17:57
Well - you can use the results of a query to create a pie chart or whatever but you'll need to pass the results to a program such as Corel Draw which can draw charts based on your query results.

The query on its own cannot draw a chart. You can do some clever things with queries but this is a bridge too far i'm afraid.

Paul
Go to Top of Page

mym21
Starting Member

10 Posts

Posted - 2002-08-21 : 09:20:57
Paul

First thanks to took the time to answer to my question.
So I can't use analysis services to do the pie graphic that I want?
Thanks
Myriam

Go to Top of Page

Arnold Fribble
Yak-finder General

1961 Posts

Posted - 2002-08-21 : 10:12:37
You could output the result of a query as XML and write an XSL transformation to turn it into SVG. That could be rendered by a suitably-equipped web-browser or a server-side processor like Apache Batik.


Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2002-08-21 : 10:16:51
You could also probably use excel or something to create the chart from an sp using com services.
Doesn't sound like a good idea though.

Better to use a client which is good at these things to create it.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

jasper_smith
SQL Server MVP & SQLTeam MVY

846 Posts

Posted - 2002-08-21 : 10:18:57
Graphics are a front end issue. You can certainly use tools like ProClarity,Business Onjects,Excel etc to generate pie charts from cube data however this is not something that is done in TSQL or MDX.

HTH
Jasper Smith

[Totally OT]
Having said that here's a world cup (soccer to americans) smilie from SQL Server MVP Itzik Ben-Gan

 
CREATE TABLE #Words
(
key_col int NOT NULL IDENTITY PRIMARY KEY,
word varchar(15) NOT NULL
)

SET NOCOUNT ON

INSERT INTO #Words VALUES( 0x42 )
INSERT INTO #Words VALUES( 0x42 )
INSERT INTO #Words VALUES( 0x72 )
INSERT INTO #Words VALUES( 0x72 )
INSERT INTO #Words VALUES( 0x61 )
INSERT INTO #Words VALUES( 0x61 )
INSERT INTO #Words VALUES( 0x7A )
INSERT INTO #Words VALUES( 0x7A )
INSERT INTO #Words VALUES( 0x69 )
INSERT INTO #Words VALUES( 0x69 )
INSERT INTO #Words VALUES( 0x6C )
INSERT INTO #Words VALUES( 0x6C )
INSERT INTO #Words VALUES( 0x21 )
INSERT INTO #Words VALUES( 0x21 )

SELECT
CASE
WHEN key_col IN(2,3,max_key-1,max_key-2) THEN REPLICATE('/',4)
ELSE SPACE(4)
END +
CASE
WHEN key_col IN(max_key/2,max_key/2+1) THEN REPLICATE('/', 8)
ELSE SPACE(8)
END +
SPACE(SQRT(SQUARE(radius)-SQUARE(ABS(radius-key_col+1)))) +
CAST(word AS VARCHAR(15)) +
REPLICATE('~', max_len - LEN(word))
FROM #Words
CROSS JOIN
(SELECT
(1. * COUNT(*) - 1) / 2 AS radius,
MAX(LEN(word)) AS max_len,
MAX(key_col) AS max_key
FROM #Words) AS R
ORDER BY key_col

DROP TABLE #Words

Go to Top of Page

mym21
Starting Member

10 Posts

Posted - 2002-08-21 : 14:23:07
Okay guys
So what would you use to make a graphics from a cube?
Myriam

Go to Top of Page

AjarnMark
SQL Slashing Gunting Master

3246 Posts

Posted - 2002-08-21 : 15:11:59
quote:
Having said that here's a world cup (soccer to americans) smilie from SQL Server MVP Itzik Ben-Gan



Somebody's got WAAAYYYY too much time on their hands...

Nice job, though.

Oh, and Myriam, who needs to view this? Just you? Just inernal? I like to do charting in Excel when I can. If you need it online, and every viewer is guaranteed to have Office installed you can use Office Web Components (OWC). Or you may just be better off using a third party graph builder. 'course I have practically zero experience in cubes, so I might be off-track here.

Edited by - ajarnmark on 08/21/2002 15:14:20
Go to Top of Page

mym21
Starting Member

10 Posts

Posted - 2002-08-21 : 15:19:49
AjarnMark
No not just me. My boss would like to implant it in a program that we will have to build. So all our customers will see it. It have to look good and to be quick.
Thanks



Edited by - mym21 on 08/21/2002 15:21:29
Go to Top of Page

Teroman
Posting Yak Master

115 Posts

Posted - 2002-08-22 : 11:38:46
try the demo of XLCubed from www.XLCubed.com

its free to try, lets you query cubes direct from excel, then just use the normal excel functions to draw all the graphs you like

actually, you can use all the excel functions there are on it because it doesnt insert some massive pivot table or other ActiveX type control into your sheet, all nice native excel stuff

col

Edited by - teroman on 08/22/2002 11:44:21
Go to Top of Page
   

- Advertisement -