This commit is contained in:
ddf 2025-10-21 14:07:46 +08:00
parent 87728906b3
commit 43e5c78e1d
3 changed files with 29 additions and 24 deletions

View File

@ -1,8 +1,8 @@
object frmLabelPrint: TfrmLabelPrint object frmLabelPrint: TfrmLabelPrint
Left = 880 Left = 880
Top = 409 Top = 409
Width = 277 Width = 282
Height = 178 Height = 204
Caption = #25253#34920#25171#21360 Caption = #25253#34920#25171#21360
Color = clBtnFace Color = clBtnFace
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
@ -21,8 +21,8 @@ object frmLabelPrint: TfrmLabelPrint
object Panel1: TPanel object Panel1: TPanel
Left = 0 Left = 0
Top = 0 Top = 0
Width = 269 Width = 274
Height = 147 Height = 173
Align = alClient Align = alClient
BevelInner = bvRaised BevelInner = bvRaised
BevelOuter = bvLowered BevelOuter = bvLowered
@ -32,7 +32,7 @@ object frmLabelPrint: TfrmLabelPrint
TabOrder = 0 TabOrder = 0
object btnShow: TSpeedButton object btnShow: TSpeedButton
Left = 13 Left = 13
Top = 91 Top = 115
Width = 105 Width = 105
Height = 49 Height = 49
Caption = #39044#35272 Caption = #39044#35272
@ -59,7 +59,7 @@ object frmLabelPrint: TfrmLabelPrint
end end
object btnPrint: TSpeedButton object btnPrint: TSpeedButton
Left = 153 Left = 153
Top = 91 Top = 115
Width = 105 Width = 105
Height = 49 Height = 49
Caption = #25171#21360 Caption = #25171#21360
@ -77,13 +77,11 @@ object frmLabelPrint: TfrmLabelPrint
Width = 105 Width = 105
Height = 29 Height = 29
Caption = #25171#21360#36873#39033 Caption = #25171#21360#36873#39033
Color = clWhite
Font.Charset = GB2312_CHARSET Font.Charset = GB2312_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -20 Font.Height = -20
Font.Name = #23435#20307 Font.Name = #23435#20307
Font.Style = [fsBold] Font.Style = [fsBold]
ParentColor = False
ParentFont = False ParentFont = False
TabOrder = 0 TabOrder = 0
end end
@ -144,20 +142,20 @@ object frmLabelPrint: TfrmLabelPrint
Text = '1' Text = '1'
Width = 71 Width = 71
end end
object ComboBox_Print: TcxComboBox object ComboBox_Print: TComboBox
Left = 29 Left = 13
Top = 192 Top = 81
Width = 244
Height = 29
Style = csDropDownList
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = #24494#36719#38597#40657
Font.Style = []
ItemHeight = 21
ParentFont = False ParentFont = False
Properties.DropDownListStyle = lsFixedList
Style.Font.Charset = GB2312_CHARSET
Style.Font.Color = clWindowText
Style.Font.Height = -16
Style.Font.Name = #24494#36719#38597#40657
Style.Font.Style = []
Style.IsFontAssigned = True
TabOrder = 4 TabOrder = 4
Visible = False
Width = 245
end end
end end
object ADOQueryTemp: TADOQuery object ADOQueryTemp: TADOQuery

View File

@ -5,7 +5,7 @@ interface
uses uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage, Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
cxEdit, DB, cxDBData, ToolWin, ComCtrls, cxGridCustomTableView, Printers, cxEdit, DB, cxDBData, ToolWin, ComCtrls, cxGridCustomTableView,
cxGridTableView, cxGridDBTableView, cxGridLevel, cxClasses, cxControls, cxGridTableView, cxGridDBTableView, cxGridLevel, cxClasses, cxControls,
cxGridCustomView, cxGrid, DBClient, ADODB, ImgList, StdCtrls, ExtCtrls, cxGridCustomView, cxGrid, DBClient, ADODB, ImgList, StdCtrls, ExtCtrls,
cxTextEdit, cxGridCustomPopupMenu, cxGridPopupMenu, cxLookAndFeels, cxTextEdit, cxGridCustomPopupMenu, cxGridPopupMenu, cxLookAndFeels,
@ -49,7 +49,6 @@ type
ADOQueryCmd: TADOQuery; ADOQueryCmd: TADOQuery;
ADO_While: TADOQuery; ADO_While: TADOQuery;
ComboBox1: TcxComboBox; ComboBox1: TcxComboBox;
ComboBox_Print: TcxComboBox;
btnPrint: TSpeedButton; btnPrint: TSpeedButton;
RMDB_4: TRMDBDataSet; RMDB_4: TRMDBDataSet;
RMDB_5: TRMDBDataSet; RMDB_5: TRMDBDataSet;
@ -58,6 +57,7 @@ type
CDS_3: TClientDataSet; CDS_3: TClientDataSet;
CDS_4: TClientDataSet; CDS_4: TClientDataSet;
CDS_5: TClientDataSet; CDS_5: TClientDataSet;
ComboBox_Print: TComboBox;
procedure FormCreate(Sender: TObject); procedure FormCreate(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormShow(Sender: TObject); procedure FormShow(Sender: TObject);
@ -277,7 +277,8 @@ begin
if MIsShow then if MIsShow then
RM1.ShowReport RM1.ShowReport
else else
RM1.PrintReport; RM1.PrintReportL(ComboBox_Print.Text);
;
end end
else else
begin begin
@ -289,6 +290,12 @@ procedure TfrmLabelPrint.FormCreate(Sender: TObject);
begin begin
FPreviewPrint := True; FPreviewPrint := True;
ComboBox_Print.Items.Assign(Printer.Printers);
// ComboBox2.ItemIndex := 0; //指向第一台打印机
ComboBox_Print.Items.Add('默认打印机');
ComboBox_Print.ItemIndex := Self.ComboBox_Print.Items.IndexOf(trim('默认打印机'));
InitArgs(); InitArgs();
with ADOConnection1 do with ADOConnection1 do
begin begin

View File

@ -101,7 +101,7 @@ DebugSourceDirs=
UsePackages=0 UsePackages=0
[Parameters] [Parameters]
RunParams= RunParams=
HostApplication=D:\Project\D7myYunxiang\云翔一码通\testDll.exe HostApplication=E:\项目资料\00_重点客户\云翔\D7myYunxiang\云翔一码通\testDll.exe
Launcher= Launcher=
UseLauncher=0 UseLauncher=0
DebugCWD= DebugCWD=