Page 1 of 1

Problem running on server with no-one logged on

Posted: Mon Nov 24, 2008 5:32 pm
by 10545689
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.

it is an axis scaling problem

Posted: Wed Nov 26, 2008 12:07 pm
by 10545689
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.

workaroud

Posted: Wed Nov 26, 2008 2:02 pm
by 10545689
ok, there is a bug somewhere.
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;

Posted: Mon Dec 01, 2008 2:04 pm
by narcis
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.