Page 1 of 1

TQRChart and datetime axis

Posted: Fri Aug 20, 2004 7:18 pm
by 5890144
I have a TQRChart, and I want the bottom axis to be a datetime axis.

I am using the following code to initialize the axis values:

With FirstHalf.BottomAxis do
begin
Increment:=DateTimeStep[dtOneHour];
DateTimeFormat:='hh:mm:ss';
RoundFirstLabel:=False;
Automatic := false;
SetMinMax(startTime, endTime);
end;

When I use a TChart component and just display the graph on the screen, the axis shows up correctly. When I try to use TQRChart so I can print the same graph, the quick report with this graph never shows up in the preview screen. I have traced it back to this block of code. For some reason, when it hits the "Increment :=" statement, it doesn't seem able to process that and never moves on to the next line of code. I tried commenting out the "Increment:=" statement, but then it gets stuck on the DateTimeFormat statement.

Has anyone else ever seen this problem? How do I get around this? I need to set the values of the axis at runtime.

Any help would be appreciated.

Thanks,
Shannon

Nevermind

Posted: Fri Aug 20, 2004 7:57 pm
by 5890144
I figured out my problem. I was using the wrong chart object. I needed to reference the TQRDBChart when doing my axis scaling. Sorry.