⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmsalesreport.frm

📁 This file came from Planet-Source-Code.com...the home millions of lines of source code You can view
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      Caption         =   "Range"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   1455
      Left            =   1200
      TabIndex        =   1
      Top             =   960
      Width           =   8175
      Begin VB.CommandButton cmdViewReport1 
         BackColor       =   &H00FFFFFF&
         Caption         =   "View Report"
         Height          =   1095
         Left            =   6960
         Picture         =   "frmSalesReport.frx":6886
         Style           =   1  'Graphical
         TabIndex        =   21
         Top             =   240
         Width           =   1095
      End
      Begin MSComCtl2.DTPicker DTPTo 
         Height          =   495
         Left            =   5040
         TabIndex        =   5
         Top             =   360
         Width           =   1815
         _ExtentX        =   3201
         _ExtentY        =   873
         _Version        =   393216
         Format          =   20643841
         CurrentDate     =   38367
      End
      Begin MSComCtl2.DTPicker DTPFrom 
         Height          =   495
         Left            =   1920
         TabIndex        =   6
         Top             =   360
         Width           =   1575
         _ExtentX        =   2778
         _ExtentY        =   873
         _Version        =   393216
         Format          =   20643841
         CurrentDate     =   38367
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackColor       =   &H00FF8080&
         Caption         =   "From"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FFFFFF&
         Height          =   195
         Left            =   240
         TabIndex        =   8
         Top             =   480
         Width           =   510
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         BackColor       =   &H00FF8080&
         Caption         =   "To"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FFFFFF&
         Height          =   195
         Left            =   3840
         TabIndex        =   7
         Top             =   480
         Width           =   240
      End
   End
   Begin VB.CommandButton cmdClose 
      BackColor       =   &H00FFFFFF&
      Caption         =   "&Close"
      Height          =   1095
      Left            =   8160
      Picture         =   "frmSalesReport.frx":6E12
      Style           =   1  'Graphical
      TabIndex        =   0
      Top             =   8160
      Width           =   1095
   End
   Begin Crystal.CrystalReport crSale 
      Left            =   720
      Top             =   120
      _ExtentX        =   741
      _ExtentY        =   741
      _Version        =   348160
      WindowControlBox=   -1  'True
      WindowMaxButton =   -1  'True
      WindowMinButton =   -1  'True
      PrintFileLinesPerPage=   60
      WindowShowSearchBtn=   -1  'True
      WindowShowRefreshBtn=   -1  'True
   End
   Begin ActiveResizeCtl.ActiveResize ActiveResize1 
      Left            =   0
      Top             =   120
      _ExtentX        =   847
      _ExtentY        =   847
      Resolution      =   4
      ScreenHeight    =   1024
      ScreenWidth     =   1280
      ScreenHeightDT  =   1024
      ScreenWidthDT   =   1280
      FormHeightDT    =   9930
      FormWidthDT     =   10620
      FormScaleHeightDT=   9420
      FormScaleWidthDT=   10500
      ResizeFormBackground=   -1  'True
      ResizePictureBoxContents=   -1  'True
   End
   Begin VB.Label Label7 
      AutoSize        =   -1  'True
      BackColor       =   &H00FF8080&
      Caption         =   "PHARMACY SALES REPORT"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   18
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   435
      Left            =   2640
      TabIndex        =   22
      Top             =   240
      Width           =   5415
   End
End
Attribute VB_Name = "frmSalesReport"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdViewReport1_Click()
'Dim strReport As String
'strReport = App.Path & "\Reports\Pharmacy\Sales.rpt"


crSale.ReportFileName = App.Path & "\Reports\Pharmacy\Sales.rpt"
crSale.DiscardSavedData = True
crSale.ReplaceSelectionFormula ("{Orders.OrderDate}   >=#" & DTPFrom & "#  and {Orders.OrderDate}  <=#" & DTPTo & "#")


crSale.WindowState = crptMaximized
crSale.Action = 1
End Sub

Private Sub cmdViewReport3_Click()

crSale.ReportFileName = App.Path & "\Reports\Pharmacy\Sales.rpt"
crSale.DiscardSavedData = True
If cmbOrder.ListIndex = 3 Or cmbOrder.ListIndex = 4 Or cmbOrder.ListIndex = 5 Or cmbOrder.ListIndex = 6 Then
    crSale.ReplaceSelectionFormula ("{OrderDetails." & cmbOrder & "}  =" & txtOrder & "")
Else
    crSale.ReplaceSelectionFormula ("{OrderDetails." & cmbOrder & "}  ='" & txtOrder & "'")
End If

crSale.WindowState = crptMaximized
crSale.Action = 1
End Sub

Private Sub cmdViewReport4_Click()
Dim strReport As String
strReport = App.Path & "\Reports\Pharmacy\Sales.rpt"


crSale.ReportFileName = App.Path & "\Reports\Pharmacy\Sales.rpt"
crSale.DiscardSavedData = True
crSale.ReplaceSelectionFormula ("{Orders.CustomerID}  ='" & txtCustomerID & "'")


crSale.WindowState = crptMaximized
crSale.Action = 1


End Sub

Private Sub Form_KeyPress(KeyAscii As Integer)
    If KeyAscii = 22 Then KeyAscii = 0: Exit Sub
    KeyAscii = DataEntryValidation(KeyAscii, ActiveControl.Tag)
End Sub
Private Sub cmdViewReport2_Click()


Dim strReport As String
strReport = App.Path & "\Reports\Pharmacy\Sales.rpt"


crSale.ReportFileName = App.Path & "\Reports\Pharmacy\Sales.rpt"
crSale.DiscardSavedData = True
crSale.ReplaceSelectionFormula ("{OrderDetails.NetValue}   >=" & Val(txtTotalFrom) & "  and {OrderDetails.NetValue}  <=" & Val(txtTotalto) & "")


crSale.WindowState = crptMaximized
crSale.Action = 1
End Sub

Private Sub Form_Load()
Dim rsadd As Recordset
Set rsadd = New ADODB.Recordset

rsadd.Open "Select * from OrderDetails", cnPatients, adOpenDynamic, adLockReadOnly

For i = 0 To rsadd.Fields.Count - 1 Step 1
    cmbOrder.AddItem rsadd.Fields(i).name, i
Next
rsadd.Close
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -