﻿<?xml version="1.0" encoding="utf-8"?>
<ReportsExport>
  <Reports>
    <Report id="2864ef97-a389-4283-b468-cbcf9ce6ed50" codekey="WbtUsageAllMandators" categoryCodekey="SpecialPurpose" name="WBT-Nutzung (alle Mandanten)" description="Auflistung der Nutzung der WBTs aller Mandanten in einem bestimmten Zeitraum">
      <MetaData created="2007-09-11T14:24:03" createdBy="Administrator VIWIS" createdBy_user_id="242" modified="2012-11-27T14:44:30" modifiedBy="Administrator VIWIS" />
      <ExecutionDetails format="TableResult" commandType="SqlCommandOrQuery" exportHandler="" adminControl="" exportMultipleTablesToSheets="False" datesWithTime="False" extraParams="" />
      <Mandators mandatorMode="OnlyOwner" mandator_id="bc89dcf5-380a-4840-b870-48f57365d477" isStandard="False" isUsedByMenu="False" />
      <Parameters>
        <Parameter id="bf72399d-7582-4b2a-a06c-8d47afe576f2" isRequired="True" name="Von" contextName="Von" defaultValue="" renderHint="Undefined" disableParameter="DontDisable" />
        <Parameter id="80245dc5-ca96-4c76-9449-2b5d07b129e9" isRequired="True" name="Bis" contextName="Bis" defaultValue="" renderHint="Undefined" disableParameter="DontDisable" />
      </Parameters>
      <Roles>
        <Role id="90" />
      </Roles>
      <command>select 	tblMandators.name as Mandant, 
	tblItems.titleForLearners + ' (' + tblItems.title + ')'  as Titel, 
	count(distinct user_id) as 'Unterschiedliche Nutzer',
	count(user_id) as 'Aufrufe (Gesamt)',
	sum(durationSeconds) as 'Aufrufdauer (Gesamt)'
from tblStatsThemeSessions
inner join tblThemes on tblThemes.id=tblStatsThemeSessions.theme_id
INNER JOIN tblItems ON tblItems.id = tblThemes.id
inner join tblMandators on tblMandators.id=tblThemes.mandator_id
where tblItems.deleted IS NULL AND (tblStatsThemeSessions.theme_id is not null) and (tblStatsThemeSessions.startTime&gt;=@startDate and tblStatsThemeSessions.startTime&lt;=dateadd(day,1,@endDate)) and (tblStatsThemeSessions.durationSeconds is not null)
group by tblStatsThemeSessions.theme_id, tblItems.titleForLearners, tblItems.title, tblMandators.name
order by Mandant, Titel</command>
    </Report>
  </Reports>
  <Parameters>
    <Parameter id="bf72399d-7582-4b2a-a06c-8d47afe576f2" isSystem="True" name="Von" reportParameterType_id="74253ba7-a386-4620-bff7-b65c16fe1e64" queryParameterName="@startDate" />
    <Parameter id="80245dc5-ca96-4c76-9449-2b5d07b129e9" isSystem="True" name="Bis" reportParameterType_id="74253ba7-a386-4620-bff7-b65c16fe1e64" queryParameterName="@endDate" />
  </Parameters>
  <ParameterTypes>
    <ParameterType id="74253ba7-a386-4620-bff7-b65c16fe1e64" isSystem="True" name="Date" datatype="Date" dataValueField="" dataTextField="" />
  </ParameterTypes>
</ReportsExport>