<?xml version="1.0" encoding="ISO-8859-15"?>
<VUE name="ACTI000083" label="Activité. Rejets NOEMIE" 
	title="= 'Rejets NOEMIE par ' +  SELECT.GROUPBY_LABEL + ' ('  +  SELECT.PERIODE_LABEL + ' à ' + SELECT.TOPERIODE_LABEL + ')'" database="iCTI" swf="*CTI_view1" 
	softCode="iCTI_activite" globals="ACTI_globals.XML" componentsFile="ACTI_components.XML" 
	admProvider="r2i qsp">
	<VIEWPROPERTIES componentName="PROPERTIES_REJETS"/>

	<SELECTIONS label="Paramètres de l'analyse">
		<GROUP label="Période">
			<FIELD name="ALIAS_PERIODE" label="" UI="combo" width="220" default="CUM_LAST_MONTH" tree="true" globalListProvider="ALIAS_PERIODE" />
            <FIELD name="PERIODE" label="de" UI="combo" tree="true" width="200" default="2007-01-01" globalListProvider="DATE_DEBUT"  >
				<OPTION dataLink="MOIS_D" treeLevelField="lvl" dataField="date" data2Field="mois" labelField="txt"/>
			</FIELD>
			<FIELD name="TOPERIODE" label="à" UI="combo" tree="true" width="200" default="2007-01-31" globalListProvider="DATE_FIN"  >
				<OPTION dataLink="MOIS_F" treeLevelField="lvl" dataField="date" data2Field="mois" labelField="txt"/>
			</FIELD>
		</GROUP>
		<GROUP>
			<FIELD name="GROUPBY" label="Regroupement" UI="combo" default="REJ" tree="true">
				<OPTION label="REJET_GROUPBY" data="" globalListProvider="REJET_GROUPBY"/>
				<OPTION label="Mois de sortie" data="MOIS"/>
			</FIELD>
			<FIELD name="GROUPBY_TAB" label="Présentation" UI="combo" default="AUTO" visible="= SELECT.GROUPBY_2 != '-1' ">
				<OPTION label="Automatique" data="AUTO"/>
				<OPTION label="Arbre" data="TREE"/>
				<OPTION label="Onglet" data="TAB"/>
			</FIELD>
		</GROUP>
		<GROUP>
			<FIELD name="GROUPBY_2" label="" UI="combo" default="-1" tree="true" >
				<OPTION label="" data="-1"/>

				<OPTION label="REJET_GROUPBY" data="" globalListProvider="REJET_GROUPBY"/>
				<OPTION label="Mois de sortie" data="MOIS"/>
			</FIELD>

		</GROUP>
		
	</SELECTIONS>
	<SELECTIONS componentName="FILTRES_REJETS_SELECTIONS"/>
	<SELECTIONS componentName="FILTRES_REJETS_SOUSSELECTIONS"/>
	<SELECTIONS componentName="FILTRES_SEJOURS_SELECTIONS"/>
	<QUERIES>
		<QUERY label="">
			<SQL optimizer="V_SEJOURS_X">
				<select><![CDATA[		
					CTISELECT_TREE
					GROUPBY1{[VIEW.GROUPBY_OID_FIELD],, [VIEW.GROUPBY_COD_FIELD],, [VIEW.GROUPBY_TXT_FIELD]}
					GROUPBY1MODE{[GROUPBY_TAB]}
					GROUPBY2{[VIEW.GROUPBY_2_OID_FIELD],, [VIEW.GROUPBY_2_COD_FIELD],, [VIEW.GROUPBY_2_TXT_FIELD]}
					SIGNIFDATA{[VIEW.ACTIVITE_SIGNIFICATIVE_DATA],, [ACTIVITE_SIGNIFICATIVE_MODE],, [ACTIVITE_SIGNIFICATIVE_NUMBER]}
					INDICATORS{
						
						COUNT(*),,
						COUNT(DISTINCT v_factures_rejets_1.no_facture)
					}
					FROM activite.v_factures_rejets_1, activite.p_factures, #V_SEJOURS_X#
					WHERE 
						v_sejours_1.no_sejour = p_factures.no_sejour AND
						p_factures.no_facture = v_factures_rejets_1.no_facture AND
						date_rejet BETWEEN '[PERIODE]' AND '[TOPERIODE]'

						[VIEW.SEJOURS_SELECT]
						[VIEW.REJETS_SELECT]
				
				
				]]></select>
				<FIELDS>
					<INSERT name="CTISELECT_TREE_FIELDS"/>
					<FIELD name="NR"/>
					<FIELD name="NF"/>
				</FIELDS>
			</SQL>
		</QUERY>
		<QUERY type="propertiesLink" name="VIEWPROPERTIES" forRows="false">
		</QUERY>
	</QUERIES>
	<PRESENTATION>
		<VIEWLINKS>
			<VIEWLINK label="Liste des séjours" shortLabel="Liste séjours" view="ACTI000101.XML" componentName="REJETS_BASE_VIEWLINK" component3Name="STANDARD_BASE_VIEWLINK">
				
			</VIEWLINK>
		</VIEWLINKS>
		<ONGLET excelLabel="Rejets" label="Rejets" multiTab="true" >
			
			<DATAGRID title="" total="true" showOthers="true" headerHeight="48" 
				variableRowHeight="true" sortable="= SELECT.GROUPBY_2 == '-1' || SELECT.GROUPBY_TAB == 'TAB'" selectRowInRows="= ROW.OID == '-9999997'" otherRowInRows="= ROW.OID == '-9999998'" totalRowInRows="= ROW.OID == '-9999999'" >
				
				<INSERT name="DATAGRID_MULTITAB_STYLES"/>

				<COLUMN dataField="OID" width="60" type="Char" visible="false" headerText="Oid">
				</COLUMN>
				<COLUMN dataField="COD" width="80" type="Char"  headerText="Code" textAlign="left" otherFunction="text" totalFunction="text" totalComplement="TOTAL">
					<INSERT name="COLUMN_COD_MULTITAB_STYLES"/>
				</COLUMN>
				<COLUMN dataField="TXT" type="Char" minWidth="150" maxWidth="300" headerText="SELECT.GROUPBY_LABEL" headerTextCalc="true" textAlign="left" totalFunction="text" otherFunction="text" otherComplement="*ROW">
				</COLUMN>
				
				<COLUMN dataField="NR" width="100" type="Number" visibleCondition="true" outputFormat="#" headerText="Nombre lignes rejetées" textAlign="right" totalFunction="sum" otherFunction="sum">
				</COLUMN>
				<COLUMN dataField="NF" width="100" type="Number" visibleCondition="true" outputFormat="#" headerText="Nombre factures rejetées" textAlign="right" totalFunction="sum" otherFunction="sum">
				</COLUMN>
				
			</DATAGRID>
		</ONGLET>
	</PRESENTATION>
</VUE>
