Operation =1
Option =0
Where ="(((IIf([Ergebnis]<>[daten],\"Fehler\",\"passt\"))=\"Fehler\"))"
Begin InputTables
    Name ="tbl_kunden_solar"
    Name ="qry_TerminEnergieVKLeads2"
    Name ="qry_TerminEnergieVKLeadsbrutto2"
    Name ="qry_TerminEnergieVKLeadsLetzterStatus3"
    Name ="qry_TerminEnergieVKLeadsErgebnis3"
    Name ="qry_MepLeadEingang"
    Name ="qry_MepLeadAusgangLetztesErgebnis3"
End
Begin OutputColumns
    Expression ="qry_MepLeadEingang.lead_id"
    Expression ="qry_MepLeadEingang.create_datetime"
    Expression ="tbl_kunden_solar.mep_kd_nummer"
    Alias ="KDNR Kunden Solar"
    Expression ="tbl_kunden_solar.bcs_kd_nummer"
    Expression ="tbl_kunden_solar.kd_nachname"
    Expression ="tbl_kunden_solar.sys_erstellt_am"
    Alias ="Anzahl VK Termine"
    Expression ="qry_TerminEnergieVKLeads2.[VK Termine]"
    Alias ="Bruttokontakte"
    Expression ="qry_TerminEnergieVKLeadsbrutto2.[VK Termine]"
    Alias ="Letzter Status"
    Expression ="qry_TerminEnergieVKLeadsLetzterStatus3.Status"
    Alias ="Relevanter Status"
    Expression ="IIf([Anzahl VK Termine]>0,\"Termin Energie VK\",[Letzter Status])"
    Alias ="WV nach Termin"
    Expression ="IIf([Anzahl VK Termine]>0 And [Letzter Status]=\"WV Energie\",1,0)"
    Alias ="Absagen Gründe"
    Expression ="IIf([Terminzeit] Is Null And [Termindatum] Is Not Null And [WV nach Termin]=0 An"
        "d [Letzter Status]<>\"Termin Energie VK\" And [Letzter Status]<>\"Termin Energie"
        " Analse\" And [Letzter Status]<>\"Termin Energie Service\",[Letzter Status],\"\""
        ")"
    Expression ="qry_TerminEnergieVKLeadsLetzterStatus3.Terminierer"
    Alias ="Anruftag letzter Brutto"
    Expression ="qry_TerminEnergieVKLeadsLetzterStatus3.Anruftag"
    Alias ="Anruftag letzter Termin"
    Expression ="qry_TerminEnergieVKLeadsErgebnis3.Anruftag"
    Expression ="qry_TerminEnergieVKLeadsErgebnis3.AD"
    Expression ="qry_TerminEnergieVKLeadsErgebnis3.Termindatum"
    Expression ="qry_TerminEnergieVKLeadsErgebnis3.Terminzeit"
    Expression ="qry_TerminEnergieVKLeadsErgebnis3.Bestätigt"
    Expression ="qry_TerminEnergieVKLeadsErgebnis3.Ergebnis"
    Expression ="qry_TerminEnergieVKLeadsErgebnis3.Abschluss_Energy"
    Expression ="qry_TerminEnergieVKLeadsErgebnis3.KWEnergie"
    Alias ="Zeitraum Analyse"
    Expression ="\"Zwischen \" & [Formulare]![frmAnalyse]![Von] & \" und \" & [Formulare]![frmAna"
        "lyse]![Bis]"
    Expression ="qry_TerminEnergieVKLeadsLetzterStatus3.MaxvonStatus_NR"
    Expression ="qry_MepLeadAusgangLetztesErgebnis3.daten"
    Expression ="qry_MepLeadAusgangLetztesErgebnis3.uebertragen"
    Expression ="qry_MepLeadAusgangLetztesErgebnis3.uebertragen_am"
    Alias ="Test"
    Expression ="IIf([Ergebnis]<>[daten],\"Fehler\",\"passt\")"
