Operation =1
Option =0
Where ="(((tbl_statustabelle.Status)=\"termin energie VK\" Or (tbl_statustabelle.Status)"
    "=\"Termin Energie Analyse\" Or (tbl_statustabelle.Status)=\"Termin Energie Nachh"
    "oler\") AND ((tbl_statustabelle.Termindatum) Between [Formulare]![frmAnalyse]![V"
    "on] And [Formulare]![frmAnalyse]![Bis]))"
Begin InputTables
    Name ="tbl_statustabelle"
    Name ="tbl_kunden_solar"
    Name ="tbl_kunden"
    Name ="tbl_sergebnis_unter"
    Name ="tbl_mepleadeingang"
End
Begin OutputColumns
    Expression ="tbl_statustabelle.Status"
    Expression ="tbl_statustabelle.Anruftag"
    Expression ="tbl_statustabelle.Terminierer"
    Expression ="tbl_statustabelle.Termindatum"
    Expression ="tbl_statustabelle.Ergebnis"
    Expression ="tbl_statustabelle.Status_NR"
    Expression ="tbl_kunden_solar.mep_kd_nummer"
    Expression ="tbl_statustabelle.Ergebnis_unter"
    Expression ="tbl_sergebnis_unter.Kategorie"
    Expression ="tbl_kunden_solar.obj_postleitzahl"
    Expression ="tbl_statustabelle.AD"
    Expression ="tbl_mepleadeingang.lead_id"
    Alias ="Quelle"
    Expression ="IIf(Left([lead_id],1)=\"L\" And Left([Kampagne1],2)=\"kp\",\"K\",IIf([Create_dat"
        "etime]>#10/21/2015# And Left([lead_id],1)=\"L\" And [Kampagne1]=\"09 EDL\",1,Lef"
        "t([lead_id],1)))"
    Expression ="tbl_mepleadeingang.Location"
    Expression ="tbl_mepleadeingang.Mitarbeiter_ID_EDL"
    Expression ="tbl_statustabelle.Bestätigt"
    Expression ="tbl_statustabelle.Bestaetigt_von"
    Alias ="Lead an BCS"
    Expression ="tbl_mepleadeingang.create_datetime"
    Alias ="Kampagne1"
    Expression ="tbl_mepleadeingang.Kampagne"
    Alias ="Lead Kampagne"
    Expression ="IIf([Lead an BCS]>=#10/22/2015#,IIf([Quelle]=\"L\" And [Kampagne1] Is Null,\"TV\""
        ",IIf([Quelle]=\"1\",\"09 EDL\",[Kampagne1])))"
    Alias ="Kurz"
    Expression ="Left([lead_id],1) & IIf([Kampagne1]=\"kp2\",Left([Kampagne1],3),IIf([Kampagne1] "
        "Is Not Null,Left([Kampagne1],2),\"\"))"
    Expression ="tbl_kunden_solar.kd_vorname"
    Expression ="tbl_kunden_solar.kd_nachname"
End
Begin Joins
    LeftTable ="tbl_statustabelle"
    RightTable ="tbl_kunden_solar"
    Expression ="tbl_statustabelle.KD_NR = tbl_kunden_solar.bcs_kd_nummer"
    Flag =2
    LeftTable ="tbl_statustabelle"
    RightTable ="tbl_kunden"
    Expression ="tbl_statustabelle.KD_NR = tbl_kunden.KD_NR"
    Flag =2
    LeftTable ="tbl_statustabelle"
    RightTable ="tbl_sergebnis_unter"
    Expression ="tbl_statustabelle.Ergebnis_unter = tbl_sergebnis_unter.Ergebnis_unter"
    Flag =2
    LeftTable ="tbl_kunden_solar"
    RightTable ="tbl_mepleadeingang"
    Expression ="tbl_kunden_solar.mep_kd_nummer = tbl_mepleadeingang.lead_id"
    Flag =2
End
Begin OrderBy
    Expression ="tbl_statustabelle.Termindatum"
    Flag =0
End
dbBoolean "ReturnsRecords" ="-1"
dbInteger "ODBCTimeout" ="60"
dbByte "RecordsetType" ="0"
dbBoolean "OrderByOn" ="0"
dbByte "Orientation" ="0"
dbByte "DefaultView" ="2"
Begin
    Begin
        dbText "Name" ="tbl_statustabelle.Ergebnis"
        dbInteger "ColumnWidth" ="4440"
        dbBoolean "ColumnHidden" ="0"
    End
    Begin
        dbText "Name" ="tbl_kunden_solar.mep_kd_nummer"
        dbInteger "ColumnWidth" ="1680"
        dbBoolean "ColumnHidden" ="0"
    End
    Begin
        dbText "Name" ="tbl_statustabelle.Status"
        dbInteger "ColumnWidth" ="2250"
        dbBoolean "ColumnHidden" ="0"
    End
    Begin
        dbText "Name" ="tbl_mepleadeingang.lead_id"
        dbInteger "ColumnWidth" ="1005"
        dbBoolean "ColumnHidden" ="0"
    End
    Begin
        dbText "Name" ="tbl_statustabelle.Bestaetigt_von"
        dbInteger "ColumnWidth" ="2595"
        dbBoolean "ColumnHidden" ="0"
    End
    Begin
        dbText "Name" ="Lead an BCS"
        dbText "Format" ="Short Date"
    End
    Begin
        dbText "Name" ="tbl_mepleadeingang.Location"
        dbInteger "ColumnWidth" ="8625"
        dbBoolean "ColumnHidden" ="0"
    End
    Begin
        dbText "Name" ="tbl_mepleadeingang.Mitarbeiter_ID_EDL"
        dbInteger "ColumnWidth" ="1860"
        dbBoolean "ColumnHidden" ="0"
    End
    Begin
        dbText "Name" ="Lead Kampagne"
        dbInteger "ColumnWidth" ="1590"
        dbBoolean "ColumnHidden" ="0"
    End
    Begin
        dbText "Name" ="Quelle"
        dbInteger "ColumnWidth" ="3015"
        dbBoolean "ColumnHidden" ="0"
    End
End
Begin
    State =2
    Left =-4
    Top =-25
    Right =3440
    Bottom =1246
    Left =-1
    Top =-1
    Right =3437
    Bottom =144
    Left =0
    Top =0
    ColumnsShown =539
    Begin
        Left =38
        Top =6
        Right =154
        Bottom =115
        Top =32
        Name ="tbl_statustabelle"
        Name =""
    End
    Begin
        Left =172
        Top =3
        Right =448
        Bottom =112
        Top =4
        Name ="tbl_kunden_solar"
        Name =""
    End
    Begin
        Left =525
        Top =5
        Right =621
        Bottom =114
        Top =8
        Name ="tbl_kunden"
        Name =""
    End
    Begin
        Left =753
        Top =7
        Right =911
        Bottom =116
        Top =4
        Name ="tbl_sergebnis_unter"
        Name =""
    End
    Begin
        Left =1079
        Top =7
        Right =1610
        Bottom =116
        Top =18
        Name ="tbl_mepleadeingang"
        Name =""
    End
End
