Hello,
I have three programs that use TeeChart and run fine. They can be started by scheduler and then will open a database, create (among other output) some graphs and save them as .png-files and exit. (BDS2006 / Tee7; D2007 / Tee8).
Now I have to run these programs on a Windows2003 Server. Everything is ok as long as I am logged on.
When I am not logged on the programs will run, produce every output they are meant to, except the graphs. The png-files exist, but contain a graph that has no data. The scheduled task runs on my account.
Is there any similar expierience, any hint how to deal with this ?
Thanks for help.
Problem running on server with no-one logged on
it is an axis scaling problem
I found out that it is an axis scaling problem. At least if I set the Bottomaxis to fixed min and max, it works.
The bottom axis is a DateTime axis. It is set to autoscaling.
Anyone any idea why autoscaling does not work in a scheduled task, but works when logged on ? Whats the difference, anyway?
Max.
The bottom axis is a DateTime axis. It is set to autoscaling.
Anyone any idea why autoscaling does not work in a scheduled task, but works when logged on ? Whats the difference, anyway?
Max.
workaroud
ok, there is a bug somewhere.
In case someone needs it, here's the workaround for my case:
In case someone needs it, here's the workaround for my case:
Code: Select all
procedure TfrmStandardGrafik.BottomAxis_SetMinMax(AChart: TChart);
/// <summary>
/// workaround if Bottomaxis.automatic fails (if not logged on on server)
/// </summary>
var
i: Integer;
min, max: TDateTime;
begin
min := Now;
max := min;
with AChart do begin
for i := 0 to SeriesList.Count-1 do
begin
if Series[i].MinXValue < min then min := Series[i].MinXValue;
if Series[i].MaxXValue < max then max := Series[i].MaxXValue;
end;
BottomAxis.Maximum := max;
BottomAxis.Minimum := min;
end;
end;
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi max,
Thanks for the information. Could you reproduce the issue in different machines? If not, could you please try it? If the problem persists could you please send us a simple example project we can run "as-is" to reproduce the problem here?
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
Thanks for the information. Could you reproduce the issue in different machines? If not, could you please try it? If the problem persists could you please send us a simple example project we can run "as-is" to reproduce the problem here?
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
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 |