I am currently making a survey application and basically, what
I want is to present a bar graph on every survey.. for example,
i'm using a grid view control to present the surveys...
Title | Bar Graph |
---------------------------------------------------------
survey1 | Graph for Survey1 |
---------------------------------------------------------
survey2 | Graph for Survey2 |
On my page that would display the table above,
when I add this code on the .aspx.cs
b.Save(Response.OutputStream, ImageFormat.Jpeg);
it just gives be a rectangle and nothing more... all my data on the
table are not displayed....
then, when I tried to use this line
Graphics
g = report.MakeSurveyGraph(surveyid, 10, 10, 190, 15);
try
System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+. at System.Drawing.Image.Save(String filename, ImageCodecInfo encoder, EncoderParameters encoderParams) at System.Drawing.Image.Save(String
filename, ImageFormat format) at surveyapp._Default.gvSurveys_RowDataBound(Object sender, GridViewRowEventArgs e) in C:\Documents and Settings\itspecialist.LIPI-917750389F\My Documents\Visual Studio 2008\Projects\surveyapp\surveyapp\Default.aspx.cs:line 72
I'm new to this and tryn to find my way on this one... any ideas, suggestions and help
are greatly appreciated... Thanks
Member
4 Points
79 Posts
Help on Graphs
Feb 02, 2009 06:48 AM|moisescujardo|LINK
Hello guys,
I'm badly in need of your help...
I am currently making a survey application and basically, what
I want is to present a bar graph on every survey.. for example,
i'm using a grid view control to present the surveys...
Title | Bar Graph |
---------------------------------------------------------
survey1 | Graph for Survey1 |
---------------------------------------------------------
survey2 | Graph for Survey2 |
On my page that would display the table above,
when I add this code on the .aspx.cs
b.Save(Response.OutputStream, ImageFormat.Jpeg);
it just gives be a rectangle and nothing more... all my data on the
table are not displayed....
Graphics
g = report.MakeSurveyGraph(surveyid, 10, 10, 190, 15); try{
b.Save("~\\Graphics\\g" + surveyid + ".jpeg", ImageFormat.Jpeg);}
catch (Exception ex){
test.Text = ex.ToString();
}
It gives me the error message below:
System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+. at System.Drawing.Image.Save(String filename, ImageCodecInfo encoder, EncoderParameters encoderParams) at System.Drawing.Image.Save(String filename, ImageFormat format) at surveyapp._Default.gvSurveys_RowDataBound(Object sender, GridViewRowEventArgs e) in C:\Documents and Settings\itspecialist.LIPI-917750389F\My Documents\Visual Studio 2008\Projects\surveyapp\surveyapp\Default.aspx.cs:line 72
I'm new to this and tryn to find my way on this one... any ideas, suggestions and help
are greatly appreciated... Thanks
Moist
Member
42 Points
61 Posts
Re: Help on Graphs
Feb 02, 2009 07:21 AM|gvrkraju|LINK
I think it doesn support for grid