Webchart problems in Delphi2005
Posted: Thu Feb 16, 2006 6:10 pm
I tried to get webchart working in Delphi2005. I think we have to rewrite the Getchart.aspx.cs into Delphi.
private void Page_Load(object sender, System.EventArgs e)
{
string chartName=Request.QueryString["Chart"];
if (Session[chartName]!=null)
{
MemoryStream chartStream = new MemoryStream();
chartStream=((MemoryStream)Session[chartName]);
Response.OutputStream.Write(chartStream.ToArray(),0,(int)chartStream.Length);
chartStream.Close();
Session.Remove(chartName);
}
}
Is someone able to translate it into Delphi language?
It should like :
procedure TGetchart.Page_Load(sender: System.Object; e: System.EventArgs);
Var Chartname : String;
ChartStream : Memorystream;
begin
chartName:=Request.QueryString['Chart'];
if (Session[chartName]=nil) then begin
Chartstream:=Memorystream.Create;
Chartstream.Read(Session[chartName]);
Response.OutputStream.Write(chartStream.ToArray), 0,chartStream.Length);
chartStream.Close;
end;
Session.Remove(chartName);
end;
But the chartstream lines are wrong.
Thanks,
Hans
private void Page_Load(object sender, System.EventArgs e)
{
string chartName=Request.QueryString["Chart"];
if (Session[chartName]!=null)
{
MemoryStream chartStream = new MemoryStream();
chartStream=((MemoryStream)Session[chartName]);
Response.OutputStream.Write(chartStream.ToArray(),0,(int)chartStream.Length);
chartStream.Close();
Session.Remove(chartName);
}
}
Is someone able to translate it into Delphi language?
It should like :
procedure TGetchart.Page_Load(sender: System.Object; e: System.EventArgs);
Var Chartname : String;
ChartStream : Memorystream;
begin
chartName:=Request.QueryString['Chart'];
if (Session[chartName]=nil) then begin
Chartstream:=Memorystream.Create;
Chartstream.Read(Session[chartName]);
Response.OutputStream.Write(chartStream.ToArray), 0,chartStream.Length);
chartStream.Close;
end;
Session.Remove(chartName);
end;
But the chartstream lines are wrong.
Thanks,
Hans