<?xml version="1.0" encoding="ISO-8859-1"?>
<VUE name="ACTI000062" label="Activité. Evolution temporelle facturation" title="= SELECT.DATA_LABEL + ' par ' +  SELECT.GROUPBY_LABEL + ' (' + SELECT.QUELLEDATE_LABEL + ' : ' + SELECT.PERIODE_LABEL + ' à ' + SELECT.TOPERIODE_LABEL + ')'" database="iCTI" swf="*CTI_view1" softCode="iCTI_activite" globals="ACTI_globals.XML" componentsFile="ACTI_components.XML"
    helpFile="iCTI_ACTI_ACTI000062.HTML"
    helpDokuWIkiDir="activite:activite_facturee_et_valorisee:activite_clinique" 
    helpDokuWIkiFile="acti000062" 
>
	<VIEWPROPERTIES componentName="PROPERTIES_PRESTATIONS"/>
	<VIEWPROPERTIES>
		<PROPERTY dataLink="VIEWPROPERTIES" nameField="name" valueField="value" />
		<PROPERTY name="COMBIEN_JOURS">
			<value><![CDATA[
						[EVAL 
							if ('[PERIODICITE]' == 'DAY') {
								if ('[NBJOURS]' != '-1') {
									return [NBJOURS];
								}
								else {
									return substr('[TOPERIODE]', -2);
								}
							}
							else {return "12";}
						EVAL]
					]]></value>
		</PROPERTY>
		<PROPERTY name="JOURNEES_FIELD">
			<value>
					<![CDATA[
						[EVAL 
							$field = 'nb_jours';
							if ('[QJMUT]' == 'd') {$field = $field . '_d';}
							else {
								if ('[QJMUT]' == 'f') {$field = $field . '_f';}
								else {
									if ('[QJMUT]' == '12') {$field = $field . '_12';}
									else {
										if ('[QJMUT]' == 'prorata') {$field = $field . '_prorata';}
										else {
											$field = $field . '_f';
										}
									}
								}
							}
							return $field;
						EVAL]
					]]>
				</value>
		</PROPERTY>
		<PROPERTY name="QUELLEDATE_MVT">
			<value><![CDATA[[EVAL 
                    $column_date = "v_mouvements_sejour_2.date";
                    if ('[QUELLEDATE]' == '2') {
                        $column_date = "p_factures_reference.date_fin_facture";
					}
					return $column_date;
				EVAL]]]></value>
		</PROPERTY>
        <PROPERTY name="QMVT_SELECT">
			<value><![CDATA[[EVAL 
                    $qmvt_select = "AND 1=1";
                    if ('[QUELLEDATE]' != '1' && '[QUELLEDATE]' != '2') {
                        $qmvt_select = "AND 1<>1";
                    }
					return $qmvt_select;
				EVAL]]]></value>
		</PROPERTY>
		<PROPERTY name="DATA1F">
			<value><![CDATA[[EVAL return ACTI_facturation_clinique_data('[DATA]', 0, "v_factures_lignes_c_4.[VIEW.QUELLEDATE_FIELD] BETWEEN '[PERIODE]' AND '[TOPERIODE]'", "","0"); EVAL]]]></value>
		</PROPERTY>		
		<PROPERTY name="DATA2F">
			<value><![CDATA[[EVAL return ACTI_facturation_clinique_data('[DATA]', 0, "v_factures_lignes_c_4.[VIEW.QUELLEDATE_FIELD] BETWEEN '[PERIODE]' AND '[TOPERIODE]'", "","1"); EVAL]]]></value>
		</PROPERTY>		
		<PROPERTY name="DATA1C">
			<value><![CDATA[[EVAL return ACTI_facturation_clinique_data_col('[DATA]', 0, "v_factures_lignes_c_4.[VIEW.QUELLEDATE_FIELD] BETWEEN '[PERIODE]' AND '[TOPERIODE]'", "","0",'[TOPERIODE]'); EVAL]]]></value>
		</PROPERTY>		
		<PROPERTY name="DATA2C">
			<value><![CDATA[[EVAL return ACTI_facturation_clinique_data_col('[DATA]', 0, "v_factures_lignes_c_4.[VIEW.QUELLEDATE_FIELD] BETWEEN '[PERIODE]' AND '[TOPERIODE]'", "","1",'[TOPERIODE]'); EVAL]]]></value>
		</PROPERTY>
	</VIEWPROPERTIES>
	<SELECTIONS label="Paramètres de l'analyse">
		<GROUP label="Période">
			<FIELD name="QUELLEDATE" label="" UI="combo" default="1" default2="date_fin">
				<OPTION label="Date activité" data="1" data2="v_factures_lignes_c_4.date_fin"/>
				<OPTION label="Date sortie" data="2" data2="v_factures_lignes_c_4.date_fin_facture"/>
				<OPTION label="Date facture" data="3" data2="v_factures_lignes_c_4.date_facture"/>
				<OPTION label="Date vente" data="4" data2="v_factures_lignes_c_4.date_vente"/>
				<OPTION label="Date groupage" data="5" data2="v_sejours_1.date_groupage"/>
			</FIELD>
			<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="2009-01-01" globalListProvider="DATE_DEBUT" >
			</FIELD>
			<FIELD name="TOPERIODE" label="à" UI="combo" tree="true" width="200" default="2009-01-31" globalListProvider="DATE_FIN" >
			</FIELD>
		</GROUP>
		<GROUP label="Périodicité">
			<FIELD name="PERIODICITE" width="200" UI="combo" default="MONTH" globalListProvider="PERIODICITE" />
			<FIELD name="NBJOURS" label="Nombre de jours" UI="combo" width="200" default="12" globalListProvider="PERIODICITE_JOURNALIERE" visible="= SELECT.PERIODICITE == 'DAY' " />			
		</GROUP>
		<GROUP>
			<FIELD name="GROUPBY" label="Regroupement" UI="combo" default="PRF" tree="true" width="300">
				<OPTION label="PRESTATIONS_GROUPBY" data="" globalListProvider="PRESTATIONS_GROUPBY"/>
			</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" width="300">
				<OPTION label="" data="-1"/>
				<OPTION label="PRESTATIONS_GROUPBY" data="" globalListProvider="PRESTATIONS_GROUPBY"/>
			</FIELD>
		</GROUP>
		<GROUP>
			<FIELD name="GROUPBY_3" label="" UI="combo" default="-1" tree="true" width="300">
				<OPTION label="" data="-1"/>
				<OPTION label="PRESTATIONS_GROUPBY" data="" globalListProvider="PRESTATIONS_GROUPBY"/>
			</FIELD>
		</GROUP>
		<GROUP>
			<FIELD name="DATA" tree="true" label="Données" UI="combo" width="300" default="MTFAC">
				<OPTION label="PRESTATIONS_DATA" data="" globalListProvider="PRESTATIONS_DATA"/>
			</FIELD>
		</GROUP>
		<GROUP>
			<FIELD name="RUBRIQUE_CA" label="C.A." UI="combo" tree="true" width="200" default="-1" globalListProvider="RUBRIQUES_CA" showIfNotDefault="true" />
			<FIELD name="RUBRIQUE_CODES" label="Codes" UI="text" width="150" default="" showIfNotDefault="true" visible="= SELECT.RUBRIQUE == 'SAISIECODE' " />
		</GROUP>
		
		
	</SELECTIONS>
	<SELECTIONS componentName="FILTRES_PRESTATIONS_SOUSSELECTIONS"/>
	<SELECTIONS componentName="FILTRES_PRESTATIONS_SELECTIONS"/>
	<SELECTIONS componentName="FILTRES_SEJOURS_SELECTIONS"/>
	<SELECTIONS componentName="FILTRES_PATIENTS_SELECTIONS"/>						
	<SELECTIONS componentName="FILTRES_PASSAGES_SELECTIONS" />
	<QUERIES>
		<QUERY label="">
		    <SQL optimizer="V_SEJOURS_X" optimizer2="V_FACTURES_LIGNES_C_X">
				<select><![CDATA[ 
					
					DROP TABLE IF EXISTS ACTI000062_SEJ;
                    CREATE TEMP TABLE ACTI000062_SEJ AS
                    SELECT v_factures_lignes_c_4.no_sejour
                        FROM #V_FACTURES_LIGNES_C_X#
                        JOIN #V_SEJOURS_X# ON v_sejours_1.no_sejour = v_factures_lignes_c_4.no_sejour
                    WHERE 
                        v_factures_lignes_c_4.[VIEW.QUELLEDATE_FIELD] BETWEEN '[PERIODE]' AND '[TOPERIODE]' 
                        
                        [VIEW.SEJOURS_SELECT]
                        [VIEW.PRESTATIONS_SELECT]
                        [VIEW.PASSAGES_SELECT]
                        [VIEW.PATIENTS_SELECT]
                        [VIEW.QMVT_SELECT]
                    GROUP BY 1
                    ;
                    CREATE INDEX ACTI000062_SEJ_i1 ON ACTI000062_SEJ USING btree (no_sejour);
				
				
				]]></select>
			</SQL>
            <SQL optimizer="V_SEJOURS_X" optimizer2="V_MOUVEMENTS_SEJOUR_X" >
				<select><![CDATA[

                    DROP TABLE IF EXISTS empty;
                    CREATE TEMP TABLE empty AS
                    SELECT -123::bigint AS empty_id, ''::text AS empty_code, ''::text AS empty_texte
                    ;
					
					DROP TABLE IF EXISTS w_factures_reference;
					CREATE TEMP TABLE w_factures_reference AS
					SELECT p_factures_reference.no_sejour,
							p_factures_reference.date_debut_facture,
							p_factures_reference.date_fin_facture,
							p_factures_reference.code_facture,
							p_factures_reference.montant_comptabilise_c,
							p_factures_reference.montant_comptabilise_budget_global_c,
							p_factures_reference.montant_comptabilise_h,
							row_number() OVER (PARTITION BY p_factures_reference.no_sejour ORDER BY date_debut_facture, date_facture) AS seq
					FROM activite.p_factures_reference
					JOIN ACTI000062_SEJ ON p_factures_reference.no_sejour = ACTI000062_SEJ.no_sejour
					WHERE p_factures_reference.type_facture <> 'P'
					;

					
					CREATE INDEX w_factures_reference_i1 ON w_factures_reference USING btree (no_sejour)
					;

					UPDATE w_factures_reference
					SET date_debut_facture = date(w_factures_reference1.date_fin_facture+interval '1 day')
					FROM w_factures_reference w_factures_reference1
					WHERE w_factures_reference.no_sejour = w_factures_reference1.no_sejour AND
						w_factures_reference.seq = w_factures_reference1.seq +1
					;
					
					CTIPREPAR_TREE 
						WORKTABLE{ACTI000062_MVT} 
						GROUPBY1{[VIEW.GROUPBY_MVT_OID_FIELD],, [VIEW.GROUPBY_MVT_COD_FIELD],, [VIEW.GROUPBY_MVT_TXT_FIELD]} 
						GROUPBY1MODE{[GROUPBY_TAB]} 
						GROUPBY2{[VIEW.GROUPBY_MVT_2_OID_FIELD],, [VIEW.GROUPBY_MVT_2_COD_FIELD],, [VIEW.GROUPBY_MVT_2_TXT_FIELD]} 
						GROUPBY3{[VIEW.GROUPBY_MVT_3_OID_FIELD],, [VIEW.GROUPBY_MVT_3_COD_FIELD],, [VIEW.GROUPBY_MVT_3_TXT_FIELD]} 
						SIGNIFDATA{[VIEW.ACTIVITE_SIGNIFICATIVE_DATA],, [ACTIVITE_SIGNIFICATIVE_MODE],, [ACTIVITE_SIGNIFICATIVE_NUMBER]}
						COLUMNBY[PERIODICITE]{[VIEW.QUELLEDATE_MVT],, '[PERIODE]' ,, '[TOPERIODE]' ,, [VIEW.COMBIEN_JOURS]}
						INDICATORS{[VIEW.DATA1C]}	
						INDICATORS_COLUMNS{[VIEW.DATA2C]}
					FROM #V_SEJOURS_X#,#V_MOUVEMENTS_SEJOUR_X#
                    JOIN ACTI000062_SEJ ON v_mouvements_sejour_2.no_sejour = ACTI000062_SEJ.no_sejour
                    JOIN w_factures_reference p_factures_reference ON
                        p_factures_reference.no_sejour = v_mouvements_sejour_2.no_sejour AND
                        (v_mouvements_sejour_2.date BETWEEN p_factures_reference.date_debut_facture AND p_factures_reference.date_fin_facture) 
                    JOIN empty ON 1=1
					WHERE '[QUELLEDATE]' IN ('1','2') AND
						v_mouvements_sejour_2.no_sejour = v_sejours_1.no_sejour AND
						[VIEW.QUELLEDATE_MVT] BETWEEN '[PERIODE]' AND '[TOPERIODE]' 
						
						[VIEW.SEJOURS_SELECT] 
                        [VIEW.PASSAGES_SELECT]
                        [VIEW.QMVT_SELECT]
                        [VIEW.MOUVEMENTS_SELECT]
						[VIEW.PATIENTS_SELECT]
						AND v_sejours_1.type_sejour <> '9' 
				
				]]></select>
			</SQL>
			<SQL optimizer="V_SEJOURS_X" optimizer2="V_FACTURES_LIGNES_C_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]}
						GROUPBY3{[VIEW.GROUPBY_3_OID_FIELD],, [VIEW.GROUPBY_3_COD_FIELD],, [VIEW.GROUPBY_3_TXT_FIELD]}
						SIGNIFDATA{[VIEW.ACTIVITE_SIGNIFICATIVE_DATA],, [ACTIVITE_SIGNIFICATIVE_MODE],, [ACTIVITE_SIGNIFICATIVE_NUMBER]}
						COLUMNBY[PERIODICITE]{v_factures_lignes_c_4.[VIEW.QUELLEDATE_FIELD],, '[PERIODE]' ,, '[TOPERIODE]' ,, [VIEW.COMBIEN_JOURS]}
						INDICATORS{[VIEW.DATA1F]}	
						INDICATORS_COLUMNS{[VIEW.DATA2F]}
					FROM #V_SEJOURS_X#
						JOIN #V_FACTURES_LIGNES_C_X# ON v_sejours_1.no_sejour = v_factures_lignes_c_4.no_sejour
					WHERE 
						v_factures_lignes_c_4.[VIEW.QUELLEDATE_FIELD] BETWEEN '[PERIODE]' AND '[TOPERIODE]'
						[VIEW.SEJOURS_SELECT]
						[VIEW.PRESTATIONS_SELECT]
						[VIEW.PASSAGES_SELECT]
						[VIEW.PATIENTS_SELECT]
						
				AFTER{
					
					INSERT INTO w_table
					SELECT acti000062_mvt.*
					FROM acti000062_mvt
					LEFT JOIN w_table ON
							w_table.OIDT = ACTI000062_MVT.OIDT AND
							w_table.OID1 = ACTI000062_MVT.OID1 AND
							w_table.OID2 = ACTI000062_MVT.OID2 AND
							w_table.OID3 = ACTI000062_MVT.OID3
					WHERE acti000062_mvt.indicateurs[1] <> 0 AND
						w_table.OID1 IS NULL AND
						acti000062_mvt.oid1 <> -123 AND
						acti000062_mvt.oid2 <> -123 AND
						acti000062_mvt.oid3 <> -123 AND
						acti000062_mvt.oidt <> -123
					.,

					UPDATE w_table SET
						indicateurs = ARRAY[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
						work_table_sequence = (SELECT MAX(work_table_sequence) FROM w_table)
					WHERE work_table_sequence IN (SELECT work_table_sequence FROM acti000062_mvt)
					.,

					UPDATE w_table 
						SET indicateurs[0] = ACTI000062_MVT.indicateurs[000]
							[EVAL 
								if ('[DATA]' == 'EMC' || '[DATA]' == 'VALEMC'|| '[DATA]' == 'FAVEMC'|| '[DATA]' == 'FACNBJ' || '[DATA]' == 'VALNBJ'|| '[DATA]' == 'FAVNBJ'|| '[DATA]' == 'FAVNBEMCHC'|| '[DATA]' == 'FAVDMS') {
									return "
										,
										indicateurs[1] 	= ACTI000062_MVT.indicateurs[001],
										indicateurs[2] 	= ACTI000062_MVT.indicateurs[002],
										indicateurs[3] 	= ACTI000062_MVT.indicateurs[003],
										indicateurs[4] 	= ACTI000062_MVT.indicateurs[004],										
										indicateurs[5] 	= ACTI000062_MVT.indicateurs[005],
										indicateurs[6] 	= ACTI000062_MVT.indicateurs[006],
										indicateurs[7] 	= ACTI000062_MVT.indicateurs[007],
										indicateurs[8] 	= ACTI000062_MVT.indicateurs[008],										
										indicateurs[9] 	= ACTI000062_MVT.indicateurs[009],										
										indicateurs[10] = ACTI000062_MVT.indicateurs[010],
										indicateurs[11] = ACTI000062_MVT.indicateurs[011],
										indicateurs[12] = ACTI000062_MVT.indicateurs[012],
										indicateurs[13] = ACTI000062_MVT.indicateurs[013],
										indicateurs[14] = ACTI000062_MVT.indicateurs[014],										
										indicateurs[15] = ACTI000062_MVT.indicateurs[015],
										indicateurs[16] = ACTI000062_MVT.indicateurs[016],
										indicateurs[17] = ACTI000062_MVT.indicateurs[017],
										indicateurs[18] = ACTI000062_MVT.indicateurs[008],										
										indicateurs[19] = ACTI000062_MVT.indicateurs[019],										
										indicateurs[20] = ACTI000062_MVT.indicateurs[020],
										indicateurs[21] = ACTI000062_MVT.indicateurs[021],
										indicateurs[22] = ACTI000062_MVT.indicateurs[022],
										indicateurs[23] = ACTI000062_MVT.indicateurs[023],
										indicateurs[24] = ACTI000062_MVT.indicateurs[024],										
										indicateurs[25] = ACTI000062_MVT.indicateurs[025],
										indicateurs[26] = ACTI000062_MVT.indicateurs[026],
										indicateurs[27] = ACTI000062_MVT.indicateurs[027],
										indicateurs[28] = ACTI000062_MVT.indicateurs[028],
										indicateurs[29] = ACTI000062_MVT.indicateurs[029],										
										indicateurs[30] = ACTI000062_MVT.indicateurs[030],										
										indicateurs[31] = ACTI000062_MVT.indicateurs[031],
										indicateurs[32] = ACTI000062_MVT.indicateurs[032],
										indicateurs[33] = ACTI000062_MVT.indicateurs[033]
									"; 
								}	

							$arrayCaMoyen = array('MMFACEMC' , 'MMVALEMC', 'MMFPVEMC', 'MFAVCAMHC', 'MFACMTTHC');	

							if (in_array('[DATA]',$arrayCaMoyen)) {									
								return ",
										indicateurs[1] 	= base.cti_division(w_table.indicateurs[1] ,ACTI000062_MVT.indicateurs[001]),
										indicateurs[2] 	= base.cti_division(w_table.indicateurs[2] ,ACTI000062_MVT.indicateurs[002]),
										indicateurs[3] 	= base.cti_division(w_table.indicateurs[3] ,ACTI000062_MVT.indicateurs[003]),
										indicateurs[4] 	= base.cti_division(w_table.indicateurs[4] ,ACTI000062_MVT.indicateurs[004]),										
										indicateurs[5] 	= base.cti_division(w_table.indicateurs[5] ,ACTI000062_MVT.indicateurs[005]),
										indicateurs[6] 	= base.cti_division(w_table.indicateurs[6] ,ACTI000062_MVT.indicateurs[006]),
										indicateurs[7] 	= base.cti_division(w_table.indicateurs[7] ,ACTI000062_MVT.indicateurs[007]),
										indicateurs[8] 	= base.cti_division(w_table.indicateurs[8] ,ACTI000062_MVT.indicateurs[008]),										
										indicateurs[9] 	= base.cti_division(w_table.indicateurs[9] ,ACTI000062_MVT.indicateurs[009]),										
										indicateurs[10] = base.cti_division(w_table.indicateurs[10],ACTI000062_MVT.indicateurs[010]),
										indicateurs[11] = base.cti_division(w_table.indicateurs[11],ACTI000062_MVT.indicateurs[011]),
										indicateurs[12] = base.cti_division(w_table.indicateurs[12],ACTI000062_MVT.indicateurs[012]),
										indicateurs[13] = base.cti_division(w_table.indicateurs[13],ACTI000062_MVT.indicateurs[013]),
										indicateurs[14] = base.cti_division(w_table.indicateurs[14],ACTI000062_MVT.indicateurs[014]),
										indicateurs[15] = base.cti_division(w_table.indicateurs[15],ACTI000062_MVT.indicateurs[015]),
										indicateurs[16] = base.cti_division(w_table.indicateurs[16],ACTI000062_MVT.indicateurs[016]),
										indicateurs[17] = base.cti_division(w_table.indicateurs[17],ACTI000062_MVT.indicateurs[017]),
										indicateurs[18] = base.cti_division(w_table.indicateurs[18],ACTI000062_MVT.indicateurs[018]),
										indicateurs[19] = base.cti_division(w_table.indicateurs[19],ACTI000062_MVT.indicateurs[019]),
										indicateurs[20] = base.cti_division(w_table.indicateurs[20],ACTI000062_MVT.indicateurs[020]),
										indicateurs[21] = base.cti_division(w_table.indicateurs[21],ACTI000062_MVT.indicateurs[021]),
										indicateurs[22] = base.cti_division(w_table.indicateurs[22],ACTI000062_MVT.indicateurs[022]),
										indicateurs[23] = base.cti_division(w_table.indicateurs[23],ACTI000062_MVT.indicateurs[023]),										
										
										indicateurs[24] = base.cti_division(w_table.indicateurs[24],ACTI000062_MVT.indicateurs[024]),
										indicateurs[25] = base.cti_division(w_table.indicateurs[25],ACTI000062_MVT.indicateurs[025]),
										indicateurs[26] = base.cti_division(w_table.indicateurs[26],ACTI000062_MVT.indicateurs[026]),
										indicateurs[27] = base.cti_division(w_table.indicateurs[27],ACTI000062_MVT.indicateurs[027]),										
										
										indicateurs[28] = base.cti_division(w_table.indicateurs[28],ACTI000062_MVT.indicateurs[028]),
										indicateurs[29] = base.cti_division(w_table.indicateurs[29],ACTI000062_MVT.indicateurs[029]),
										indicateurs[30] = base.cti_division(w_table.indicateurs[30],ACTI000062_MVT.indicateurs[030]),
										indicateurs[31] = base.cti_division(w_table.indicateurs[31],ACTI000062_MVT.indicateurs[031]),										
										indicateurs[32] = base.cti_division(w_table.indicateurs[32],ACTI000062_MVT.indicateurs[032]),
										indicateurs[33] = base.cti_division(w_table.indicateurs[33],ACTI000062_MVT.indicateurs[033]),
										indicateurs[34] = base.cti_division(w_table.indicateurs[34],ACTI000062_MVT.indicateurs[034])

									"; 
								}
								
							EVAL]					
						FROM ACTI000062_MVT
									WHERE w_table.OIDT = ACTI000062_MVT.OIDT AND
										w_table.OID1 = ACTI000062_MVT.OID1 AND
										w_table.OID2 = ACTI000062_MVT.OID2 AND
										w_table.OID3 = ACTI000062_MVT.OID3 
							.,
				}

				]]></select>
				<FIELDS>
					<INSERT name="CTISELECT_TREE_FIELDS"/>
					<FIELD name="N"/>
					<FIELD name="N0"/>
					<FIELD name="N1"/>
					<FIELD name="N2"/>
					<FIELD name="N3"/>
					<FIELD name="N4"/>
					<FIELD name="N5"/>
					<FIELD name="N6"/>
					<FIELD name="N7"/>
					<FIELD name="N8"/>
					<FIELD name="N9"/>
					<FIELD name="N10"/>
					<FIELD name="N11"/>
					<FIELD name="N12"/>					
					<FIELD name="N13"/>
					<FIELD name="N14"/>
					<FIELD name="N15"/>
					<FIELD name="N16"/>
					<FIELD name="N17"/>
					<FIELD name="N18"/>
					<FIELD name="N19"/>
					<FIELD name="N20"/>
					<FIELD name="N21"/>
					<FIELD name="N22"/>
					<FIELD name="N23"/>
					<FIELD name="N24"/>
					<FIELD name="N25"/>
					<FIELD name="N26"/>
					<FIELD name="N27"/>
					<FIELD name="N28"/>
					<FIELD name="N29"/>
					<FIELD name="N30"/>
					<FIELD name="N31"/>
				</FIELDS>
			</SQL>
		</QUERY>
		<QUERY type="propertiesLink" name="VIEWPROPERTIES" forSelections="false">
			<SQL>
				<select><![CDATA[
						SELECT 'X_PERIODE', greatest(to_date(to_char('[PERIODE]'::date - INTERVAL  '3 year', 'YYYY-MM-DD'), 'YYYY-MM-DD'), (SELECT min(date_debut) FROM activite.p_factures ))::text;
				]]></select>
				<FIELDS>
					<FIELD name="name"/>
					<FIELD name="value"/>
				</FIELDS>
			</SQL>
		</QUERY>
	</QUERIES>
	<PRESENTATION>
		<VIEWLINKS>
			<VIEWLINK label="(&#8721;) Dernier Mois/Année " shortLabel="Mois/Année"   rowContext="false" buttonType="VIEWLINKPOPUP">
				<VIEWITEM label="Dernier mois" shortLabel="Dernier mois"  view="ACTI000063.XML" rowContext="false" enabled="true" buttonType="COMPARATIF" componentName="PRESTATIONS_BASE_VIEWLINK">
					<ARG name="ALIAS_PERIODE" value="return '-1';" />
					<ARG name="PERIODE" value="return SELECT.TOPERIODE.substr(0,8)+'01';"/>
					<ARG name="TOPERIODE" value=" return SELECT.TOPERIODE;"/>
					<ARG name="GROUPBY">
						<value>
							<![CDATA[
								
							var s:String = '';
							switch (SELECT.GROUPBY) {
								case 'ANNEE' :			s = 'JOURS'; 		break;
								case 'TRIM' :			s = 'JOURS';		break;
								case 'MOIS' :			s = 'JOURS';		break;
								case 'NUMEROMOIS' :		s = 'JOURS';		break;
								case 'NUMEROTRIM' :		s = 'JOURS';		break;
								case 'SEMAINEWE' :		s = 'JOURS';		break;
								case 'SEMAINEANNE' :	s = 'JOURS';		break;
								case 'NUMEROJOUR' :		s = 'JOURS';		break;
								case 'JOURS' :			s = 'JOURS';		break;
								case 'JOUR' :			s = 'JOURS';		break;
								
								case 'ANNEEF' :			s = 'JOURSF'; 		break;
								case 'TRIMF' :			s = 'JOURSF';		break;
								case 'MOISF' :			s = 'JOURSF';		break;
								case 'NUMEROMOISF' :	s = 'JOURSF';		break;
								case 'NUMEROTRIMF' :	s = 'JOURSF';		break;
								case 'SEMAINEWEF' :		s = 'JOURSF';		break;
								case 'SEMAINEANNEF' :	s = 'JOURSF';		break;
								case 'NUMEROJOURF' :	s = 'JOURSF';		break;
								case 'JOURSF' :			s = 'JOURSF';		break;
								case 'JOURF' :			s = 'JOURSF';		break;
								
								case 'ANNEEA' :			s = 'JOURSA'; 		break;
								case 'TRIMA' :			s = 'JOURSA';		break;
								case 'MOISA' :			s = 'JOURSA';		break;
								case 'NUMEROMOISA' :	s = 'JOURSA';		break;
								case 'NUMEROTRIMA' :	s = 'JOURSA';		break;
								case 'SEMAINEWEA' :		s = 'JOURSA';		break;
								case 'SEMAINEANNEA' :	s = 'JOURSA';		break;
								case 'NUMEROJOURA' :	s = 'JOURSA';		break;
								case 'JOURSA' :			s = 'JOURSA';		break;
								case 'JOURA' :			s = 'JOURSA';		break;
								
								case 'ANNEEV' :			s = 'JOURSV'; 		break;
								case 'TRIMV' :			s = 'JOURSV';		break;
								case 'MOISV' :			s = 'JOURSV';		break;
								case 'NUMEROMOISV' :	s = 'JOURSV';		break;
								case 'NUMEROTRIMV' :	s = 'JOURSV';		break;
								case 'SEMAINEWEV' :		s = 'JOURSV';		break;
								case 'SEMAINEANNEV' :	s = 'JOURSV';		break;
								case 'NUMEROJOURV' :	s = 'JOURSV';		break;
								case 'JOURSV' :			s = 'JOURSV';		break;
								case 'JOURV' :			s = 'JOURSV';		break;
					
								default :				
										if(SELECT.QUELLEDATE == 1) {s = 'JOURSA';			break;}
										if(SELECT.QUELLEDATE == 2) {s = 'JOURS';			break;}
										if(SELECT.QUELLEDATE == 3) {s = 'JOURSF';			break;}
										if(SELECT.QUELLEDATE == 4) {s = 'JOURSV';			break;}
										if(SELECT.QUELLEDATE == 5) {s = 'JOURS';			break;}
								
							}
							return s;
							]]>
						</value>
					</ARG>
					<ARG name="GROUPBY_2" value="return '-1';" />
					<ARG name="GROUPBY_3" value="return '-1';" />
					<ARG name="LGROUPBY" value="return SELECT.GROUPBY;" />
					<ARG name="LGROUPBY_2" value="return SELECT.GROUPBY_2;" />
					<ARG name="LGROUPBY_3" value="return SELECT.GROUPBY_3;" />
					<ARG name="DATA1" value="'FAVNBS'" />
					<ARG name="DATA2" value="'MTFACENC'" />
					<ARG name="DATA3" value="'MTENC'" />
					<ARG name="TYPE_COMPARAISON" value="'2'" />
				</VIEWITEM>	
				<VIEWITEM label="&#8721; dernier mois" data="2" shortLabel="&#8721; dernier  mois"  view="ACTI000149.XML" enabled="true" rowContext="false" buttonType="COMPARATIF" >
					<ARG name="ALIAS_PERIODE" value="return '-1';" />
					<ARG name="PERIODE" value="return SELECT.TOPERIODE.substr(0,8)+'01';"/>
					<ARG name="DATA1" value="'NBSEJ'" />
					<ARG name="DATA2" value="'MTFACENC'" />
					<ARG name="GROUPBY">
						<value>
							<![CDATA[
								
							var s:String = '';
							switch (SELECT.GROUPBY) {
								case 'ANNEE' :			s = 'JOURS'; 		break;
								case 'TRIM' :			s = 'JOURS';		break;
								case 'MOIS' :			s = 'JOURS';		break;
								case 'NUMEROMOIS' :		s = 'JOURS';		break;
								case 'NUMEROTRIM' :		s = 'JOURS';		break;
								case 'SEMAINEWE' :		s = 'JOURS';		break;
								case 'SEMAINEANNE' :	s = 'JOURS';		break;
								case 'NUMEROJOUR' :		s = 'JOURS';		break;
								case 'JOURS' :			s = 'JOURS';		break;
								case 'JOUR' :			s = 'JOURS';		break;
								
								case 'ANNEEF' :			s = 'JOURSF'; 		break;
								case 'TRIMF' :			s = 'JOURSF';		break;
								case 'MOISF' :			s = 'JOURSF';		break;
								case 'NUMEROMOISF' :	s = 'JOURSF';		break;
								case 'NUMEROTRIMF' :	s = 'JOURSF';		break;
								case 'SEMAINEWEF' :		s = 'JOURSF';		break;
								case 'SEMAINEANNEF' :	s = 'JOURSF';		break;
								case 'NUMEROJOURF' :	s = 'JOURSF';		break;
								case 'JOURSF' :			s = 'JOURSF';		break;
								case 'JOURF' :			s = 'JOURSF';		break;
								
								case 'ANNEEA' :			s = 'JOURSA'; 		break;
								case 'TRIMA' :			s = 'JOURSA';		break;
								case 'MOISA' :			s = 'JOURSA';		break;
								case 'NUMEROMOISA' :	s = 'JOURSA';		break;
								case 'NUMEROTRIMA' :	s = 'JOURSA';		break;
								case 'SEMAINEWEA' :		s = 'JOURSA';		break;
								case 'SEMAINEANNEA' :	s = 'JOURSA';		break;
								case 'NUMEROJOURA' :	s = 'JOURSA';		break;
								case 'JOURSA' :			s = 'JOURSA';		break;
								case 'JOURA' :			s = 'JOURSA';		break;
								
								case 'ANNEEV' :			s = 'JOURSV'; 		break;
								case 'TRIMV' :			s = 'JOURSV';		break;
								case 'MOISV' :			s = 'JOURSV';		break;
								case 'NUMEROMOISV' :	s = 'JOURSV';		break;
								case 'NUMEROTRIMV' :	s = 'JOURSV';		break;
								case 'SEMAINEWEV' :		s = 'JOURSV';		break;
								case 'SEMAINEANNEV' :	s = 'JOURSV';		break;
								case 'NUMEROJOURV' :	s = 'JOURSV';		break;
								case 'JOURSV' :			s = 'JOURSV';		break;
								case 'JOURV' :			s = 'JOURSV';		break;
					
								default :				
										if(SELECT.QUELLEDATE == 1) {s = 'JOURSA';			break;}
										if(SELECT.QUELLEDATE == 2) {s = 'JOURS';			break;}
										if(SELECT.QUELLEDATE == 3) {s = 'JOURSF';			break;}
										if(SELECT.QUELLEDATE == 4) {s = 'JOURSV';			break;}
										if(SELECT.QUELLEDATE == 5) {s = 'JOURS';			break;}
								
							}
							return s;
							]]>
						</value>
					</ARG>
					<ARG name="GROUPBY_2" value="return '-1';" />
					<ARG name="GROUPBY_3" value="return '-1';" />
					<ARG name="LGROUPBY" value="return SELECT.GROUPBY;" />
					<ARG name="LGROUPBY_2" value="return SELECT.GROUPBY_2;" />
					<ARG name="LGROUPBY_3" value="return SELECT.GROUPBY_3;" />
					<ARG name="QUELLEDATE" value="return SELECT.QUELLEDATE"/>
					<ARG name="TYPE_COMPARAISON" value="return '2';" />
				</VIEWITEM>
				<VIEWITEM  label="Dernière année" data="2" shortLabel="derniere  année"  view="ACTI000063.XML" enabled="true" rowContext="false" buttonType="COMPARATIF" >
					<ARG name="ALIAS_PERIODE" value="return '-1';" />
					<ARG name="PERIODE" value="return SELECT.TOPERIODE.substr(0,4)+'-01-01';"/>
					<ARG name="TOPERIODE" value=" return SELECT.TOPERIODE;"/>
					<ARG name="GROUPBY">
						<value>
							<![CDATA[
								
							var s:String = '';
							switch (SELECT.GROUPBY) {
								case 'ANNEE' :			s = 'NUMEROMOIS'; 		break;
								case 'TRIM' :			s = 'NUMEROMOIS';		break;
								case 'MOIS' :			s = 'NUMEROMOIS';		break;
								case 'NUMEROMOIS' :		s = 'NUMEROMOIS';		break;
								case 'NUMEROTRIM' :		s = 'NUMEROMOIS';		break;
								case 'SEMAINEWE' :		s = 'NUMEROMOIS';		break;
								case 'SEMAINEANNE' :	s = 'NUMEROMOIS';		break;
								case 'NUMEROJOUR' :		s = 'NUMEROMOIS';		break;
								case 'JOURS' :			s = 'NUMEROMOIS';		break;
								case 'JOUR' :			s = 'NUMEROMOIS';		break;
								
								case 'ANNEEF' :			s = 'NUMEROMOISF'; 		break;
								case 'TRIMF' :			s = 'NUMEROMOISF';		break;
								case 'MOISF' :			s = 'NUMEROMOISF';		break;
								case 'NUMEROMOISF' :	s = 'NUMEROMOISF';		break;
								case 'NUMEROTRIMF' :	s = 'NUMEROMOISF';		break;
								case 'SEMAINEWEF' :		s = 'NUMEROMOISF';		break;
								case 'SEMAINEANNEF' :	s = 'NUMEROMOISF';		break;
								case 'NUMEROJOURF' :	s = 'NUMEROMOISF';		break;
								case 'JOURSF' :			s = 'NUMEROMOISF';		break;
								case 'JOURF' :			s = 'NUMEROMOISF';		break;
								
								case 'ANNEEA' :			s = 'NUMEROMOISA'; 		break;
								case 'TRIMA' :			s = 'NUMEROMOISA';		break;
								case 'MOISA' :			s = 'NUMEROMOISA';		break;
								case 'NUMEROMOISA' :	s = 'NUMEROMOISA';		break;
								case 'NUMEROTRIMA' :	s = 'NUMEROMOISA';		break;
								case 'SEMAINEWEA' :		s = 'NUMEROMOISA';		break;
								case 'SEMAINEANNEA' :	s = 'NUMEROMOISA';		break;
								case 'NUMEROJOURA' :	s = 'NUMEROMOISA';		break;
								case 'JOURSA' :			s = 'NUMEROMOISA';		break;
								case 'JOURA' :			s = 'NUMEROMOISA';		break;
								
								case 'ANNEEV' :			s = 'NUMEROMOISV'; 		break;
								case 'TRIMV' :			s = 'NUMEROMOISV';		break;
								case 'MOISV' :			s = 'NUMEROMOISV';		break;
								case 'NUMEROMOISV' :	s = 'NUMEROMOISV';		break;
								case 'NUMEROTRIMV' :	s = 'NUMEROMOISV';		break;
								case 'SEMAINEWEV' :		s = 'NUMEROMOISV';		break;
								case 'SEMAINEANNEV' :	s = 'NUMEROMOISV';		break;
								case 'NUMEROJOURV' :	s = 'NUMEROMOISV';		break;
								case 'JOURSV' :			s = 'NUMEROMOISV';		break;
								case 'JOURV' :			s = 'NUMEROMOISV';		break;
					
								default :				
										if(SELECT.QUELLEDATE == 1) {s = 'NUMEROMOISA';			break;}
										if(SELECT.QUELLEDATE == 2) {s = 'NUMEROMOIS';			break;}
										if(SELECT.QUELLEDATE == 3) {s = 'NUMEROMOISF';			break;}
										if(SELECT.QUELLEDATE == 4) {s = 'NUMEROMOISV';			break;}
										if(SELECT.QUELLEDATE == 5) {s = 'NUMEROMOIS';			break;}
								
							}
							return s;
							]]>
						</value>
					</ARG>
					<ARG name="GROUPBY_2" value="return '-1';" />
					<ARG name="GROUPBY_3" value="return '-1';" />
					<ARG name="LGROUPBY" value="return SELECT.GROUPBY;" />
					<ARG name="LGROUPBY_2" value="return SELECT.GROUPBY_2;" />
					<ARG name="LGROUPBY_3" value="return SELECT.GROUPBY_3;" />
					<ARG name="DATA1" value="'NBSEJ'" />
					<ARG name="DATA2" value="'MTFACENC'" />
					<ARG name="TYPE_COMPARAISON" value="'2'" />
				</VIEWITEM>	
				<VIEWITEM label="&#8721; dernière Année" shortLabel="&#8721; derniere année"  view="ACTI000149.XML" rowContext="false" enabled="true" buttonType="COMPARATIF">
					<ARG name="ALIAS_PERIODE" value="return '-1';" />
					<ARG name="PERIODE_D" value="return VIEW.COMP_PERIODE_D;" />
					<ARG name="TOPERIODE_D" value="return VIEW.COMP_TOPERIODE_D;" />
					<ARG name="PERIODE" value="return SELECT.TOPERIODE.substr(0,4)+'-01-01';" />
					<ARG name="TOPERIODE" value=" return SELECT.TOPERIODE;" />
					<ARG name="GROUPBY">
						<value>
							<![CDATA[
								
							var s:String = '';
							switch (SELECT.GROUPBY) {
								case 'ANNEE' :			s = 'NUMEROMOIS'; 		break;
								case 'TRIM' :			s = 'NUMEROMOIS';		break;
								case 'MOIS' :			s = 'NUMEROMOIS';		break;
								case 'NUMEROMOIS' :		s = 'NUMEROMOIS';		break;
								case 'NUMEROTRIM' :		s = 'NUMEROMOIS';		break;
								case 'SEMAINEWE' :		s = 'NUMEROMOIS';		break;
								case 'SEMAINEANNE' :	s = 'NUMEROMOIS';		break;
								case 'NUMEROJOUR' :		s = 'NUMEROMOIS';		break;
								case 'JOURS' :			s = 'NUMEROMOIS';		break;
								case 'JOUR' :			s = 'NUMEROMOIS';		break;
								
								case 'ANNEEF' :			s = 'NUMEROMOISF'; 		break;
								case 'TRIMF' :			s = 'NUMEROMOISF';		break;
								case 'MOISF' :			s = 'NUMEROMOISF';		break;
								case 'NUMEROMOISF' :	s = 'NUMEROMOISF';		break;
								case 'NUMEROTRIMF' :	s = 'NUMEROMOISF';		break;
								case 'SEMAINEWEF' :		s = 'NUMEROMOISF';		break;
								case 'SEMAINEANNEF' :	s = 'NUMEROMOISF';		break;
								case 'NUMEROJOURF' :	s = 'NUMEROMOISF';		break;
								case 'JOURSF' :			s = 'NUMEROMOISF';		break;
								case 'JOURF' :			s = 'NUMEROMOISF';		break;
								
								case 'ANNEEA' :			s = 'NUMEROMOISA'; 		break;
								case 'TRIMA' :			s = 'NUMEROMOISA';		break;
								case 'MOISA' :			s = 'NUMEROMOISA';		break;
								case 'NUMEROMOISA' :	s = 'NUMEROMOISA';		break;
								case 'NUMEROTRIMA' :	s = 'NUMEROMOISA';		break;
								case 'SEMAINEWEA' :		s = 'NUMEROMOISA';		break;
								case 'SEMAINEANNEA' :	s = 'NUMEROMOISA';		break;
								case 'NUMEROJOURA' :	s = 'NUMEROMOISA';		break;
								case 'JOURSA' :			s = 'NUMEROMOISA';		break;
								case 'JOURA' :			s = 'NUMEROMOISA';		break;
								
								case 'ANNEEV' :			s = 'NUMEROMOISV'; 		break;
								case 'TRIMV' :			s = 'NUMEROMOISV';		break;
								case 'MOISV' :			s = 'NUMEROMOISV';		break;
								case 'NUMEROMOISV' :	s = 'NUMEROMOISV';		break;
								case 'NUMEROTRIMV' :	s = 'NUMEROMOISV';		break;
								case 'SEMAINEWEV' :		s = 'NUMEROMOISV';		break;
								case 'SEMAINEANNEV' :	s = 'NUMEROMOISV';		break;
								case 'NUMEROJOURV' :	s = 'NUMEROMOISV';		break;
								case 'JOURSV' :			s = 'NUMEROMOISV';		break;
								case 'JOURV' :			s = 'NUMEROMOISV';		break;
					
								default :				
										if(SELECT.QUELLEDATE == 1) {s = 'NUMEROMOISA';			break;}
										if(SELECT.QUELLEDATE == 2) {s = 'NUMEROMOIS';			break;}
										if(SELECT.QUELLEDATE == 3) {s = 'NUMEROMOISF';			break;}
										if(SELECT.QUELLEDATE == 4) {s = 'NUMEROMOISV';			break;}
										if(SELECT.QUELLEDATE == 5) {s = 'NUMEROMOIS';			break;}
								
							}
							return s;
							]]>
						</value>
					</ARG>
					<ARG name="GROUPBY_2" value="return '-1';"/>
					<ARG name="GROUPBY_3" value="return '-1';"/>
					<ARG name="LGROUPBY" value="return SELECT.GROUPBY;" />
					<ARG name="LGROUPBY_2" value="return SELECT.GROUPBY_2;" />
					<ARG name="LGROUPBY_3" value="return SELECT.GROUPBY_3;" />
					<ARG name="DATA1" value="'NBSEJ'" />
					<ARG name="DATA2" value="'MTFACENC'" />
					<ARG name="TYPE_COMPARAISON" value="'2'" />
				</VIEWITEM>	
			</VIEWLINK>		
			<VIEWLINK label="Comparatif" shortLabel="Comparatif" view="ACTI000063.XML" enabled="true" rowContext="false" >
				<ARG name="ALIAS_PERIODE" value="return '-1';" />
				<ARG name="QUELLEDATE" value="return SELECT.QUELLEDATE;" /> 
				<ARG name="PERIODE" value="return SELECT.TOPERIODE.substr(0,4)+'-01-01';" />
				<ARGS name="SPEC">
					<value><![CDATA[
						LINKVARIABLES['TYPE_COMPARAISON'] = '2';
						LINKVARIABLES['DATA1'] = 'MTFAC';
						LINKVARIABLES['DATA2'] = '0';
						LINKVARIABLES['DATA3'] = '0';
						if (SELECT.QUELMONTANT == '2') {
							LINKVARIABLES['DATA1'] = 'MTCPT';
						}
						if (SELECT.QUELMONTANT == 'FACVSBG') {
							//LINKVARIABLES['DATA1'] = 'MTCPT';
						}
						if (SELECT.QUELMONTANT == 'ENF') {
							LINKVARIABLES['DATA1'] = 'MTENC';
						}
						if (SELECT.QUELMONTANT == 'MF-ENF') {
							LINKVARIABLES['DATA1'] = 'MTFACENC';
						}
						if (SELECT.QUELMONTANT == 'MC-ENF') {
							LINKVARIABLES['DATA1'] = 'MTFACENC';
						}
						return 'OK';
					]]></value>
				</ARGS>
				<ARG name="GROUPBY" value="return SELECT.LGROUPBY;" />
				<ARG name="DATA1" value="if(SELECT.QUELLEDATE == '1') {return 'FAVEMC';} else {return 'FAVNBS';}" />
				<ARG name="DATA2" value="'MTFACENC'" />
				<ARG name="DATA3" value="if(SELECT.QUELLEDATE == '1') {return 'MMFPVEMC';} else {return 'MMTFACENC';}" />
				<ARG name="DATA4" value="if(SELECT.QUELLEDATE == '1' || SELECT.QUELLEDATE == '2') {return 'FACNBJ';} else {return 'FAVNBSHC';}"/>
				<ARG name="DATA5" value="if(SELECT.QUELLEDATE == '1' || SELECT.QUELLEDATE == '2') {return 'FAVDMS';} else {return 'FAVMTTHC';}"/>
				<ARG name="GROUPBY_TAB" value="return 'TAB';" />
				<ARG name="TYPE_COMPARAISON" value="'2'" />
			</VIEWLINK>
			<VIEWLINK label="Comparatif mensuel" shortLabel="Comp. Mensuel" view="ACTI000156.XML" enabled="true" rowContext="false" buttonType="COMPARATIF" >
				<ARG name="ALIAS_PERIODE" value="return '-1';" />
				<ARG name="QUELLEDATE" value="return SELECT.QUELLEDATE;" /> 
				<ARG name="PERIODE" value="return SELECT.TOPERIODE.substr(0,4)+'-01-01';" />
				<ARGS name="SPEC">
					<value><![CDATA[
						LINKVARIABLES['TYPE_COMPARAISON'] = '2';
						LINKVARIABLES['DATA1'] = 'MTFAC';
						LINKVARIABLES['DATA2'] = '0';
						LINKVARIABLES['DATA3'] = '0';
						if (SELECT.QUELMONTANT == '2') {
							LINKVARIABLES['DATA1'] = 'MTCPT';
						}
						if (SELECT.QUELMONTANT == 'FACVSBG') {
							//LINKVARIABLES['DATA1'] = 'MTCPT';
						}
						if (SELECT.QUELMONTANT == 'ENF') {
							LINKVARIABLES['DATA1'] = 'MTENC';
						}
						if (SELECT.QUELMONTANT == 'MF-ENF') {
							LINKVARIABLES['DATA1'] = 'MTFACENC';
						}
						if (SELECT.QUELMONTANT == 'MC-ENF') {
							LINKVARIABLES['DATA1'] = 'MTFACENC';
						}
						return 'OK';
					]]></value>
				</ARGS>
				<ARG name="GROUPBY" value="return SELECT.GROUPBY;"/>
				<ARG name="GROUPBY_2" value="return SELECT.GROUPBY_2;"/>
				<ARG name="GROUPBY_3" value="return SELECT.GROUPBY_3;"/>
				<ARG name="DATA1" value="if(SELECT.QUELLEDATE == '1') {return 'FAVEMC';} else {return 'FAVNBS';}" />
				<ARG name="DATA2" value="'MTFACENC'" />
				<ARG name="DATA3" value="if(SELECT.QUELLEDATE == '1') {return 'MMFPVEMC';} else {return 'MMTFACENC';}" />
				<ARG name="TYPE_COMPARAISON" value="'2'" />
			</VIEWLINK>
			<VIEWLINK label="Effets" shortLabel="Effets"  view="ACTI000141.XML" rowContext="false" enabled="true" buttonType="COMPARATIF" >
					<ARG name="ALIAS_PERIODE" value="return '-1';" />
                    <ARG name="PERIODE" value="return VIEW.COMP_PERIODE;" />
					<ARG name="GROUPBY" value="return SELECT.LGROUPBY;" />
					<ARG name="DATA01" value="'1.1'" />
					<ARG name="GROUPBY_TAB" value="return 'TAB';" />
                    <ARG name="TYPE_COMPARAISON" value="'2'" />
			</VIEWLINK>	
			<VIEWLINK label="Evolution comparative" shortLabel="Evol. comparative"   rowContext="false" buttonType="VIEWLINK_EVO_COMP" >			
				<VIEWITEM label="Standard" shortLabel="Evolution comparative" view="ACTI000154.XML" rowContext="false" enabled="true" buttonType="VIEWLINK_EVO_COMP">
					<ARG name="QUELLEDATE" value="return SELECT.QUELLEDATE;" /> 
					<ARGS name="SPEC">
						<value><![CDATA[
							LINKVARIABLES['TYPE_COMPARAISON'] = '2';
							LINKVARIABLES['DATA1'] = 'MTFAC';
							LINKVARIABLES['DATA2'] = '0';
							LINKVARIABLES['DATA3'] = '0';
							if (SELECT.QUELMONTANT == '2') {
								LINKVARIABLES['DATA1'] = 'MTCPT';
							}
							if (SELECT.QUELMONTANT == 'FACVSBG') {
								//LINKVARIABLES['DATA1'] = 'MTCPT';
							}
							if (SELECT.QUELMONTANT == 'ENF') {
								LINKVARIABLES['DATA1'] = 'MTENC';
							}
							if (SELECT.QUELMONTANT == 'MF-ENF') {
								LINKVARIABLES['DATA1'] = 'MTFACENC';
							}
							if (SELECT.QUELMONTANT == 'MC-ENF') {
								LINKVARIABLES['DATA1'] = 'MTFACENC';
							}
							return 'OK';
						]]></value>
					</ARGS>
					<ARG name="GROUPBY" value="return SELECT.GROUPBY;" />
					<ARG name="GROUPBY_2" value="if (SELECT.QUELLEDATE == '1' ) {return 'NUMEROMOISA';}
												if (SELECT.QUELLEDATE == '2' ) {return 'NUMEROMOIS';}
												if (SELECT.QUELLEDATE == '3'  ) {return 'NUMEROMOISF';}
												if (SELECT.QUELLEDATE == '4'  ) {return 'NUMEROMOISV';}
						" />
					<ARG name="DATA1" value="if(SELECT.QUELLEDATE == '1') {return 'FAVEMC';} else {return 'FAVNBS';}" />
					<ARG name="DATA2" value="'MTFACENC'" />
					<ARG name="DATA3" value="if(SELECT.QUELLEDATE == '1') {return 'MMFPVEMC';} else {return 'MMTFACENC';}" />
					<ARG name="DATA4" value="if(SELECT.QUELLEDATE == '1' || SELECT.QUELLEDATE == '2') {return 'FACNBJ';} else {return 'FAVNBSHC';}"/>
					<ARG name="DATA5" value="if(SELECT.QUELLEDATE == '1' || SELECT.QUELLEDATE == '2') {return 'FAVDMS';} else {return 'FAVMTTHC';}"/>					
					<ARG name="DATA6"   value="return '0';" />
					<ARG name="DATA7"   value="return '0';" />
					<ARG name="DATA8"   value="return '0';" />
					<ARG name="DATA9"   value="return '0';"/>
					<ARG name="DATA10" 	value="return '0';"/>			
					<ARG name="DATA011" value="return '0';" />
					<ARG name="DATA012" value="return '0';" />
					<ARG name="DATA013" value="return '0';" />
					<ARG name="DATA014" value="return '0';"/>
					<ARG name="DATA015" value="return '0';"/>
					<ARG name="LGROUPBY" value="return SELECT.GROUPBY;" />
					<ARG name="LGROUPBY_3" value="return SELECT.GROUPBY_3;" />
					<ARG name="GROUPBY_TAB" value="return 'TAB';" />
					<ARG name="TYPE_COMPARAISON" value="'2'" />
				</VIEWITEM>	
				<VIEWITEM label="Détaillée" shortLabel="Evol. comparative" view="ACTI000154.XML" rowContext="false" enabled="true" buttonType="COMPARATIF">
					<ARG name="QUELLEDATE" value="return SELECT.QUELLEDATE;" /> 
					<ARGS name="SPEC">
						<value><![CDATA[
							LINKVARIABLES['TYPE_COMPARAISON'] = '2';
							LINKVARIABLES['DATA1'] = 'MTFAC';
							LINKVARIABLES['DATA2'] = '0';
							LINKVARIABLES['DATA3'] = '0';
							if (SELECT.QUELMONTANT == '2') {
								LINKVARIABLES['DATA1'] = 'MTCPT';
							}
							if (SELECT.QUELMONTANT == 'FACVSBG') {
								//LINKVARIABLES['DATA1'] = 'MTCPT';
							}
							if (SELECT.QUELMONTANT == 'ENF') {
								LINKVARIABLES['DATA1'] = 'MTENC';
							}
							if (SELECT.QUELMONTANT == 'MF-ENF') {
								LINKVARIABLES['DATA1'] = 'MTFACENC';
							}
							if (SELECT.QUELMONTANT == 'MC-ENF') {
								LINKVARIABLES['DATA1'] = 'MTFACENC';
							}
							return 'OK';
						]]></value>
					</ARGS>
					<ARG name="GROUPBY" value="return SELECT.GROUPBY;" />
					<ARG name="GROUPBY_2" value="if (SELECT.QUELLEDATE == '1' ) {return 'NUMEROMOISA';}
												 if (SELECT.QUELLEDATE == '2' ) {return 'NUMEROMOIS';}
												 if (SELECT.QUELLEDATE == '3'  ) {return 'NUMEROMOISF';}
												if (SELECT.QUELLEDATE == '4'  ) {return 'NUMEROMOISV';}
						" />
					<ARG name="DATA1" value="if(SELECT.QUELLEDATE == '1') {return 'FAVEMC';} else {return 'FAVNBS';}" />
					<ARG name="DATA2" value="'MTFACENC'" />
					<ARG name="DATA3" value="if(SELECT.QUELLEDATE == '1') {return 'MMFPVEMC';} else {return 'MMTFACENC';}" />
					<ARG name="DATA4" value="if(SELECT.QUELLEDATE == '1' || SELECT.QUELLEDATE == '2') {return 'FACNBJ';} else {return 'FAVNBSHC';}"/>
					<ARG name="DATA5" value="if(SELECT.QUELLEDATE == '1' || SELECT.QUELLEDATE == '2') {return 'FAVDMS';} else {return 'FAVMTTHC';}"/>
					<ARG name="DATA6" value="if(SELECT.QUELLEDATE == '1' || SELECT.QUELLEDATE == '2') {return 'FAVNBSHC';} else {return 'FAVCAMHC';}"/>
					<ARG name="DATA7" value="if(SELECT.QUELLEDATE == '1' || SELECT.QUELLEDATE == '2') {return 'FAVMTTHC';} else {return 'FAVNBSHJ';}"/>
					<ARG name="DATA8" value="if(SELECT.QUELLEDATE == '1' || SELECT.QUELLEDATE == '2') {return 'FAVCAMHC';} else {return 'FAVMTTHJ';}"/>
					<ARG name="DATA9" value="if(SELECT.QUELLEDATE == '1' || SELECT.QUELLEDATE == '2') {return 'FAVNBSHJ';} else {return 'FAVCAMHJ';}"/>
					<ARG name="DATA10" value="if(SELECT.QUELLEDATE == '1' || SELECT.QUELLEDATE == '2') {return 'FAVMTTHJ';} else {return 'FAVNBSHA';}"/>
					<ARG name="DATA011" value="if(SELECT.QUELLEDATE == '1' || SELECT.QUELLEDATE == '2') {return 'FAVCAMHJ';} else {return 'FAVMTTHA';}"/>
					<ARG name="DATA012" value="if(SELECT.QUELLEDATE == '1' || SELECT.QUELLEDATE == '2') {return 'FAVNBSHA';} else {return 'FAVCAMAU';}"/>
					<ARG name="DATA013" value="if(SELECT.QUELLEDATE == '1' || SELECT.QUELLEDATE == '2') {return 'FAVMTTHA';} else {return '0';}"/>
					<ARG name="DATA014" value="if(SELECT.QUELLEDATE == '1' || SELECT.QUELLEDATE == '2') {return 'FAVCAMAU';} else {return '0';}"/>
				
					<ARG name="LGROUPBY" value="return SELECT.GROUPBY;" />
					<ARG name="LGROUPBY_3" value="return SELECT.GROUPBY_3;" />
					<ARG name="GROUPBY_TAB" value="return 'TAB';" />
					<ARG name="TYPE_COMPARAISON" value="'2'" />
				</VIEWITEM>	
			</VIEWLINK>		
			<VIEWLINK label="Evolution" shortLabel="Evolution" view="ACTI000062.XML" enabled="true" rowContext="false" componentName="PERIODICITE_VIEWLINK" component2Name="PRESTATIONS_BASE_VIEWLINK">
				<ARG name="ALIAS_PERIODE" value="return '-1';" />
				<ARG name="PERIODE" value="return SELECT.TOPERIODE.substr(0,4)+'-01-01';" />
				<ARG name="QUELLEDATE" value="return SELECT.QUELLEDATE;" /> 
				<ARGS name="SPEC">
					<value><![CDATA[
						LINKVARIABLES['TYPE_COMPARAISON'] = '2';
						LINKVARIABLES['DATA'] = 'MTFAC';
						if (SELECT.QUELMONTANT == '2') {
							LINKVARIABLES['DATA'] = 'MTCPT';
						}
						if (SELECT.QUELMONTANT == 'FACVSBG') {
							//LINKVARIABLES['DATA'] = 'MTCPT';
						}
						if (SELECT.QUELMONTANT == 'ENF') {
							LINKVARIABLES['DATA'] = 'MTENC';
						}
						if (SELECT.QUELMONTANT == 'MF-ENF') {
							LINKVARIABLES['DATA'] = 'MTFACENC';
						}
						if (SELECT.QUELMONTANT == 'MC-ENF') {
							LINKVARIABLES['DATA'] = 'MTFACENC';
						}
						return 'OK';
					]]></value>
				</ARGS>
				<ARG name="GROUPBY" value="return SELECT.LGROUPBY;"/>
				<ARG name="DATA" value="return 'MTFACENC';"/>   
				<ARG name="GROUPBY_TAB" value="return 'AUTO';"/>
				<ARG name="PERIODICITE" value="'MONTH'"/> 
				<ARG name="GROUPBY_TAB" value="return 'TAB';" />				
			</VIEWLINK>
			<VIEWLINK label="Analyse croisée" shortLabel="Analyse croisée" view="ACTI000082.XML" enabled="true" rowContext="false" buttonType="ANALYSE_CROISEE" >
				<ARG name="ALIAS_PERIODE" value="return '-1'"/>
				<ARG name="PERIODE" value="return VIEW.X_PERIODE.substr(0,4)+'-01-01';"/>
				<ARG name="QUELLEDATE" value="return SELECT.QUELLEDATE;"/> 
				<ARG name="DATA" value="'MTFACENC';"/>
				<ARG name="COLUMNBY" value="'NUMEROMOIS'"/>
				<ARG name="GROUPBY">
					<value>
						<![CDATA[			
							if(SELECT.QUELLEDATE == '1') {s = 'ANNEEA';}
							if(SELECT.QUELLEDATE == '2') {s = 'ANNEE';}
							if(SELECT.QUELLEDATE == '3') {s = 'ANNEEF';}
							if(SELECT.QUELLEDATE == '4') {s = 'ANNEEV';}
							if(SELECT.QUELLEDATE == '5') {s = 'ANNEE';}
						return s;
						]]>
					</value>
				</ARG>
				<ARG name="GROUPBY_2" value="return SELECT.GROUPBY;"/>
				<ARG name="GROUPBY_3" value="return SELECT.GROUPBY_2;"/>
				<ARG name="LGROUPBY" value="return SELECT.GROUPBY;" />
				<ARG name="LGROUPBY_2" value="return SELECT.GROUPBY_2;" />
				<ARG name="LGROUPBY_3" value="return SELECT.GROUPBY_3;" />	
				<ARG name="GROUPBY_TAB" value="'TAB'" />
				<ARG name="COLUMNBYCOUNT" value="'12'" />
			</VIEWLINK>
			<VIEWLINK label="Analyse"  shortLabel="Analyse"  rowContext="false" buttonType="ANALYSE_VIEWLINK">
				<VIEWITEM label="Analyse" shortLabel="Analyse"  view="ACTI000018.XML" rowContext="false" enabled="true" buttonType="ANALYSE_VIEWLINK" componentName="PRESTATIONS_BASE_VIEWLINK">
					<ARG name="ALIAS_PERIODE" value="return '-1'" />
					<ARG name="QUELLEDATE" value="return SELECT.QUELLEDATE;" /> 
					<ARG name="GROUPBY" value="return SELECT.GROUPBY;" />
					<ARG name="GROUPBY_2" value="reurn SELECT.GROUPBY_2" />
					<ARG name="GROUPBY_TAB" value="return 'TAB';" />
					<ARG name="LGROUPBY" value="return SELECT.GROUPBY;" />
				</VIEWITEM>					
				<VIEWITEM label="Analyse paramètrable" shortLabel="Analyse"  view="ACTI000165.XML" rowContext="false" enabled="true" buttonType="ANALYSE_VIEWLINK" componentName="PRESTATIONS_BASE_VIEWLINK">
					<ARG name="ALIAS_PERIODE" value="return '-1'" />
					<ARG name="QUELLEDATE" value="return SELECT.QUELLEDATE;" /> 
					<ARG name="GROUPBY" value="return SELECT.GROUPBY;" />
					<ARG name="GROUPBY_2" value="reurn SELECT.GROUPBY_2" />
					<ARG name="GROUPBY_TAB" value="return 'TAB';" />
					<ARG name="LGROUPBY" value="return SELECT.GROUPBY;" />
					<ARG name="LS_DATA" value="return '-1';"/>
					<ARG name="DATA1" value="if(SELECT.QUELLEDATE == '1') {return 'FAVEMC';} else {return 'FAVNBS';}" />
					<ARG name="DATA2" value="'MTFACENC'" />
					<ARG name="DATA3" value="if(SELECT.QUELLEDATE == '1') {return 'MMFPVEMC';} else {return 'MMTFACENC';}" />
					<ARG name="DATA4" value="return 'FAVNBEMCHC';"/>
					<ARG name="DATA5" value="return 'FAVMTTHC';"/>
					<ARG name="DATA6" value="return 'FAVCAMHC';"/>
					<ARG name="DATA7" value="return 'FAVNBSHJ';"/>
					<ARG name="DATA8" value="return 'FAVMTTHJ';"/>
					<ARG name="DATA9" value="return 'FAVCAMHJ';"/>
					<ARG name="DATA10" value="return '0'" />
					<ARG name="DATA011" value="return '0'" />
					<ARG name="DATA012" value="return '0'" />
					<ARG name="DATA013" value="return '0'" />
					<ARG name="DATA014" value="return '0'" />
					<ARG name="DATA015" value="return '0'" />
					<ARG name="GROUPBY_TAB" value="'TAB'" />
				</VIEWITEM>	
			</VIEWLINK>	
			<VIEWLINK label="Liste séjours" shortLabel="Séjours" view="ACTI000016.XML" componentName="PRESTATIONS_BASE_VIEWLINK"  component2Name="ETA_DOS_BASE_VIEWLINK">
				<ARG name="ALIAS_PERIODE" value="return '-1';"/>
				<ARG name="GROUPBY_2" value="return '-1';"/>
				<ARG name="PERIODE" value="	if (COLUMN.NAME == 'N1') {return VIEW.COLD1}
											if (COLUMN.NAME == 'N2') {return VIEW.COLD2}
											if (COLUMN.NAME == 'N3') {return VIEW.COLD3}
											if (COLUMN.NAME == 'N4') {return VIEW.COLD4}
											if (COLUMN.NAME == 'N5') {return VIEW.COLD5}
											if (COLUMN.NAME == 'N6') {return VIEW.COLD6}
											if (COLUMN.NAME == 'N7') {return VIEW.COLD7}
											if (COLUMN.NAME == 'N8') {return VIEW.COLD8}
											if (COLUMN.NAME == 'N9') {return VIEW.COLD9}
											if (COLUMN.NAME == 'N10') {return VIEW.COLD10}
											if (COLUMN.NAME == 'N11') {return VIEW.COLD11}
											if (COLUMN.NAME == 'N12') {return VIEW.COLD12}
											if (COLUMN.NAME == 'N13') {return VIEW.COLD13}											
											if (COLUMN.NAME == 'N14') {return VIEW.COLD14}
											if (COLUMN.NAME == 'N15') {return VIEW.COLD15}
											if (COLUMN.NAME == 'N16') {return VIEW.COLD16}
											if (COLUMN.NAME == 'N17') {return VIEW.COLD17}
											if (COLUMN.NAME == 'N18') {return VIEW.COLD18}
											if (COLUMN.NAME == 'N19') {return VIEW.COLD19}
											if (COLUMN.NAME == 'N20') {return VIEW.COLD20}
											if (COLUMN.NAME == 'N21') {return VIEW.COLD21}
											if (COLUMN.NAME == 'N22') {return VIEW.COLD22}
											if (COLUMN.NAME == 'N23') {return VIEW.COLD23}
											if (COLUMN.NAME == 'N24') {return VIEW.COLD24}											
											if (COLUMN.NAME == 'N25') {return VIEW.COLD25}
											if (COLUMN.NAME == 'N26') {return VIEW.COLD26}
											if (COLUMN.NAME == 'N27') {return VIEW.COLD27}
											if (COLUMN.NAME == 'N28') {return VIEW.COLD28}
											if (COLUMN.NAME == 'N29') {return VIEW.COLD29}
											if (COLUMN.NAME == 'N30') {return VIEW.COLD30}
											if (COLUMN.NAME == 'N31') {return VIEW.COLD31}
											return SELECT.PERIODE"/>
				<ARG name="TOPERIODE" value="	if (COLUMN.NAME == 'N1') {return VIEW.COLF1}
											if (COLUMN.NAME == 'N2') {return VIEW.COLF2}
											if (COLUMN.NAME == 'N3') {return VIEW.COLF3}
											if (COLUMN.NAME == 'N4') {return VIEW.COLF4}
											if (COLUMN.NAME == 'N5') {return VIEW.COLF5}
											if (COLUMN.NAME == 'N6') {return VIEW.COLF6}
											if (COLUMN.NAME == 'N7') {return VIEW.COLF7}
											if (COLUMN.NAME == 'N8') {return VIEW.COLF8}
											if (COLUMN.NAME == 'N9') {return VIEW.COLF9}
											if (COLUMN.NAME == 'N10') {return VIEW.COLF10}
											if (COLUMN.NAME == 'N11') {return VIEW.COLF11}
											if (COLUMN.NAME == 'N12') {return VIEW.COLF12}
											if (COLUMN.NAME == 'N13') {return VIEW.COLD13}											
											if (COLUMN.NAME == 'N14') {return VIEW.COLD14}
											if (COLUMN.NAME == 'N15') {return VIEW.COLD15}
											if (COLUMN.NAME == 'N16') {return VIEW.COLD16}
											if (COLUMN.NAME == 'N17') {return VIEW.COLD17}
											if (COLUMN.NAME == 'N18') {return VIEW.COLD18}
											if (COLUMN.NAME == 'N19') {return VIEW.COLD19}
											if (COLUMN.NAME == 'N20') {return VIEW.COLD20}
											if (COLUMN.NAME == 'N21') {return VIEW.COLD21}
											if (COLUMN.NAME == 'N22') {return VIEW.COLD22}
											if (COLUMN.NAME == 'N23') {return VIEW.COLD23}
											if (COLUMN.NAME == 'N24') {return VIEW.COLD24}											
											if (COLUMN.NAME == 'N25') {return VIEW.COLD25}
											if (COLUMN.NAME == 'N26') {return VIEW.COLD26}
											if (COLUMN.NAME == 'N27') {return VIEW.COLD27}
											if (COLUMN.NAME == 'N28') {return VIEW.COLD28}
											if (COLUMN.NAME == 'N29') {return VIEW.COLD29}
											if (COLUMN.NAME == 'N30') {return VIEW.COLD30}
											if (COLUMN.NAME == 'N31') {return VIEW.COLD31}
											return SELECT.TOPERIODE"/>
				<ARG name="QUELLEDATE" value="return SELECT.QUELLEDATE;" /> 
			</VIEWLINK>
		</VIEWLINKS>
		<ONGLET excelLabel="Répartition mensuelle" label="Répartition mensuelle" multiTab="true">
			<CHART title="Evolution temporelle (5 premiers)" type="lineChart" maxItems="5" maxItemsSortOn="N" maxItemsSortSeq="D" serieIsCategory="true" sortField="N" sortSeq="D" condition="ROW.LVL == '1'"
				visibleCondition="SELECT.GROUPBY != 'TRIM' &amp;&amp; SELECT.GROUPBY != 'MOIS' &amp;&amp; SELECT.GROUPBY != 'JOUR' &amp;&amp; SELECT.GROUPBY != 'NUMEROTRIM' &amp;&amp; SELECT.GROUPBY != 'NUMEROMOIS' &amp;&amp; SELECT.GROUPBY != 'JOURS'">
				<CATEGORY field="TXT" type="Char"/>
				<SERIE field="N1" displayName="VIEW.COLH1" displayNameCalc="true" visibleCondition="VIEW.COLH1 != null"/>
				<SERIE field="N2" displayName="VIEW.COLH2" displayNameCalc="true" visibleCondition="VIEW.COLH2 != null"/>
				<SERIE field="N3" displayName="VIEW.COLH3" displayNameCalc="true" visibleCondition="VIEW.COLH3 != null"/>
				<SERIE field="N4" displayName="VIEW.COLH4" displayNameCalc="true" visibleCondition="VIEW.COLH4 != null"/>
				<SERIE field="N5" displayName="VIEW.COLH5" displayNameCalc="true" visibleCondition="VIEW.COLH5 != null"/>
				<SERIE field="N6" displayName="VIEW.COLH6" displayNameCalc="true" visibleCondition="VIEW.COLH6 != null"/>
				<SERIE field="N7" displayName="VIEW.COLH7" displayNameCalc="true" visibleCondition="VIEW.COLH7 != null"/>
				<SERIE field="N8" displayName="VIEW.COLH8" displayNameCalc="true" visibleCondition="VIEW.COLH8 != null"/>
				<SERIE field="N9" displayName="VIEW.COLH9" displayNameCalc="true" visibleCondition="VIEW.COLH9 != null"/>
				<SERIE field="N10" displayName="VIEW.COLH10" displayNameCalc="true" visibleCondition="VIEW.COLH10 != null"/>
				<SERIE field="N11" displayName="VIEW.COLH11" displayNameCalc="true" visibleCondition="VIEW.COLH11 != null"/>
				<SERIE field="N12" displayName="VIEW.COLH12" displayNameCalc="true" visibleCondition="VIEW.COLH12 != null"/>
				<SERIE field="N13" displayName="VIEW.COLH13" displayNameCalc="true" visibleCondition="VIEW.COLH13 != null"/>
				<SERIE field="N14" displayName="VIEW.COLH14" displayNameCalc="true" visibleCondition="VIEW.COLH14 != null"/>
				<SERIE field="N15" displayName="VIEW.COLH15" displayNameCalc="true" visibleCondition="VIEW.COLH15 != null"/>
				<SERIE field="N16" displayName="VIEW.COLH16" displayNameCalc="true" visibleCondition="VIEW.COLH16 != null"/>
				<SERIE field="N17" displayName="VIEW.COLH17" displayNameCalc="true" visibleCondition="VIEW.COLH17 != null"/>
				<SERIE field="N18" displayName="VIEW.COLH18" displayNameCalc="true" visibleCondition="VIEW.COLH18 != null"/>
				<SERIE field="N19" displayName="VIEW.COLH19" displayNameCalc="true" visibleCondition="VIEW.COLH19 != null"/>
				<SERIE field="N20" displayName="VIEW.COLH20" displayNameCalc="true" visibleCondition="VIEW.COLH20 != null"/>
				<SERIE field="N21" displayName="VIEW.COLH21" displayNameCalc="true" visibleCondition="VIEW.COLH21 != null"/>
				<SERIE field="N22" displayName="VIEW.COLH22" displayNameCalc="true" visibleCondition="VIEW.COLH22 != null"/>
				<SERIE field="N23" displayName="VIEW.COLH23" displayNameCalc="true" visibleCondition="VIEW.COLH23 != null"/>
				<SERIE field="N24" displayName="VIEW.COLH24" displayNameCalc="true" visibleCondition="VIEW.COLH24 != null"/>
				<SERIE field="N25" displayName="VIEW.COLH25" displayNameCalc="true" visibleCondition="VIEW.COLH25 != null"/>
				<SERIE field="N26" displayName="VIEW.COLH26" displayNameCalc="true" visibleCondition="VIEW.COLH26 != null"/>
				<SERIE field="N27" displayName="VIEW.COLH27" displayNameCalc="true" visibleCondition="VIEW.COLH27 != null"/>
				<SERIE field="N28" displayName="VIEW.COLH28" displayNameCalc="true" visibleCondition="VIEW.COLH28 != null"/>
				<SERIE field="N29" displayName="VIEW.COLH29" displayNameCalc="true" visibleCondition="VIEW.COLH29 != null"/>
				<SERIE field="N30" displayName="VIEW.COLH30" displayNameCalc="true" visibleCondition="VIEW.COLH30 != null"/>
				<SERIE field="N31" displayName="VIEW.COLH31" displayNameCalc="true" visibleCondition="VIEW.COLH31 != null"/>
			</CHART>
			<CHART title="Evolution temporelle (5 premiers)" type="lineChart" maxItems="5" maxItemsSortOn="N" maxItemsSortSeq="D" serieIsCategory="true" sortField="N" sortSeq="D" condition="ROW.LVL == '1'"
				visibleCondition="SELECT.GROUPBY != 'TRIM' &amp;&amp; SELECT.GROUPBY != 'MOIS' &amp;&amp; SELECT.GROUPBY != 'JOUR' &amp;&amp; SELECT.GROUPBY != 'JOURS'  &amp;&amp; SELECT.GROUPBY != 'NUMEROTRIM' &amp;&amp; SELECT.GROUPBY != 'NUMEROMOIS'">
				<CATEGORY field="TXT" type="Char"/>
				<SERIE field="N1" displayName="VIEW.COLH1" displayNameCalc="true" visibleCondition="VIEW.COLH1 != null"/>
				<SERIE field="N2" displayName="VIEW.COLH2" displayNameCalc="true" visibleCondition="VIEW.COLH2 != null"/>
				<SERIE field="N3" displayName="VIEW.COLH3" displayNameCalc="true" visibleCondition="VIEW.COLH3 != null"/>
				<SERIE field="N4" displayName="VIEW.COLH4" displayNameCalc="true" visibleCondition="VIEW.COLH4 != null"/>
				<SERIE field="N5" displayName="VIEW.COLH5" displayNameCalc="true" visibleCondition="VIEW.COLH5 != null"/>
				<SERIE field="N6" displayName="VIEW.COLH6" displayNameCalc="true" visibleCondition="VIEW.COLH6 != null"/>
				<SERIE field="N7" displayName="VIEW.COLH7" displayNameCalc="true" visibleCondition="VIEW.COLH7 != null"/>
				<SERIE field="N8" displayName="VIEW.COLH8" displayNameCalc="true" visibleCondition="VIEW.COLH8 != null"/>
				<SERIE field="N9" displayName="VIEW.COLH9" displayNameCalc="true" visibleCondition="VIEW.COLH9 != null"/>
				<SERIE field="N10" displayName="VIEW.COLH10" displayNameCalc="true" visibleCondition="VIEW.COLH10 != null"/>
				<SERIE field="N11" displayName="VIEW.COLH11" displayNameCalc="true" visibleCondition="VIEW.COLH11 != null"/>
				<SERIE field="N12" displayName="VIEW.COLH12" displayNameCalc="true" visibleCondition="VIEW.COLH12 != null"/>
			</CHART>
			<CHART title="Comparatif (10 premiers)" type="pieChart" maxItems="10" maxItemsSortOn="N" maxItemsSortSeq="D" sortField="TXT" sortSeq="A">
				<CATEGORY field="TXT" type="Char"/>
				<SERIE field="N" displayName="SELECT.DATA_LABEL" displayNameCalc="true"/>
			</CHART>
			<DATAGRID title="" total="true" showOthers="true" headerHeight="36" 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" headerText="SELECT.GROUPBY_LABEL" headerTextCalc="true" textAlign="left" totalFunction="text" otherFunction="text" otherComplement="*ROW">
				</COLUMN>
				<COLUMN dataField="N" width="80" visible="true" type="Number" outputFormat="= SELECT.DATA2" headerText="Total" textAlign="right" totalFunction="sum" otherFunction="sum">
				</COLUMN>
				<COLUMN dataField="N_P" type="Number" headerText="% / Total" width="40" outputFormat="0%" textAlign="right" totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
					<CALC formula="ROW.N / TOTALROW.N * 100"/>
				</COLUMN>
				<COLUMN dataField="N0" width="70" visibleCondition="VIEW.COLH0 != null" type="Number" outputFormat="#" fixed="false" headerText="&lt;&lt;" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN dataField="N1" width="70" visibleCondition="VIEW.COLH1 != null" type="Number" outputFormat="#" fixed="false" selectable="true" headerText="VIEW.COLH1" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN dataField="N2" width="70" visibleCondition="VIEW.COLH2 != null" type="Number" outputFormat="#" fixed="false" selectable="true" headerText="VIEW.COLH2" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN dataField="N3" width="70" visibleCondition="VIEW.COLH3 != null" type="Number" outputFormat="#" fixed="false" selectable="true" headerText="VIEW.COLH3" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN dataField="N4" width="70" visibleCondition="VIEW.COLH4 != null" type="Number" outputFormat="#" fixed="false" selectable="true" headerText="VIEW.COLH4" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN dataField="N5" width="70" visibleCondition="VIEW.COLH5 != null" type="Number" outputFormat="#" fixed="false" selectable="true" headerText="VIEW.COLH5" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN dataField="N6" width="70" visibleCondition="VIEW.COLH6 != null" type="Number" selectable="true" outputFormat="#" fixed="false" headerText="VIEW.COLH6" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN dataField="N7" width="70" visibleCondition="VIEW.COLH7 != null" type="Number" outputFormat="#" fixed="false" selectable="true" headerText="VIEW.COLH7" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN dataField="N8" width="70" visibleCondition="VIEW.COLH8 != null" type="Number" outputFormat="#" fixed="false" selectable="true" headerText="VIEW.COLH8" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN dataField="N9" width="70" visibleCondition="VIEW.COLH9 != null" type="Number" outputFormat="#" fixed="false" selectable="true" headerText="VIEW.COLH9" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN dataField="N10" width="70" visibleCondition="VIEW.COLH10 != null" type="Number" outputFormat="#" fixed="false" selectable="true" headerText="VIEW.COLH10" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN dataField="N11" width="70" visibleCondition="VIEW.COLH11 != null" type="Number" outputFormat="#" fixed="false" selectable="true" headerText="VIEW.COLH11" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN dataField="N12" width="70" visibleCondition="VIEW.COLH12 != null" type="Number" outputFormat="#" fixed="false" selectable="true" headerText="VIEW.COLH12" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>				
				<COLUMN dataField="N13" width="70" visibleCondition="VIEW.COLH13 != null" type="Number" outputFormat="#" fixed="false" selectable="true" headerText="VIEW.COLH13" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN dataField="N14" width="70" visibleCondition="VIEW.COLH14 != null" type="Number" outputFormat="#" fixed="false" selectable="true" headerText="VIEW.COLH14" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN dataField="N15" width="70" visibleCondition="VIEW.COLH15 != null" type="Number" outputFormat="#" fixed="false" selectable="true" headerText="VIEW.COLH15" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN dataField="N16" width="70" visibleCondition="VIEW.COLH16 != null" type="Number" outputFormat="#" fixed="false" selectable="true" headerText="VIEW.COLH16" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN dataField="N17" width="70" visibleCondition="VIEW.COLH17 != null" type="Number" outputFormat="#" fixed="false" selectable="true" headerText="VIEW.COLH17" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN dataField="N18" width="70" visibleCondition="VIEW.COLH18 != null" type="Number" outputFormat="#" fixed="false" selectable="true" headerText="VIEW.COLH18" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN dataField="N19" width="70" visibleCondition="VIEW.COLH19 != null" type="Number" selectable="true" outputFormat="#" fixed="false" headerText="VIEW.COLH19" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN dataField="N20" width="70" visibleCondition="VIEW.COLH20 != null" type="Number" outputFormat="#" fixed="false" selectable="true" headerText="VIEW.COLH20" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN dataField="N21" width="70" visibleCondition="VIEW.COLH21 != null" type="Number" outputFormat="#" fixed="false" selectable="true" headerText="VIEW.COLH21" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN dataField="N22" width="70" visibleCondition="VIEW.COLH22 != null" type="Number" outputFormat="#" fixed="false" selectable="true" headerText="VIEW.COLH22" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN dataField="N23" width="70" visibleCondition="VIEW.COLH23 != null" type="Number" outputFormat="#" fixed="false" selectable="true" headerText="VIEW.COLH23" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN dataField="N24" width="70" visibleCondition="VIEW.COLH24 != null" type="Number" outputFormat="#" fixed="false" selectable="true" headerText="VIEW.COLH24" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN dataField="N25" width="70" visibleCondition="VIEW.COLH25 != null" type="Number" outputFormat="#" fixed="false" selectable="true" headerText="VIEW.COLH25" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>				
				<COLUMN dataField="N26" width="70" visibleCondition="VIEW.COLH26 != null" type="Number" selectable="true" outputFormat="#" fixed="false" headerText="VIEW.COLH26" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN dataField="N27" width="70" visibleCondition="VIEW.COLH27 != null" type="Number" outputFormat="#" fixed="false" selectable="true" headerText="VIEW.COLH27" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN dataField="N28" width="70" visibleCondition="VIEW.COLH28 != null" type="Number" outputFormat="#" fixed="false" selectable="true" headerText="VIEW.COLH28" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN dataField="N29" width="70" visibleCondition="VIEW.COLH29 != null" type="Number" outputFormat="#" fixed="false" selectable="true" headerText="VIEW.COLH29" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN dataField="N30" width="70" visibleCondition="VIEW.COLH30 != null" type="Number" outputFormat="#" fixed="false" selectable="true" headerText="VIEW.COLH30" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN dataField="N31" width="70" visibleCondition="VIEW.COLH31 != null" type="Number" outputFormat="#" fixed="false" selectable="true" headerText="VIEW.COLH31" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
			</DATAGRID>
		</ONGLET>
	</PRESENTATION>
</VUE>
