﻿<?xml version="1.0" encoding="utf-8"?>
<ReportsExport>
  <Reports>
    <Report id="451eeebd-1c66-401b-a56e-ff110a582bac" codekey="WW_UsersEducationTimes" categoryCodekey="CreditPoints" name="Teilnahmen" description="Der Report  exportiert alle erworbenen Bildungszeiten aller Nutzer.">
      <MetaData created="2018-11-23T18:48:07" createdBy="Administrator Wuerttembergische (Administrator)" createdBy_user_id="2" modified="2019-11-28T17:15:57" modifiedBy="Administrator wuestenrot" />
      <ExecutionDetails format="TableResult" commandType="SqlCommandOrQuery" exportHandler="" adminControl="" exportMultipleTablesToSheets="False" datesWithTime="True" extraParams="" />
      <Mandators mandatorMode="IncludeMandators" mandator_id="3b9841af-1b19-4ca2-8e08-63eb4315d4c7" mandatorName="Wuerttembergische" isStandard="False" isUsedByMenu="False">
        <Mandator mandatorName="Wuerttembergische" />
        <Mandator mandatorName="Wuestenrot" />
      </Mandators>
      <Parameters>
        <Parameter id="8a788b48-9545-44e3-a700-678759456e6a" isRequired="True" allowMultiSelect="False" name="Ganze Zahl" contextName="letzte X Tage" defaultValue="" renderHint="Undefined" disableParameter="DontDisable" />
      </Parameters>
      <Roles>
        <Role id="90" />
      </Roles>
      <command>
        /* Testing
        DECLARE @current_mandator_id UNIQUEIDENTIFIER  = (SELECT TOP 1 id FROM tblMandators where name = 'wuerttembergische')
        End Testing */


        SELECT
        REPLACE(item_id,'-','') AS [ID des Bausteins],
        'DE' AS [Sprache],
        v_users.employeeId as [Interne ID],
        convert(varchar, tblUserItemScores.startDate, 112) AS [Beginn],
        convert(varchar, tblUserItemScores.endDate,112) AS [Ende]
        FROM tblUserItemScores
        JOIN v_users ON tblUserItemScores.user_id = v_users.intUserCn
        WHERE v_users.mandator_id = @current_mandator_id
        AND ((@integer IS NULL) OR (DATEDIFF(D,tblUserItemScores.created,GETDATE()) &lt; @integer))
        AND DATALENGTH(COALESCE(v_users.employeeId, '')) &gt; 0
        AND tblUserItemScores.educationTime &gt; 0
      </command>
    </Report>
  </Reports>
  <Parameters>
    <Parameter id="8a788b48-9545-44e3-a700-678759456e6a" isSystem="True" name="Ganze Zahl" reportParameterType_id="51b6166f-7a5a-4db3-b4ae-d9b9632dc129" queryParameterName="@integer" />
  </Parameters>
  <ParameterTypes>
    <ParameterType id="51b6166f-7a5a-4db3-b4ae-d9b9632dc129" isSystem="True" name="Integer" datatype="Integer" dataValueField="" dataTextField="" />
  </ParameterTypes>
</ReportsExport>