VERSION 5.00
Begin {78E93846-85FD-11D0-8487-00A0C90DC8A9} ReportUmsatzberichtDetails 
   BorderStyle     =   5  'Änderbares Werkzeugfenster
   Caption         =   "Berichte"
   ClientHeight    =   6720
   ClientLeft      =   165
   ClientTop       =   330
   ClientWidth     =   4545
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ShowInTaskbar   =   0   'False
   _ExtentX        =   8017
   _ExtentY        =   11853
   _Version        =   393216
   _DesignerVersion=   100684101
   ReportWidth     =   3815
   BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
      Name            =   "Arial"
      Size            =   8.25
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   GridX           =   1
   GridY           =   1
   LeftMargin      =   200
   RightMargin     =   50
   BottomMargin    =   200
   _Settings       =   23
   NumSections     =   3
   SectionCode0    =   1
   BeginProperty Section0 {1C13A8E0-A0B6-11D0-848E-00A0C90DC8A9} 
      _Version        =   393216
      Name            =   "Bereich4"
      Object.Height          =   2535
      NumControls     =   7
      ItemType0       =   7
      BeginProperty Item0 {1C13A8E5-A0B6-11D0-848E-00A0C90DC8A9} 
         _Version        =   393216
         Name            =   "Symbol1"
         Object.Width           =   3360
         Object.Height          =   500
         SizeMode        =   2
      EndProperty
      ItemType1       =   3
      BeginProperty Item1 {1C13A8E1-A0B6-11D0-848E-00A0C90DC8A9} 
         _Version        =   393216
         Name            =   "lblTagesumsatz"
         Object.Top             =   1485
         Object.Width           =   3800
         Object.Height          =   390
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Arial"
            Size            =   14.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Object.Caption         =   "Umsatzbericht"
         Alignment       =   2
      EndProperty
      ItemType2       =   3
      BeginProperty Item2 {1C13A8E1-A0B6-11D0-848E-00A0C90DC8A9} 
         _Version        =   393216
         Name            =   "lblDatum"
         Object.Top             =   1890
         Object.Width           =   3800
         Object.Height          =   225
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Arial"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Object.Caption         =   "Datum"
         Alignment       =   2
      EndProperty
      ItemType3       =   3
      BeginProperty Item3 {1C13A8E1-A0B6-11D0-848E-00A0C90DC8A9} 
         _Version        =   393216
         Name            =   "lblAdresse"
         Object.Top             =   1065
         Object.Width           =   3800
         Object.Height          =   225
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Object.Caption         =   "Adresse"
         Alignment       =   2
      EndProperty
      ItemType4       =   3
      BeginProperty Item4 {1C13A8E1-A0B6-11D0-848E-00A0C90DC8A9} 
         _Version        =   393216
         Name            =   "lblDatumtaeglich"
         Object.Left            =   1335
         Object.Top             =   2280
         Object.Width           =   870
         Object.Height          =   225
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Arial"
            Size            =   11.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Object.Caption         =   "Datum"
      EndProperty
      ItemType5       =   3
      BeginProperty Item5 {1C13A8E1-A0B6-11D0-848E-00A0C90DC8A9} 
         _Version        =   393216
         Name            =   "lblUmsatz"
         Object.Left            =   2655
         Object.Top             =   2280
         Object.Width           =   1125
         Object.Height          =   225
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Arial"
            Size            =   11.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Object.Caption         =   "Umsatz"
         Alignment       =   1
      EndProperty
      ItemType6       =   3
      BeginProperty Item6 {1C13A8E1-A0B6-11D0-848E-00A0C90DC8A9} 
         _Version        =   393216
         Name            =   "lblTag"
         Object.Top             =   2280
         Object.Width           =   1065
         Object.Height          =   240
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Arial"
            Size            =   11.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Object.Caption         =   "Tag"
      EndProperty
   EndProperty
   SectionCode1    =   4
   BeginProperty Section1 {1C13A8E0-A0B6-11D0-848E-00A0C90DC8A9} 
      _Version        =   393216
      Name            =   "Bereich1"
      Object.Height          =   375
      NumControls     =   3
      ItemType0       =   4
      BeginProperty Item0 {1C13A8E2-A0B6-11D0-848E-00A0C90DC8A9} 
         _Version        =   393216
         Name            =   "txtUmsatzTaeglich"
         Object.Left            =   2685
         Object.Width           =   1110
         Object.Height          =   240
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Arial"
            Size            =   11.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Alignment       =   1
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   1
            Format          =   "#####0.#0"
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1031
            SubFormatType   =   0
         EndProperty
      EndProperty
      ItemType1       =   4
      BeginProperty Item1 {1C13A8E2-A0B6-11D0-848E-00A0C90DC8A9} 
         _Version        =   393216
         Name            =   "txtDatum"
         Object.Left            =   1185
         Object.Width           =   1110
         Object.Height          =   240
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Arial"
            Size            =   11.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1031
            SubFormatType   =   0
         EndProperty
      EndProperty
      ItemType2       =   4
      BeginProperty Item2 {1C13A8E2-A0B6-11D0-848E-00A0C90DC8A9} 
         _Version        =   393216
         Name            =   "txtTag"
         Object.Width           =   1080
         Object.Height          =   240
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Arial"
            Size            =   11.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1031
            SubFormatType   =   0
         EndProperty
      EndProperty
   EndProperty
   SectionCode2    =   8
   BeginProperty Section2 {1C13A8E0-A0B6-11D0-848E-00A0C90DC8A9} 
      _Version        =   393216
      Name            =   "Bereich5"
      Object.Height          =   1455
      NumControls     =   7
      ItemType0       =   3
      BeginProperty Item0 {1C13A8E1-A0B6-11D0-848E-00A0C90DC8A9} 
         _Version        =   393216
         Name            =   "lblGesamtUmsatz"
         Object.Top             =   800
         Object.Width           =   1905
         Object.Height          =   330
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Arial"
            Size            =   12
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Object.Caption         =   "Gesamt Umsatz"
      EndProperty
      ItemType1       =   5
      BeginProperty Item1 {1C13A8E3-A0B6-11D0-848E-00A0C90DC8A9} 
         _Version        =   393216
         Name            =   "Linie1"
         Object.Left            =   15
         Object.Width           =   3800
      EndProperty
      ItemType2       =   3
      BeginProperty Item2 {1C13A8E1-A0B6-11D0-848E-00A0C90DC8A9} 
         _Version        =   393216
         Name            =   "lblNetto"
         Object.Top             =   75
         Object.Width           =   1125
         Object.Height          =   240
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Arial"
            Size            =   11.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Object.Caption         =   "Netto"
      EndProperty
      ItemType3       =   3
      BeginProperty Item3 {1C13A8E1-A0B6-11D0-848E-00A0C90DC8A9} 
         _Version        =   393216
         Name            =   "lblMwSt"
         Object.Top             =   330
         Object.Width           =   1155
         Object.Height          =   240
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Arial"
            Size            =   11.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Object.Caption         =   "MwSt"
      EndProperty
      ItemType4       =   13
      BeginProperty Item4 {49FF6930-2B8C-11D1-8DA9-00A0C90FFFC2} 
         _Version        =   393216
         Name            =   "FunktionBrutto"
         Object.Left            =   2640
         Object.Top             =   800
         Object.Width           =   1155
         Object.Height          =   330
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Arial"
            Size            =   11.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Alignment       =   1
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   1
            Format          =   "#.##0,00 ""€"""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1031
            SubFormatType   =   2
         EndProperty
      EndProperty
      ItemType5       =   13
      BeginProperty Item5 {49FF6930-2B8C-11D1-8DA9-00A0C90FFFC2} 
         _Version        =   393216
         Name            =   "FunktionNetto"
         Object.Left            =   2655
         Object.Top             =   75
         Object.Width           =   1125
         Object.Height          =   240
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Arial"
            Size            =   11.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Alignment       =   1
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   1
            Format          =   "#####0.#0"
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1031
            SubFormatType   =   0
         EndProperty
      EndProperty
      ItemType6       =   13
      BeginProperty Item6 {49FF6930-2B8C-11D1-8DA9-00A0C90FFFC2} 
         _Version        =   393216
         Name            =   "FunktionMwSt"
         Object.Left            =   2700
         Object.Top             =   330
         Object.Width           =   1095
         Object.Height          =   240
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Arial"
            Size            =   11.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Alignment       =   1
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   1
            Format          =   "#####0.#0"
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1031
            SubFormatType   =   0
         EndProperty
      EndProperty
   EndProperty
