DB Chart
BJL
Brussels, Belgium
Working with FR 3.14 and BCB6
In a bar chart having a DateTime X axis, the source being a Datetime field of a Query DataSet, I want to show the dates in the format ???yyyy??? (only years).
Setting BottomAxis.DateTimeFormat to yyyy is recognized by the designer. The query being not active, 0 is shown as 1899 which is the year of the date 0.
However, the chart displayed after preparation does not take the parameter into account and shows the dates according to the ShortDateFormat of the system.
I have tried to change the ShortDateFormat to ???yyyy??? before calling PrepareReport, but this does not solve the problem.
Even using OnBeforePrint does not work.
Any idea?
Thanks for helping.
BJL
In a bar chart having a DateTime X axis, the source being a Datetime field of a Query DataSet, I want to show the dates in the format ???yyyy??? (only years).
Setting BottomAxis.DateTimeFormat to yyyy is recognized by the designer. The query being not active, 0 is shown as 1899 which is the year of the date 0.
However, the chart displayed after preparation does not take the parameter into account and shows the dates according to the ShortDateFormat of the system.
I have tried to change the ShortDateFormat to ???yyyy??? before calling PrepareReport, but this does not solve the problem.
Even using OnBeforePrint does not work.
procedure Chart1OnBeforePrint(Sender: TfrxComponent);
begin
 Chart1.Chart.BottomAxis.DateTimeFormat := 'yyyy';
end;
This code does not solve the problem.Any idea?
Thanks for helping.
BJL
Comments
FormatDateTime('yyyy', <db."fld">)