빠른 보고서 4.13.1을 사용하고 있습니다. 내 요약 밴드에 차트의 번호를 표시해야하고, 나는 동적으로 그들을 밴드의 OnBeforePrint
이벤트 핸들러에서 생성하려고합니다. 문제는 차트가 올바르게 작성되었지만 시리즈에 추가 할 데이터가 표시되지 않는다는 것입니다. 내 OnBeforePrint
이벤트는 다음과 같습니다.코드에서 TfrxChartView를 만드는 방법은 무엇입니까?
var
dsSections,
dsTests,
dsHistory: TfrxDataSet;
Chart: TfrxChartView;
ChartCount: Integer;
begin
dsSections := Report.GetDataSet('frdTestSections');
dsTests := Report.GetDataSet('frdResults');
dsHistory := Report.GetDataSet('frdTestHistory');
ChartCount := 0;
dsSections.First;
while not dsSections.Eof do
begin
dsTests.First;
while not dsTests.Eof do
begin
if dsHistory.RecordCount > 0 then
begin
Chart := TfrxChartView.Create(rsHistory);
Chart.Left := (ChartCount mod 2) * 8 + 1;
Chart.Top := (ChartCount div 2) * 5 + 0.5;
Chart.Width := 8;
Chart.Height := 5;
Chart.Chart.Title.Text.Text := dsTests.Value('Name');
Chart.Chart.View3D := False;
Chart.AddSeries(csLine);
dsHistory.First;
while not dsHistory.Eof do
begin
ShowMessage(dsTests.Value('Name') + #13#10 + IntToStr(dsHistory.RecNo + 1) + ' ' +dsHistory.Value('Result')); // this is for debugging only
Chart.Series[0].Add(dsHistory.Value('Result'), IntToStr(dsHistory.RecNo + 1), clBlue);
dsHistory.Next;
end;
Inc(ChartCount);
end;
dsTests.Next;
end;
dsSections.Next;
end;
end;
무엇이 누락 되었습니까? TfrxChartView
의 재산이 있습니까? 나는 그다지 좋지 않다는 것을 설정해야합니까?