End
Attribute VB_Name = "ReportUmsatzberichtDetails"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Sub BerichtUmsatzDetails(VarDatum1, VarDatum2)
Dim objConn As ADODB.Connection
Dim rsUmsatz As ADODB.Recordset

Dim strPath As String

Set objConn = New ADODB.Connection
Set rsUmsatz = New ADODB.Recordset
  
  On Error GoTo err_Handler

  strPath = App.Path
  If Right$(strPath, 1) <> "\" Then strPath = strPath & "\"


  With objConn
    .Provider = "Microsoft Jet 4.0 OLE DB Provider"
    .Properties("Jet OLEDB:Database Password") = VarPasswordDatenbank
    .ConnectionString = "Data Source=" & strPath & "asql.mdb"
    .CursorLocation = adUseClient
    .Open
  End With
 
  
   'Tabelle OffeneTische öffnen
   With rsUmsatz
     .ActiveConnection = objConn
     .CursorLocation = adUseClient
     .LockType = adLockOptimistic
     .Open "Select Datum,Format(Datum,'ddd')as Tag, Sum(CDbl(GPREIS)) AS Brutto,Sum(CDbl(GPREIS))/1.19 AS Netto,Sum(CDbl(GPREIS))-Sum(CDbl(GPREIS))/1.19 As MwSt  from RechnungDetails Where Datum >= #" & Format$(VarDatum1, "mm-dd-yyyy") & "# and  Datum <= #" & Format$(VarDatum2, "mm-dd-yyyy") & "# Group by Datum"
   'SQL = "SELECT * FROM Termine WHERE Datum = #" & Format$(Now, "m-d-yy") & "#"
   
   End With

 Set ReportUmsatzberichtDetails.DataSource = rsUmsatz
