Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 2nd, 2003, 12:13 AM
Authorized User
 
Join Date: Jun 2003
Location: , , .
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default Graphs

Hi, all:

I need to do some statistics with data in SQL SERVER DB. Basically, we need to generate some graphs, eg. bar, pie and line, etc. How can I create these graphs and display them in my WebForm? Please help. Thanks in advance.
__________________
Jie
  #2 (permalink)  
Old July 2nd, 2003, 12:19 AM
Friend of Wrox
Points: 3,558, Level: 25
Points: 3,558, Level: 25 Points: 3,558, Level: 25 Points: 3,558, Level: 25
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: California, USA
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

Dear friend:
make ur reports & graphs in Crystal Report & then add them in ur WebForm. ASPX file works fine with Crystal Report.

Always:),
Hovik Melkomian.
  #3 (permalink)  
Old July 2nd, 2003, 12:31 AM
Authorized User
 
Join Date: Jun 2003
Location: , , .
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for help.
Always :)
  #4 (permalink)  
Old July 4th, 2003, 02:48 PM
Authorized User
 
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You could also try using tables in html. I have found it very useful for simple bar charts.

Response.Write("<table>")
Do While DataReader.Read() ...
If DataReader("Percentage") < 10 Then
  strColor = "Red"
Else
  strColor = "Green"
End If
Response.Write("<tr><td>" & DataReader("Profit") & "</td><td width='100px'><img style='background-color:" & strColor & ";' src='pixel.gif' height='20px' width='" & DataReader("Percentage") & "px'></td>")
Loop
Response.Write("</table>")

The pixel.gif is a single pixel transparent gif. That way you can choose the colour for the bar. The above should give you the concept.

Regards

Skin
  #5 (permalink)  
Old August 1st, 2003, 06:23 PM
Authorized User
 
Join Date: Jul 2003
Location: , , .
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to merediths
Default


Using HTML tables to simulate a graph would probably be the easiest solution, however if you nee more flexibility you can always create an Image object, use draw your graph on it, and use it's Save method specifiy an ImageFormat that is renderable by the browser (png probably would be good). You could actually have the <img src='graphname?args=arg'> in you webpage and then a seperate IHttpServer object that generates the graph and returns a stream..

Regards,
Meredith Shaebanyan

 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access and Graphs mat41 Access 1 December 8th, 2008 12:15 AM
Graphs in Forms Bob Gambles VB How-To 1 July 12th, 2005 01:49 PM
Line graphs goldablasha C# 0 April 25th, 2005 01:31 AM
line graphs goldablasha C# 1 April 6th, 2005 02:36 AM



All times are GMT -4. The time now is 03:25 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.