ASE Home Page Products Download Purchase Support About ASE
ChartDirector General
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  How Can i save a png file automatically
Posted by Rodrigo Vargas on Oct-06-2012 05:51
ASP classic script
at the end of script :

' Output the chart
Response.ContentType = "image/png"
Response.BinaryWrite c.makeChart2(cd.PNG)
Response.End


?How can i save it in a local folder automatically?

  Re: How Can i save a png file automatically
Posted by Peter Kwan on Oct-08-2012 23:29
Hi Rodrigo,

You may use BaseChart.makeChart. Note that BaseChart.makeChart expect a file path name to store the image, not a URL path. If you are using a URL path, please use Server.MapPath to convert it to a file system path before passing the path to ChartDirector:

For example:

Call c.makeChart("c:\\aaa.png")

or

Call c.makeChart(Server.MapPath("\\tmpcharts\\aaa.png"))

Note that you must make sure the directory that stores the chart image exist. Also, please make sure the directory is readable and writable by the IIS anonymous user. By default, the anonymous user cannot write to any directory. You would need to configure your directory security to enable "everyone" to have read/write access so that IIS can store the image file in the directory.

Hope this can help.

Regards
Peter Kwan

  Re: How Can i save a png file automatically
Posted by Rodrigo Vargas on Oct-08-2012 23:45
thank you it works with configure  iis allow autentication "Anonimous" and  directory security to enable "everyone".