3. Kompletní skript bez komentářů |
Top Previous Next |
procedure List1B12onChange(Sender: TCellProperty); var Chart : TfrxChartView; series,row : integer; ser : TfrxSeriesItem; begin // najdeme graf Chart:=TfrxChartView(Sheet.GetCellProperty('B12').frxReport.FindComponent('Chart')); if Chart<>nil then for series:=0 to 4 do begin ser := Chart.SeriesData.Items[series]; with ser do begin ser.YSource :=''; for row:=4 to 10 do if Sheet.Cells[series+3,row]='' then ser.YSource :=ser.YSource + '0;' else ser.YSource :=ser.YSource + Sheet.Cells[series+3,row]+';'; end; end; if Sheet.GetCellProperty('B12').frxReport<>nil then Sheet.GetCellProperty('B12').frxReport.ShowReport; end;
procedure CheckBoxClick(Sender: TObject); var Chart : TfrxChartView; begin Chart:=TfrxChartView(Sheet.GetCellProperty('B12').frxReport.FindComponent('Chart')); if Chart<>nil then begin Chart.Chart.View3D:=TCheckBox(Sender).Checked; Chart.Chart.View3DWalls:=TCheckBox(Sender).Checked; Chart.Chart.View3DOptions.Orthogonal:=TCheckBox(Sender).Checked;
if Sheet.GetCellProperty('B12').frxReport<>nil then Sheet.GetCellProperty('B12').frxReport.ShowReport; end; end;
// Priradi Eventy componentam procedure OnPrepareScript(Sender : TReportProperty); begin If Sheet.GetCellProperty('J8').CellComponent<>nil then TCheckBox(Sheet.GetCellProperty('J8').CellComponent).OnClick:=@CheckBoxClick; end;
begin end. |