home *** CD-ROM | disk | FTP | other *** search
- unit UPrint;
-
- interface
-
- uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- Tempunit, ComCtrls, StdCtrls, Buttons, OleCtrls, CELLLib_TLB, ExtCtrls;
-
- type
- TFPrint = class(TTemplate)
- BitBtn2: TBitBtn;
- BitBtn3: TBitBtn;
- procedure FormShow(Sender: TObject);
- procedure BitBtn2Click(Sender: TObject);
- procedure BitBtn3Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- FPrint: TFPrint;
-
- implementation
-
- {$R *.DFM}
-
- procedure TFPrint.FormShow(Sender: TObject);
- begin
- inherited;
- Cell1.DoSetCellString( 0, 0, 'Rate');
- Cell1.DoSetCellString( 1, 0, '3 months');
- Cell1.DoSetCellString( 2, 0, '6 mouths');
- Cell1.DoSetCellString( 3, 0, '1 year');
- Cell1.DoSetCellString( 4, 0, '2 years');
- Cell1.DoSetCellString( 5, 0, '3 years');
- Cell1.DoSetCellString( 6, 0, '5 years');
-
- Cell1.DoSetCellString( 0, 1, 'Rate of mouth');
- Cell1.DoSetCellValue( 1, 1, 2.4);
- Cell1.DoSetCellValue( 2, 1, 3.45);
- Cell1.DoSetCellValue( 3, 1, 4.725);
- Cell1.DoSetCellValue( 4, 1, 4.95);
- Cell1.DoSetCellValue( 5, 1, 5.175);
- Cell1.DoSetCellValue( 6, 1, 5.55);
-
- Cell1.DoSetCellString( 0, 2, 'Rate of year');
- Cell1.DoSetCellValue(1, 2, 2.88);
- Cell1.DoSetCellValue(2, 2, 4.14);
- Cell1.DoSetCellValue(3, 2, 5.67);
- Cell1.DoSetCellValue(4, 2, 5.94);
- Cell1.DoSetCellValue(5, 2, 6.21);
- Cell1.DoSetCellValue(6, 2, 6.66);
-
-
- Cell1.DoJoinCells( 1, 4, 5, 8);
- Cell1.DoSetRefChart( 1, 4, 0, 0, 6, 2);
-
- Cell1.DoJoinCells( 1, 10, 5, 14);
- Cell1.DoSetChart( 1, 10, 5, 5);
-
- Cell1.DoSetChartStringData( 1, 10, 0, 0, 'Region');
- Cell1.DoSetChartStringData( 1, 10, 1, 0, 'Peking');
- Cell1.DoSetChartStringData( 1, 10, 2, 0, 'Hongkong');
- Cell1.DoSetChartStringData( 1, 10, 3, 0, 'Mocao');
- Cell1.DoSetChartStringData( 1, 10, 4, 0, 'Taipei');
-
- Cell1.DoSetChartStringData( 1, 10, 0, 1, '1 quarter');
- Cell1.DoSetChartStringData( 1, 10, 0, 2, '2 quarter');
- Cell1.DoSetChartStringData( 1, 10, 0, 3, '3 quarter');
- Cell1.DoSetChartStringData( 1, 10, 0, 4, '4 quarter');
-
- Cell1.DoSetChartValueData( 1, 10, 1, 1, 29876);
- Cell1.DoSetChartValueData( 1, 10, 1, 2, 34123);
- Cell1.DoSetChartValueData( 1, 10, 1, 3, 42221);
- Cell1.DoSetChartValueData( 1, 10, 1, 4, 52123);
-
- Cell1.DoSetChartValueData( 1, 10, 2, 1, 32365);
- Cell1.DoSetChartValueData( 1, 10, 2, 2, 35432);
- Cell1.DoSetChartValueData( 1, 10, 2, 3, 30283);
- Cell1.DoSetChartValueData( 1, 10, 2, 4, 45322);
-
- Cell1.DoSetChartValueData( 1, 10, 3, 1, 32007);
- Cell1.DoSetChartValueData( 1, 10, 3, 2, 23481);
- Cell1.DoSetChartValueData( 1, 10, 3, 3, 40624);
- Cell1.DoSetChartValueData( 1, 10, 3, 4, 34528);
-
- Cell1.DoSetChartValueData( 1, 10, 4, 1, 31232);
- Cell1.DoSetChartValueData( 1, 10, 4, 2, 30345);
- Cell1.DoSetChartValueData( 1, 10, 4, 3, 27943);
- Cell1.DoSetChartValueData( 1, 10, 4, 4, 32109);
-
- Cell1.DoSetChartGeneralData( 1, 10, 1, False, 'Sales', 'chart 2', 'ten thousand');
- Cell1.DoRefreshChart( 1, 10);
- Cell1.PageLabelVisible := False;
- end;
-
- procedure TFPrint.BitBtn2Click(Sender: TObject);
- begin
- inherited;
- Cell1.DoPrint(True);
- end;
-
- procedure TFPrint.BitBtn3Click(Sender: TObject);
- begin
- inherited;
- Cell1.DoPrintPreview(True);
- end;
-
- end.
-