End
Begin Joins
    LeftTable ="tbl_kunden_solar"
    RightTable ="qry_TerminEnergieVKLeads2"
    Expression ="tbl_kunden_solar.bcs_kd_nummer = qry_TerminEnergieVKLeads2.KD_NR"
    Flag =2
    LeftTable ="tbl_kunden_solar"
    RightTable ="qry_TerminEnergieVKLeadsbrutto2"
    Expression ="tbl_kunden_solar.bcs_kd_nummer = qry_TerminEnergieVKLeadsbrutto2.KD_NR"
    Flag =2
    LeftTable ="tbl_kunden_solar"
    RightTable ="qry_TerminEnergieVKLeadsLetzterStatus3"
    Expression ="tbl_kunden_solar.bcs_kd_nummer = qry_TerminEnergieVKLeadsLetzterStatus3.KD_NR"
    Flag =2
    LeftTable ="tbl_kunden_solar"
    RightTable ="qry_TerminEnergieVKLeadsErgebnis3"
    Expression ="tbl_kunden_solar.bcs_kd_nummer = qry_TerminEnergieVKLeadsErgebnis3.KD_NR"
    Flag =2
    LeftTable ="qry_MepLeadEingang"
    RightTable ="tbl_kunden_solar"
    Expression ="qry_MepLeadEingang.lead_id = tbl_kunden_solar.mep_kd_nummer"
    Flag =2
    LeftTable ="qry_MepLeadEingang"
    RightTable ="qry_MepLeadAusgangLetztesErgebnis3"
    Expression ="qry_MepLeadEingang.lead_id = qry_MepLeadAusgangLetztesErgebnis3.lead_id"
    Flag =2