Set Me.Sections("Bereich4").Controls("Symbol1").Picture = LoadPicture(App.Path & "\Logos\Logo_Lokal.emf")

   Me.Sections("Bereich4").Controls("lblAdresse").Caption = "Gutenbergstr. 20 - 67346 Speyer - Tel:74611"
   'ReportUmsatzberichtDetails.Sections("Bereich4").Controls("lblTagesumsatz").Caption = "Kellnerbericht"
   
   If VarDatum1 = VarDatum2 Then
   ReportUmsatzberichtDetails.Sections("Bereich4").Controls("lblDatum").Caption = VarDatum1
   Else
   ReportUmsatzberichtDetails.Sections("Bereich4").Controls("lblDatum").Caption = "von " & VarDatum1 & " bis " & VarDatum2
   End If

 ReportUmsatzberichtDetails.Sections("Bereich1").Controls("txtTag").DataField = rsUmsatz.Fields("Tag").Name
 ReportUmsatzberichtDetails.Sections("Bereich1").Controls("txtDatum").DataField = rsUmsatz.Fields("Datum").Name
 ReportUmsatzberichtDetails.Sections("Bereich1").Controls("txtUmsatzTaeglich").DataField = rsUmsatz.Fields("Brutto").Name

 
 ReportUmsatzberichtDetails.Sections("Bereich5").Controls("lblNetto").Caption = "Netto"
 ReportUmsatzberichtDetails.Sections("Bereich5").Controls("FunktionNetto").DataField = rsUmsatz.Fields("Netto").Name
    
 ReportUmsatzberichtDetails.Sections("Bereich5").Controls("lblMwSt").Caption = "MwSt. 19%"
 ReportUmsatzberichtDetails.Sections("Bereich5").Controls("FunktionMwSt").DataField = rsUmsatz.Fields("MwSt").Name
    

 ReportUmsatzberichtDetails.Sections("Bereich5").Controls("FunktionBrutto").DataField = Format(rsUmsatz.Fields("Brutto").Name, "Currency")

  
  
  
  'ReportUmsatzberichtDetails.Show 1
  ReportUmsatzberichtDetails.PrintReport



   Set objConn = Nothing
   Set rsUmsatz = Nothing

exit_Sub:
  On Error GoTo 0

Set objConn = Nothing
Set rsUmsatz = Nothing

  
  Exit Sub

err_Handler:
    MsgBox "Fehlernummer " & Err.Number & Chr$(13) & Error$(Err), _
            vbCritical, "Fehler"
    
  Resume exit_Sub

Set objConn = Nothing
Set rsUmsatz = Nothing
End Sub


Private Sub DataReport_Initialize()
Call frmBerichte.BerichtePositionieren(ReportUmsatzberichtDetails)
End Sub
