View Single Post
  #2 (permalink)  
Old October 31st, 2003, 07:52 PM
merediths merediths is offline
Authorized User
Join Date: Jul 2003
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to merediths

Hello Margret,

  1.) As far as graphing data goes there are a number of ways you can accomplish this, depending on how complex your dataset is / how fancy you want to get. The first way is to create a bitmap on the server ... i.e. grab a Device Context and draw on it was GDI functions as you would in a normal windows program. Unfortunately, the win32 API doesn't have built in .gif / .jpeg support, so you will need to either write your own encoded or find a ready-made component / object you can plug into your app to achieve this. You may already have something on your system you can use ... review the SDK documention for ImageCodecInfo objects and the GetImageEncoders function.
   alternatively, I find it quick and efficient to simulate simple graphs using html tables...i.e. by setting the background colors of cells to create bars of varios colors and lengths.

2.) You should be able to foce the user to open/save the file by playing with the content-type header ( i.e. set it to application/octet stream or something of that nature) and pointint the user at it with an htttp-redirect, *however* that will only work for one file...if you want multiple files, perhaps providing links to all of them on a results page would work, or you could zip them on the server and push the zip to the client.

Meredith Shaebanyan

Reply With Quote