End
Begin OrderBy
    Expression ="qry_TerminEnergieVKLeads2.[VK Termine]"
    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_kunden_solar.sys_erstellt_am"
        dbInteger "ColumnWidth" ="1950"
        dbBoolean "ColumnHidden" ="0"
        dbInteger "ColumnOrder" ="5"
    End
    Begin
        dbText "Name" ="qry_TerminEnergieVKLeadsLetzterStatus3.Terminierer"
        dbInteger "ColumnWidth" ="1575"
        dbBoolean "ColumnHidden" ="0"
        dbInteger "ColumnOrder" ="12"
    End
    Begin
        dbText "Name" ="qry_TerminEnergieVKLeadsErgebnis3.Ergebnis"
        dbInteger "ColumnWidth" ="2925"
        dbBoolean "ColumnHidden" ="0"
        dbInteger "ColumnOrder" ="20"
    End
    Begin
        dbText "Name" ="Anruftag letzter Brutto"
        dbInteger "ColumnWidth" ="2085"
        dbBoolean "ColumnHidden" ="0"
        dbInteger "ColumnOrder" ="13"
    End
    Begin
        dbText "Name" ="Anruftag letzter Termin"
        dbInteger "ColumnWidth" ="2145"
        dbBoolean "ColumnHidden" ="0"
        dbInteger "ColumnOrder" ="14"
    End
    Begin
        dbText "Name" ="Letzter Status"
        dbInteger "ColumnWidth" ="2745"
        dbBoolean "ColumnHidden" ="0"
        dbInteger "ColumnOrder" ="8"
    End
    Begin
        dbText "Name" ="qry_TerminEnergieVKLeadsErgebnis3.Abschluss_Energy"
        dbInteger "ColumnWidth" ="1815"
        dbBoolean "ColumnHidden" ="0"
        dbInteger "ColumnOrder" ="22"
    End
    Begin
        dbText "Name" ="Relevanter Status"
        dbInteger "ColumnWidth" ="3360"
        dbBoolean "ColumnHidden" ="0"
        dbInteger "ColumnOrder" ="9"
    End
    Begin
        dbText "Name" ="Absagen Gründe"
        dbInteger "ColumnWidth" ="1980"
        dbBoolean "ColumnHidden" ="0"
        dbInteger "ColumnOrder" ="11"
    End
    Begin
        dbText "Name" ="Zeitraum Analyse"
        dbInteger "ColumnWidth" ="3405"
        dbBoolean "ColumnHidden" ="0"
        dbInteger "ColumnOrder" ="24"
    End
    Begin
        dbText "Name" ="tbl_kunden_solar.mep_kd_nummer"
        dbInteger "ColumnOrder" ="3"
    End
    Begin
        dbText "Name" ="KDNR Kunden Solar"
        dbInteger "ColumnOrder" ="19"
    End
    Begin
        dbText "Name" ="tbl_kunden_solar.kd_nachname"
        dbInteger "ColumnOrder" ="4"
    End
    Begin
        dbText "Name" ="Anzahl VK Termine"
        dbInteger "ColumnOrder" ="6"
    End
    Begin
        dbText "Name" ="Bruttokontakte"
        dbInteger "ColumnOrder" ="7"
    End
    Begin
        dbText "Name" ="WV nach Termin"
        dbInteger "ColumnOrder" ="10"
    End
    Begin
        dbText "Name" ="qry_TerminEnergieVKLeadsErgebnis3.AD"
        dbInteger "ColumnOrder" ="15"
    End
    Begin
        dbText "Name" ="qry_TerminEnergieVKLeadsErgebnis3.Termindatum"
        dbInteger "ColumnOrder" ="16"
    End
    Begin
        dbText "Name" ="qry_TerminEnergieVKLeadsErgebnis3.Terminzeit"
        dbInteger "ColumnOrder" ="17"
    End
    Begin
        dbText "Name" ="qry_TerminEnergieVKLeadsErgebnis3.Bestätigt"
        dbInteger "ColumnOrder" ="18"
    End
    Begin
        dbText "Name" ="qry_TerminEnergieVKLeadsErgebnis3.KWEnergie"
        dbInteger "ColumnOrder" ="23"
    End
    Begin
        dbText "Name" ="qry_TerminEnergieVKLeadsLetzterStatus3.MaxvonStatus_NR"
        dbInteger "ColumnWidth" ="1785"
        dbInteger "ColumnOrder" ="25"
        dbBoolean "ColumnHidden" ="0"
    End
    Begin
        dbText "Name" ="qry_MepLeadEingang.lead_id"
        dbInteger "ColumnOrder" ="1"
    End
    Begin
        dbText "Name" ="qry_MepLeadEingang.create_datetime"
        dbInteger "ColumnOrder" ="2"
    End
    Begin
        dbText "Name" ="qry_MepLeadAusgangLetztesErgebnis3.daten"
        dbInteger "ColumnOrder" ="21"
    End
End
Begin
    State =2
    Left =-4
    Top =-30
    Right =2560
    Bottom =1241
    Left =-1
    Top =-1
    Right =2557
    Bottom =144
    Left =0
    Top =20
    ColumnsShown =539
    Begin
        Left =285
        Top =-3
        Right =435
        Bottom =111
        Top =0
        Name ="tbl_kunden_solar"
        Name =""
    End
    Begin
        Left =801
        Top =-3
        Right =1215
        Bottom =81
        Top =0
        Name ="qry_TerminEnergieVKLeads2"
        Name =""
    End
    Begin
        Left =1293
        Top =-5
        Right =1389
        Bottom =79
        Top =0
        Name ="qry_TerminEnergieVKLeadsbrutto2"
        Name =""
    End
    Begin
        Left =1491
        Top =-16
        Right =1819
        Bottom =98
        Top =0
        Name ="qry_TerminEnergieVKLeadsLetzterStatus3"
        Name =""
    End
    Begin
        Left =1895
        Top =-2
        Right =2197
        Bottom =82
        Top =0
        Name ="qry_TerminEnergieVKLeadsErgebnis3"
        Name =""
    End
    Begin
        Left =127
        Top =6
        Right =223
        Bottom =90
        Top =0
        Name ="qry_MepLeadEingang"
        Name =""
    End
    Begin
        Left =2318
        Top =10
        Right =2414
        Bottom =124
        Top =1
        Name ="qry_MepLeadAusgangLetztesErgebnis3"
        Name =""
    End
End
