Problem running on server with no-one logged on

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
max
Newbie
Newbie
Posts: 4
Joined: Tue Jun 26, 2007 12:00 am
Location: germany
Contact:

Problem running on server with no-one logged on

Post by max » Mon Nov 24, 2008 5:32 pm

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.

max
Newbie
Newbie
Posts: 4
Joined: Tue Jun 26, 2007 12:00 am
Location: germany
Contact:

it is an axis scaling problem

Post by max » Wed Nov 26, 2008 12:07 pm

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.

max
Newbie
Newbie
Posts: 4
Joined: Tue Jun 26, 2007 12:00 am
Location: germany
Contact:

workaroud

Post by max » Wed Nov 26, 2008 2:02 pm

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;

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Dec 01, 2008 2:04 pm

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply