lazarus/components/lazreport/source/lr_dsopt.pas
jesus 118cc819c4 LazReport: New big patch from Alexey Lagunov (with small changes)
-------------------------------------------------------
Addfunction / frFuncStr
  - Fixed string functions - accounted for UTF8 strings

DialogControls
  - Fixed reports generation with built-in query mode, MDI (multiple reports open for viewing at the same time)
  - Fixed UNDO in editor
  - Added property HINT for dialog controls
  - A new component - TlrRadioGroup

lrOfficeImport
  - New tool reports designer to import data from a spreadsheet as a report template

source
  - The object TfrMemoView added new handlers
    - OnClick - Event when you click on TfrMemoView in playback mode built reports
    - OnMouseEnter - Event at the Enter of the mouse over TfrMemoView in playback mode built reports
    - OnMouseLeave - Event at the Leave of the mouse TfrMemoView in playback mode built reports

  - The object TfrMemoView added new properties
    - Cursor - the mouse cursor when moving over TfrMemoView in playback mode built reports
    - DetailReport - a reference to the detail-report - called when the user clicks the mouse on TfrMemoView in playback mode built reports

  - A mechanism to detail-report - call a detailed report of the current report
  - In ineterpretatore added new features (for compatibility with FastReport 2.5):
      - FINALPASS
      - CURY
      - PAGEHEIGH
      - PAGEWIDTH
  - In the reports, the editor started saving paramerov editor (the location of the Object Inspector, fonts)
  - In the reports, the editor corrected the addition of new tools (implemented a new tool - Import report template from excel/OpenOffice)
  - Editor of reports finalized Inspector data - now you can also insert variables
  - For export to txt implemented request form export options

images
  - Made in the resources icon tool insert fields in a report from the editor

Demo included (detail_reports)

And new extensions:
- import report template from calc/excel
- send email from report preview (for sending used local mail app, installed on user PC - in windows its TheBat! and Mozilla Thunderbird).
  In future I'm plan make direct send.

git-svn-id: trunk@46079 -
2014-08-28 04:10:20 +00:00

152 lines
3.7 KiB
ObjectPascal

{*****************************************}
{ }
{ FastReport v2.3 }
{ Designer options }
{ }
{ Copyright (c) 1998-99 by Tzyganenko A. }
{ }
{*****************************************}
unit LR_DsOpt;
interface
{$I LR_Vers.inc}
uses
Classes, SysUtils, LResources,
Forms, Controls, Graphics, Dialogs,
Buttons, StdCtrls,ComCtrls, ButtonPanel, Spin,
LR_Const;
type
{ TfrDesOptionsForm }
TfrDesOptionsForm = class(TForm)
ButtonPanel1: TButtonPanel;
CheckBox1: TCheckBox;
ComboBox1: TComboBox;
ComboBox2: TComboBox;
GroupBox6: TGroupBox;
GroupBox7: TGroupBox;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
PageControl1: TPageControl;
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
SpinEdit1: TSpinEdit;
SpinEdit2: TSpinEdit;
Tab1: TTabSheet;
GroupBox1: TGroupBox;
CB1: TCheckBox;
CB2: TCheckBox;
GroupBox2: TGroupBox;
RB4: TRadioButton;
RB5: TRadioButton;
GroupBox3: TGroupBox;
RB6: TRadioButton;
RB7: TRadioButton;
RB8: TRadioButton;
GroupBox4: TGroupBox;
RB1: TRadioButton;
RB2: TRadioButton;
RB3: TRadioButton;
GroupBox5: TGroupBox;
CB3: TCheckBox;
CB4: TCheckBox;
CB5: TCheckBox;
TabSheet1: TTabSheet;
procedure FormCreate(Sender: TObject);
procedure RadioButton1Change(Sender: TObject);
private
procedure FillFonst;
public
{ Public declarations }
end;
implementation
uses LCLType, LCLIntf;
{$R *.lfm}
function EnumFontsProc( var LogFont: TEnumLogFontEx; var {%H-}Metric: TNewTextMetricEx;
FontType: Longint; {%H-}Data: LParam):LongInt; stdcall;
var
S: String;
Lst: TStrings;
begin
s := StrPas(LogFont.elfLogFont.lfFaceName);
Lst := TStrings(PtrInt(Data));
if Lst.IndexOf(S)<0 then
Lst.AddObject(S, TObject(PtrInt(FontType)));
Result := 1;
end;
procedure TfrDesOptionsForm.FormCreate(Sender: TObject);
begin
PageControl1.ActivePageIndex:=0;
Caption := sDesOptionsFormOpt;
Tab1.Caption := sDesOptionsFormDes;
GroupBox1.Caption := sDesOptionsFormGrid;
GroupBox2.Caption := sDesOptionsFormObj;
GroupBox3.Caption := sDesOptionsFormUnits;
GroupBox4.Caption := sDesOptionsFormGrdSize;
GroupBox5.Caption := sDesOptionsFormOther;
CB1.Caption := sDesOptionsFormShowGrd;
CB2.Caption := sDesOptionsFormAlignGrd;
CB3.Caption := sDesOptionsFormColoredButton;
CB4.Caption := sDesOptionsFormEditing;
CB5.Caption := sDesOptionsFormShowBand;
RB1.Caption := sDesOptionsForm4Pix;
RB2.Caption := sDesOptionsForm8Pix;
RB3.Caption := sDesOptionsForm18pix;
RB4.Caption := sDesOptionsFormShape;
RB5.Caption := sDesOptionsFormContents;
RB6.Caption := sDesOptionsFormPix;
RB7.Caption := sDesOptionsFormmm;
RB8.Caption := sDesOptionsFormInch;
FillFonst;
RadioButton1Change(nil);
end;
procedure TfrDesOptionsForm.RadioButton1Change(Sender: TObject);
begin
Label1.Enabled:=RadioButton2.Checked;
Label2.Enabled:=RadioButton2.Checked;
ComboBox1.Enabled:=RadioButton2.Checked;
SpinEdit1.Enabled:=RadioButton2.Checked;
end;
procedure TfrDesOptionsForm.FillFonst;
var
DC: HDC;
Lf: TLogFont;
S: String;
{$IFDEF USE_PRINTER_FONTS}
Lst: TStrings;
i: Integer;
j: PtrInt;
{$ENDIF}
begin
ComboBox1.Items.Clear;
DC := GetDC(0);
try
Lf.lfFaceName := '';
Lf.lfCharSet := DEFAULT_CHARSET;
Lf.lfPitchAndFamily := 0;
EnumFontFamiliesEx(DC, @Lf, @EnumFontsProc, PtrInt(ComboBox1.Items), 0);
finally
ReleaseDC(0, DC);
end;
ComboBox2.Items.Assign(ComboBox1.Items);
end;
end.