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
Webchart problems in Delphi2005
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Hans,
This is the GetChart code in Delphi:
In those cases, it may be of great help using Borland’s BabelCode Client.
This is the GetChart code in Delphi:
Code: Select all
procedure TWebForm2.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 := System.IO.MemoryStream.Create;
chartStream := (System.IO.MemoryStream(Session[chartName]));
Response.OutputStream.Write(chartStream.ToArray, 0, (Integer(chartStream.Length)));
chartStream.Close;
Session.Remove(chartName);
end;
end;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |