<?xml version="1.0" encoding="ISO-8859-1"?>
<VUE name="ACTI000146" 
	label="Activité. Cumul au dernier mois" 
	database="iCTI" swf="*CTI_view1" 
	softCode="iCTI_activite" 
	globals="ACTI_globals.XML" 
	componentsFile="ACTI_components.XML" 
    helpFile="iCTI_ACTI_ACTI000123.HTML"
    helpDokuWIkiDir="activite:etat_des_dossiers_superviseur_activite" 
    helpDokuWIkiFile="acti000146" 
>
	
	<title><![CDATA[=	
		
		var group_by_label = '';
		if (SELECT.GROUPBY != '-1') {
			group_by_label = ' par ' + SELECT.GROUPBY_LABEL;
		}
		var date_label = '(' + 'N-1 : '+ VIEW.PERIODE_D_LABEL + ' à ' +  VIEW.TOPERIODE_D_LABEL + ' vs ' + ' N : '+ SELECT.PERIODE_LABEL + ' à ' + SELECT.TOPERIODE_LABEL + ')';
		
		return 'Cumul au dernier mois ' + group_by_label + ' ' + date_label;
		
	]]></title>
	
	<VIEWPROPERTIES componentName="PROPERTIES_ETATDOSSIERS"/>
	<VIEWPROPERTIES>
		<PROPERTY dataLink="VIEWPROPERTIES" nameField="name" valueField="value"/>
		<PROPERTY name="DATA1F">
			<value><![CDATA[[EVAL return ACTI_ETATDOSSIER_data('[DATA1]', 0, "v_factures_reference_1.date_fin_facture BETWEEN '[PERIODE]' AND '[TOPERIODE]'", ""); EVAL]]]></value>
		</PROPERTY>
		<PROPERTY name="DATA1D">
			<value><![CDATA[[EVAL return ACTI_ETATDOSSIER_data('[DATA1]', 0, "v_factures_reference_1.date_fin_facture BETWEEN '[VIEW.PERIODE_D]' AND '[VIEW.TOPERIODE_D]'", ""); EVAL]]]></value>
		</PROPERTY>
		<PROPERTY name="DATA2F">
			<value><![CDATA[[EVAL return ACTI_ETATDOSSIER_data('[DATA2]', 0, "v_factures_reference_1.date_fin_facture BETWEEN '[PERIODE]' AND '[TOPERIODE]'", ""); EVAL]]]></value>
		</PROPERTY>
		<PROPERTY name="DATA2D">
			<value><![CDATA[[EVAL return ACTI_ETATDOSSIER_data('[DATA2]', 0, "v_factures_reference_1.date_fin_facture BETWEEN '[VIEW.PERIODE_D]' AND '[VIEW.TOPERIODE_D]'", ""); EVAL]]]></value>
		</PROPERTY>
		<PROPERTY name="DATA3F">
			<value><![CDATA[[EVAL return ACTI_ETATDOSSIER_data('[DATA3]', 0, "v_factures_reference_1.date_fin_facture BETWEEN '[PERIODE]' AND '[TOPERIODE]'", ""); EVAL]]]></value>
		</PROPERTY>
		<PROPERTY name="DATA3D">
			<value><![CDATA[[EVAL return ACTI_ETATDOSSIER_data('[DATA3]', 0, "v_factures_reference_1.date_fin_facture BETWEEN '[VIEW.PERIODE_D]' AND '[VIEW.TOPERIODE_D]'", ""); EVAL]]]></value>
		</PROPERTY>
		<PROPERTY name="ORDERBY">
			<value><![CDATA[[EVAL 
					
					$groupbys = array(
										'[GROUPBY]', 
										'[GROUPBY_2]', 
										'[GROUPBY_3]',
										substr('[GROUBY]', 0, 6), 
										substr('[GROUBY_2]', 0, 6), 
										substr('[GROUBY_3]', 0, 6)
									);
					$exceptions = array('ANNEE', 'TRIM', 'MOIS', 'JOUR', 'NUMEROTRIM', 'NUMEROMOIS', 'NUMEROJOUR','SEMAINEANNE','JOURS','SEMAINEWE','ANNEEF', 'TRIMF', 'MOISF', 'JOURF', 'NUMEROTRIMF', 'NUMEROMOISF', 'NUMEROJOURF','SEMAINEANNEF','JOURSF','SEMAINEWEF');
					
					$result = array_intersect($groupbys, $exceptions);
					
					if (count($result) > 0) {
						return "DEFAULT";
					}
					else {
						return "4";
					}
					
			EVAL]]]></value>
		</PROPERTY>			
		<PROPERTY name="COLUMN_CONDITION_F" value="[EVAL return &quot;date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]' &quot; ;EVAL]"/>
		<PROPERTY name="COLUMN_CONDITION_D" value="[EVAL return &quot;date_sortie BETWEEN '[VIEW.PERIODE_D]' AND '[VIEW.TOPERIODE_D]' &quot; ;EVAL]"/>
		<PROPERTY name="REFPERIODEIELD_F" value="[EVAL 
					if ('[MOY]' == 'O') {return 'count(DISTINCT CASE WHEN [VIEW.COLUMN_CONDITION_F] THEN date ELSE null END)';}
					return '[VIEW.DUREE_PERIODE]';
				EVAL]"/>
		<PROPERTY name="REFPERIODEIELD_D" value="[EVAL 
					if ('[MOY]' == 'O') {return 'count(DISTINCT CASE WHEN [VIEW.COLUMN_CONDITION_D] THEN date ELSE null END)';}
					return '[VIEW.DUREE_PERIODE_D]';
				EVAL]"/>

	</VIEWPROPERTIES>
	<SELECTIONS label="Paramètres de l'analyse">
		<GROUP>
			<FIELD name="ALIAS_PERIODE" label="" UI="combo" width="220" default="CUM_LAST_MONTH" tree="true" globalListProvider="ALIAS_PERIODE" />
            <FIELD name="PERIODE" label="Période de sortie" UI="combo" tree="true" width="150" default="2012-01-01" globalListProvider="DATE_DEBUT" >
			</FIELD>
			<FIELD name="TOPERIODE" label="à" UI="combo" tree="true" width="150" default="2012-01-31" globalListProvider="DATE_FIN" >
			</FIELD>
		</GROUP>
		<GROUP label="Comparer avec">
			<FIELD name="TYPE_COMPARAISON" label="" UI="combo" default="2" width="150" visible="false">
				<OPTION label="Année précédente" data="2" />
				<OPTION label="Saisie période" data="S" />
			</FIELD>
			<FIELD name="PERIODE_D" label="De" UI="combo" tree="true" width="150" default="2011-01-01" globalListProvider="DATE_DEBUT" visible="= SELECT.TYPE_COMPARAISON == 'S'">
			</FIELD>
			<FIELD name="TOPERIODE_D" label="à" UI="combo" tree="true" width="150" default="2011-01-31" globalListProvider="DATE_FIN" visible="= SELECT.TYPE_COMPARAISON == 'S'">
			</FIELD>
		</GROUP>
		<GROUP>
			<FIELD name="GROUPBY" label="Regroupement" UI="combo" default="NUMEROMOIS" width="200" tree="true">
					<OPTION label="Trimestre de sortie" data="NUMEROTRIM" treeLevel="1" />
					<OPTION label="Mois de sortie" data="NUMEROMOIS" treeLevel="1" />
					<OPTION label="Semaine annuelle de sortie" data="SEMAINEANNE" treeLevel="1" />
					<OPTION label="Jour de sortie" data="JOURS" treeLevel="1" />
			</FIELD>			
			<FIELD name="GROUPBY_2" label="Regroupement" UI="combo"  visible="false" default="NUMEROMOIS" width="200" tree="true">
					<OPTION label="Trimestre de sortie" data="NUMEROTRIM" treeLevel="1" />
					<OPTION label="Mois de sortie" data="NUMEROMOIS" treeLevel="1" />
					<OPTION label="Semaine annuelle de sortie" data="SEMAINEANNE" treeLevel="1" />
					<OPTION label="Jour de sortie" data="JOURS" treeLevel="1" />
			</FIELD>
		</GROUP>		
		<GROUP>
			<FIELD name="LGROUPBY" label="Regroupement" UI="combo" default="SER" width="200" tree="true" visible="false">
			</FIELD>			
			<FIELD name="LGROUPBY_2" label="Regroupement" UI="combo" default="SER" width="200" tree="true" visible="false">
			</FIELD>			
			<FIELD name="LGROUPBY_3" label="Regroupement" UI="combo" default="SER" width="200" tree="true" visible="false">
			</FIELD>			
		</GROUP>
		<GROUP>
			<FIELD name="DATA1" label="Données" UI="combo" tree="true" width="260" default="NSEJ" default2="0">
				<OPTION label="Options" data="" globalListProvider="ETATDOSSIERS_DATA" />
			</FIELD>
			<FIELD name="DATA2" label="Données" UI="combo" tree="true" width="260" default="DELGRP" default2="0">
				<OPTION label="" data="-1"/>
				<OPTION label="" data="" globalListProvider="ETATDOSSIERS_DATA" />
			</FIELD>
		</GROUP>
	</SELECTIONS>
	<SELECTIONS componentName="FILTRES_ETAT_SEJOURS_SOUSSELECTIONS"/>
	<SELECTIONS componentName="FILTRES_ETATDOSSIERS_SELECTIONS"/>
	<SELECTIONS componentName="FILTRES_SEJOURS_SELECTIONS"/>
	<SELECTIONS componentName="FILTRES_PASSAGES_SELECTIONS" />
	<QUERIES>
		<QUERY label="">
			
			<SQL optimizer="V_SEJOURS_X">
				<select><![CDATA[		

					CTISELECT_TREE
						OPTIONS{NOTZERO=1}
						LEVEL0_PROPERTIES{VIEWNAME=[VIEW.LEVEL0_VIEW]}
						LEVEL1_PROPERTIES{VIEWNAME=[VIEW.LEVEL1_VIEW]}
						LEVEL2_PROPERTIES{VIEWNAME=[VIEW.LEVEL2_VIEW]}
						LEVEL3_PROPERTIES{VIEWNAME=[VIEW.LEVEL3_VIEW]}
						GROUPBY1{[VIEW.GROUPBY_OID_FIELD],, [VIEW.GROUPBY_COD_FIELD],, [VIEW.GROUPBY_TXT_FIELD]}
						SIGNIFDATA{[VIEW.ACTIVITE_SIGNIFICATIVE_DATA],, [ACTIVITE_SIGNIFICATIVE_MODE],, [ACTIVITE_SIGNIFICATIVE_NUMBER]}

						INDICATORS{
							[VIEW.DATA1F],,
							[VIEW.DATA1D],,
							0,,
							0,,
							[VIEW.DATA2F],,
							[VIEW.DATA2D],,
							0,,
							0,,
						}	
						ORDERBY{[VIEW.ORDERBY],, DESC}
					FROM activite.[LEVELPROPERTY.VIEWNAME] v_factures_reference_1
						JOIN #V_SEJOURS_X#  ON (v_factures_reference_1.no_sejour = v_sejours_1.no_sejour)
					WHERE 
						([VIEW.DATE_GBY] BETWEEN '[PERIODE]' AND '[TOPERIODE]' OR
						[VIEW.DATE_GBY] BETWEEN '[VIEW.PERIODE_D]' AND '[VIEW.TOPERIODE_D]')
						[VIEW.ETATDOSSIERS_SELECT] 
						[VIEW.SEJOURS_SELECT]
						[VIEW.PASSAGES_SELECT]						
					
					AFTER{
						UPDATE w_table 
						SET 
							indicateurs[3] = COALESCE(indicateurs[1],0) - COALESCE(indicateurs[2],0),
							indicateurs[4] = base.cti_division(COALESCE(indicateurs[1],0) - indicateurs[2],indicateurs[2]/100.00),
							indicateurs[7] = COALESCE(indicateurs[5],0) - COALESCE(indicateurs[6],0),
							indicateurs[8] = base.cti_division(COALESCE(indicateurs[5],0) - indicateurs[6],indicateurs[6]/100.00),
							indicateurs[11] = COALESCE(indicateurs[9],0) - COALESCE(indicateurs[10],0),
							indicateurs[12] = base.cti_division(COALESCE(indicateurs[9],0) - indicateurs[10],indicateurs[10]/100.00)

					}
					;
					

					DROP TABLE IF EXISTS w_table_1;
					CREATE TEMP TABLE w_table_1 AS

					SELECT oidt
							,labelt
							,textet
							,oid1
							,code1
							,oid2
							,code2
							,oid3
							,code3
							,oid
							,code
							,texte
							,LEVEL
							,sort
							,( SELECT SUM(CASE 
											WHEN '[GROUPBY]' = 'JOURS'
												THEN (
														1 - (
															SELECT is_weekend
															FROM base.p_calendrier
															WHERE DATE = (substring('[PERIODE]' FROM 1 FOR 4) || '-' || case when code = '02-29'  and ((substring('[PERIODE]' FROM 1 FOR 4)::integer % 4 <> 0)) then (substring(code FROM 1 FOR 2)) || case when  substring(code FROM 4 FOR 5) = '29' then '-28' ELSE substring(code FROM 4 FOR 5) END  ELSE code END)::DATE
															)::INTEGER
													  )
											WHEN '[GROUPBY]' = 'NUMEROMOIS'
													THEN (
															SELECT sum(1 - is_weekend::INTEGER)
															FROM base.p_calendrier
															WHERE DATE BETWEEN (substring('[TOPERIODE]' FROM 1 FOR 4) || '-' || code || '-01')::DATE
																AND (substring('[TOPERIODE]' FROM 1 FOR 4) || '-' || code || '-01')::DATE + interval '1 Month - 1 day'
															)
												ELSE 0
												END)
								FROM w_table AS b
								WHERE b.oid <= w_table.oid
									AND b.LEVEL <> 9
								) AS j_o_p

								,(	SELECT SUM(CASE 
												WHEN '[GROUPBY]' = 'JOURS'
													THEN (
															1 - (
																SELECT is_weekend
																FROM base.p_calendrier
																	WHERE DATE = (substring('[VIEW.PERIODE_D]' FROM 1 FOR 4) || '-' || case when code = '02-29'  and ((substring('[VIEW.PERIODE_D]' FROM 1 FOR 4)::integer % 4 <> 0)) then (substring(code FROM 1 FOR 2)) || case when  substring(code FROM 4 FOR 5) = '29' then '-28' ELSE substring(code FROM 4 FOR 5) END  ELSE code END)::DATE
																)::INTEGER
															)										

															
													WHEN '[GROUPBY]' = 'NUMEROMOIS'
													THEN (
															SELECT sum(1 - is_weekend::INTEGER)
															FROM base.p_calendrier
															WHERE DATE BETWEEN (substring('[VIEW.PERIODE_D]' FROM 1 FOR 4) || '-' || code || '-01')::DATE
																AND (substring('[VIEW.PERIODE_D]' FROM 1 FOR 4) || '-' || code || '-01')::DATE + interval '1 Month - 1 day'
															)
												ELSE 0
												END)
									FROM w_table AS b
									WHERE b.oid <= w_table.oid
										AND b.LEVEL <> 9
								) AS j_o_p_d
							,(select sum(indicateurs[1]) from w_table as b where b.oid <= w_table.oid and b.level <> 9) as  cumul_1
							,(select sum(indicateurs[2]) from w_table as b where b.oid <= w_table.oid and b.level <> 9) as cumul_12						
							,(select sum(indicateurs[5]) from w_table as b where b.oid <= w_table.oid and b.level <> 9) as cumul_2
							,(select sum(indicateurs[6]) from w_table as b where b.oid <= w_table.oid and b.level <> 9) as cumul_21
							,indicateurs [1] as indi_1
							,indicateurs [2] as indi_2
							,indicateurs [3] as indi_3
							,indicateurs [4] as indi_4
							,indicateurs [5] as indi_5
							,indicateurs [6] as indi_6
							,indicateurs [7] as indi_7
							,indicateurs [8] as indi_8
							,indicateurs [9] as indi_9
							,indicateurs [10] as indi_10
							,indicateurs [11] as indi_11
							,indicateurs [12] as indi_12
							,indicateurs [13] as indi_13
							,indicateurs_text [1]
						FROM w_table
						WHERE indicateurs [1] <> 0
							OR indicateurs [2] <> 0
							OR indicateurs [3] <> 0
							OR indicateurs [4] <> 0
							OR indicateurs [5] <> 0
							OR indicateurs [6] <> 0
							OR indicateurs [7] <> 0
							OR indicateurs [8] <> 0
							OR indicateurs [9] <> 0
							OR indicateurs [10] <> 0
							OR indicateurs [11] <> 0
							OR indicateurs [12] <> 0
							OR indicateurs [13] <> 0
						ORDER BY sort
							,0::NUMERIC DESC
							,labelt
							,oidt
							,code1
							,oid1
							,code2
							,oid2
							,code3
							,oid3;


						update w_table_1 set j_o_p = (select  max(j_o_p) from w_table_1) where level = 9 ;
						update w_table_1 set j_o_p_d = (select  max(j_o_p_d) from w_table_1) where level = 9 ;
						update w_table_1 set cumul_1 = (select  max(cumul_1) from w_table_1) where level = 9 ;
						update w_table_1 set cumul_12 = (select  max(cumul_12) from w_table_1) where level = 9 ;
						update w_table_1 set cumul_2 = (select  max(cumul_2) from w_table_1) where level = 9 ;
						update w_table_1 set cumul_21 = (select  max(cumul_21) from w_table_1) where level = 9 ;
						select * from w_table_1

				]]></select>
				<FIELDS>
					<INSERT name="CTISELECT_TREE_FIELDS"/>
					<FIELD name="SORT" />
					<FIELD name="F111"/>
					<FIELD name="F112"/>
					<FIELD name="F11"/>
					<FIELD name="D11"/>
					<FIELD name="F22"/>
					<FIELD name="D22"/>
					<FIELD name="F1"/>
					<FIELD name="D1"/>
					<FIELD name="E1"/>
					<FIELD name="P1"/>
					<FIELD name="F2"/>
					<FIELD name="D2"/>
					<FIELD name="E2"/>
					<FIELD name="P2"/>
					<FIELD name="F3"/>
					<FIELD name="D3"/>
					<FIELD name="E3"/>
					<FIELD name="P3"/>
				</FIELDS>
			</SQL>
		</QUERY>
		<QUERY type="propertiesLink" name="VIEWPROPERTIES" forSelections="false">
			<SQL>
				<select><![CDATA[	
					SELECT 'PERIODE_D' , CASE WHEN '[TYPE_COMPARAISON]' = '2' THEN date('[PERIODE]'::date - interval '1 year') ELSE '[PERIODE_D]' END::text
					UNION
					SELECT 'TOPERIODE_D' , CASE WHEN '[TYPE_COMPARAISON]' = '2' THEN date('[TOPERIODE]'::date - interval '1 year') ELSE '[TOPERIODE_D]' END::text
					UNION
					SELECT 'PERIODE_D_LABEL', CASE WHEN  CASE WHEN '[TYPE_COMPARAISON]' = '2' THEN date('[PERIODE]'::date - interval '1 year') ELSE '[PERIODE_D]' END = p_calendrier_mois.date_debut THEN p_calendrier_mois.texte ELSE p_calendrier.texte_court END
					FROM base.p_calendrier
						JOIN base.p_calendrier_mois ON p_calendrier.mois = p_calendrier_mois.mois
					WHERE date = CASE WHEN '[TYPE_COMPARAISON]' = '2' THEN date('[PERIODE]'::date - interval '1 year') ELSE '[PERIODE_D]' END
					UNION
					SELECT 'TOPERIODE_D_LABEL', CASE WHEN  CASE WHEN '[TYPE_COMPARAISON]' = '2' THEN date('[TOPERIODE]'::date - interval '1 year') ELSE '[TOPERIODE_D]' END = p_calendrier_mois.date_fin THEN p_calendrier_mois.texte ELSE p_calendrier.texte_court END
					FROM base.p_calendrier
						JOIN base.p_calendrier_mois ON p_calendrier.mois = p_calendrier_mois.mois
					WHERE date = CASE WHEN '[TYPE_COMPARAISON]' = '2' THEN date('[TOPERIODE]'::date - interval '1 year') ELSE '[TOPERIODE_D]' END
				]]></select>
				<FIELDS>
					<FIELD name="name" />
					<FIELD name="value" />
				</FIELDS>
			</SQL>
			<SQL select="SELECT 'DUREE_PERIODE_D', count(*) FROM base.p_calendrier 							
							WHERE date &gt;= '[VIEW.PERIODE_D]'	AND date &lt;= '[VIEW.TOPERIODE_D]'
								AND date &gt;= (SELECT MIN(date) FROM activite.p_mouvements_sejour WHERE est_mouvement_previsionnel &lt;&gt; '1') 
								AND date &lt;= (SELECT MAX(date) FROM activite.p_mouvements_sejour WHERE est_mouvement_previsionnel &lt;&gt; '1')
								">
				<FIELDS>
					<FIELD name="name"/>
					<FIELD name="value"/>
				</FIELDS>
			</SQL>
			<SQL select="SELECT 'DUREE_PERIODE', count(*) FROM base.p_calendrier 							
							WHERE date &gt;= '[PERIODE]'	AND date &lt;= '[TOPERIODE]'
								AND date &gt;= (SELECT MIN(date) FROM activite.p_mouvements_sejour WHERE est_mouvement_previsionnel &lt;&gt; '1') 
								AND date &lt;= (SELECT MAX(date) FROM activite.p_mouvements_sejour WHERE est_mouvement_previsionnel &lt;&gt; '1')">
				<FIELDS>
					<FIELD name="name"/>
					<FIELD name="value"/>
				</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" data="1" shortLabel="dernier mois"  view="ACTI000060.XML" enabled="true"  >
					<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,8)+'01';" />
					<ARG name="TOPERIODE" value=" return SELECT.TOPERIODE;" />
					<ARG name="GROUPBY" value="return 'JOURS'" />
					<ARG name="GROUPBY_2" value="return '-1'" />
					<ARG name="GROUPBY_3" value="return '-1'" />
					<ARG name="LGROUPBY" value="return SELECT.GROUPBY;" />
					<ARG name="DATA1" value="'NSEJ'" />
					<ARG name="DATA2" value="'MVFAC'" />
					<ARG name="DATA3" value="'DELFAC'" />
					<ARG name="TYPE_COMPARAISON" value="'2'" />
				</VIEWITEM>	
				<VIEWITEM label="&#8721; dernier mois" data="2" shortLabel="&#8721; dernier  mois"  view="ACTI000146.XML" enabled="true" rowContext="false" 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,8) + '01';" />
					<ARG name="TOPERIODE" value=" return SELECT.TOPERIODE" />
					<ARG name="GROUPBY" value="return 'JOURS'" />
					<ARG name="GROUPBY_2" value="return '-1'" />
					<ARG name="GROUPBY_3" value="return '-1'" />
					<ARG name="DATA1" value="'NSEJ'" />
					<ARG name="DATA2" value="'MVFAC'" />
					<ARG name="DATA3" value="'DELFAC'" />
					 <ARG name="LGROUPBY" value="return SELECT.GROUPBY" /> 
					<ARG name="TYPE_COMPARAISON" value="'2'"/>
				</VIEWITEM>
				<VIEWITEM  label="Dernière année" data="2" shortLabel="derniere  année"  view="ACTI000060.XML" enabled="true" rowContext="false" 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="return 'NUMEROMOIS'" />
					<ARG name="GROUPBY_2" value="return '-1'" />
					<ARG name="GROUPBY_3" value="return '-1'" />
					<ARG name="DATA1" value="'NSEJ'" />
					<ARG name="DATA2" value="'MVFAC'" />
					<ARG name="TYPE_COMPARAISON" value="'2'" />
				</VIEWITEM>	
				<VIEWITEM label="&#8721; dernière Année" shortLabel="&#8721; derniere année"  view="ACTI000146.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="return 'NUMEROMOIS'" />
					<ARG name="GROUPBY_2" value="return '-1'" />
					<ARG name="GROUPBY_3" value="return '-1'" />
					<ARG name="DATA1" value="'NSEJ'" />
					<ARG name="DATA2" value="'MVFAC'" />
					<ARG name="TYPE_COMPARAISON" value="'2'" />
				</VIEWITEM>	
			</VIEWLINK>
			<VIEWLINK label="Comparatif" shortLabel="Comparatif"  view="ACTI000060.XML" rowContext="false" enabled="true" buttonType="COMPARATIF" >
                    <ARG name="PERIODE" value="return SELECT.TOPERIODE.substr(0,4)+'-01-01';"/>
					<ARG name="PERIODE_D" value="return VIEW.COMP_PERIODE_D;" />
					<ARG name="TOPERIODE_D" value="return VIEW.COMP_TOPERIODE_D;" />
					<ARG name="GROUPBY" value="return SELECT.LGROUPBY;" />
					<ARG name="GROUPBY_2" value="return SELECT.LGROUPBY_2;" />
					<ARG name="GROUPBY_3" value="return SELECT.LGROUPBY_3;" />
					<ARG name="DATA1" value="'NSEJ'" />
					<ARG name="DATA2" value="'MVFAC'" />
					<ARG name="DATA3" value="'DELFAC'" />
					<ARG name="TYPE_COMPARAISON" value="'2'" />
			</VIEWLINK>
			<VIEWLINK label="Comparatif mensuel" shortLabel="Comp. Mensuel"  view="ACTI000161.XML" rowContext="false" enabled="true" buttonType="COMPARATIF" >
					<ARG name="PERIODE" value="return VIEW.COMP_PERIODE;" />
					<ARG name="PERIODE_D" value="return VIEW.COMP_PERIODE_D;" />
					<ARG name="TOPERIODE_D" value="return VIEW.COMP_TOPERIODE_D;" />
					<ARG name="GROUPBY" value="if (SELECT.GROUPBY == 'JOUR' ) {return 'JOURS'}
											   if (SELECT.GROUPBY == 'JOURF' ) {return 'JOURSF'}
											   if (SELECT.GROUPBY == 'MOIS' ) {return 'NUMEROMOIS'}
											   if (SELECT.GROUPBY == 'MOISF' ) {return 'NUMEROMOISF'}
											   else{return SELECT.LGROUPBY;}
					" />
					<ARG name="GROUPBY_2" value="return SELECT.LGROUPBY_2;" />
					<ARG name="GROUPBY_3" value="return SELECT.LGROUPBY_3;" />
					<ARG name="DATA1" value="'NSEJ'" />
					<ARG name="DATA2" value="'MFAC'" />
					<ARG name="DATA3" value="'MVFAC'" />
					<ARG name="TYPE_COMPARAISON" value="'2'" />
			</VIEWLINK>			
			<VIEWLINK label="Effets" shortLabel="Effets"  view="ACTI000140.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="GROUPBY_2" value="return SELECT.LGROUPBY_2;" />
					<ARG name="GROUPBY_3" value="return SELECT.LGROUPBY_3;" />
					<ARG name="DATA01" value="'1.1'" />
                    <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="ACTI000162.XML" rowContext="false" enabled="true" buttonType="VIEWLINK_EVO_COMP">
					<ARG name="QUELLEDATE" value="return SELECT.QUELLEDATE;" /> 
					<ARG name="PERIODE" value="return SELECT.TOPERIODE.substr(0,4)+'-01-01';" />
					<ARG name="GROUPBY" value="return SELECT.LGROUPBY;" />
					<ARG name="GROUPBY_2" value="return 'NUMEROMOIS';" />
					<ARG name="DATA1" value="'NSEJ'" />
					<ARG name="DATA2" value="'MFAC'" />
					<ARG name="DATA3" value="'DELGRP'" />					
					<ARG name="DATA4" value="'DELFAC'" />
					<ARG name="DATA5" value="'MVFAC'" />					
					<ARG name="DATA6" value="'0'" />
					<ARG name="DATA7" value="'0'" />
					<ARG name="DATA8" value="'0'" />					
					<ARG name="DATA9" value="'0'" />
					<ARG name="DATA10" value="'0'" />					
					<ARG name="DATA011" value="'0'" />
					<ARG name="DATA012" value="'0'" />
					<ARG name="DATA013" value="'0'" />					
					<ARG name="DATA014" value="'0'" />
					<ARG name="DATA1015" value="'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="ACTI000162.XML" rowContext="false" enabled="true" buttonType="COMPARATIF">
					<ARG name="QUELLEDATE" value="return SELECT.QUELLEDATE;" /> 
					<ARG name="PERIODE" value="return SELECT.TOPERIODE.substr(0,4)+'-01-01';" />
					<ARG name="GROUPBY" value="return SELECT.LGROUPBY;" />
					<ARG name="GROUPBY_2" value="return 'NUMEROMOIS';" />
					<ARG name="DATA1" value="'NSEJ'" />
					<ARG name="DATA2" value="'MFAC'" />
					<ARG name="DATA3" value="'DELGRP'" />					
					<ARG name="DATA4" value="'DELFAC'" />
					<ARG name="DATA5" value="'MVFAC'" />						
					<ARG name="DATA6" value="'CAMFV'" />
					<ARG name="DATA7" value="'MNFAC'" />
					<ARG name="DATA8" value="'NSEJHC'" />					
					<ARG name="DATA9" value="'MVFHC'" />
					<ARG name="DATA10" value="'CAMFVHC'" />					
					<ARG name="DATA011" value="'NSEJHJ'" />
					<ARG name="DATA012" value="'MVFHJ'" />
					<ARG name="DATA013" value="'CAMFVHJ'" />					
					<ARG name="DATA014" value="'NBNSOL'" />
					<ARG name="DATA1015" value="'MTNSOL'" />
					<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="ACTI000059.XML" rowContext="false" enabled="true" buttonType="EVOLUTION" componentName="PERIODICITE_VIEWLINK" >
				<ARG name="PERIODE" value="return SELECT.TOPERIODE.substr(0,4)+'-01-01'" />	
				<ARG name="GROUPBY" value="return SELECT.LGROUPBY;" />
				<ARG name="GROUPBY_2" value="return SELECT.LGROUPBY_2;" />
				<ARG name="GROUPBY_3" value="return SELECT.LGROUPBY_3;" />
				<ARG name="DATA" value="return SELECT.DATA1"/>
				<ARG name="PERIODICITE" value="return 'MONTH';"/>
			</VIEWLINK>
			<VIEWLINK label="Analyse croisée" shortLabel="Analyse croisée" view="ACTI000137.XML" enabled="true" rowContext="false" buttonType="ANALYSE_CROISEE" >
				<ARG name="ALIAS_PERIODE" value="return '-1'" />
				<ARG name="PERIODE" value="return VIEW.X_PERIODE;" />
				<ARG name="DATA" value="'MVFAC'" />
				<ARG name="COLUMNBY" value="'NUMEROMOIS'" />
				<ARG name="GROUPBY" value="'ANNEE'" />
				<ARG name="GROUPBY_2" value="return SELECT.LGROUPBY;" />
				<ARG name="GROUPBY_TAB" value="'TAB'" />
				<ARG name="COLUMNBYCOUNT" value="'12'" />
			</VIEWLINK>	
			<VIEWLINK label="Analyse" shortLabel="Analyse" view="ACTI000057.XML" enabled="true" rowContext="false"  buttonType="ANALYSE" >
				<ARG name="ALIAS_PERIODE" value="return '-1'" />
				<ARG name="PERIODE" value="return SELECT.TOPERIODE.substr(0,4)+'-01-01'" />			
				<ARG name="GROUPBY" value="return SELECT.LGROUPBY;"/>
				<ARG name="GROUPBY_2" value="return SELECT.LGROUPBY_2;"/>
				<ARG name="GROUPBY_3" value="return SELECT.LGROUPBY_3;"/>
			</VIEWLINK>	
			<VIEWLINK label="Liste des séjours" shortLabel="Séjours" view="ACTI000058.XML" componentName="ETA_DOS_BASE_VIEWLINK" component2Name="STANDARD_BASE_VIEWLINK">
			</VIEWLINK>
		</VIEWLINKS>
		<ONGLET excelLabel="Comparatif" label="Comparatif" multiTab="true" >
			<CHART title="Evolution journaliere" type="lineChart" maxItems="30" maxItemsSortOn="D1" maxItemsSortSeq="D" sortField="" sortSeq="D1" visibleCondition="(SELECT.GROUPBY == 'JOURS') || (SELECT.GROUPBY == 'JOURSF') || (SELECT.GROUPBY == 'JOURSEX')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
				<SERIE field="D11" displayName="SELECT.DATA13 + ' ' + VIEW.PERIODE_D_LABEL + '-' + VIEW.TOPERIODE_D_LABEL" displayNameCalc="true" />
				<SERIE field="F11" displayName="SELECT.DATA13 + ' ' + SELECT.PERIODE_LABEL + '-' + SELECT.TOPERIODE_LABEL" displayNameCalc="true" />
			</CHART>
			<CHART title="Comparatif (12)" type="lineChart" maxItems="12" maxItemsSortOn="D1" maxItemsSortSeq="D" sortField="" sortSeq="D1" visibleCondition="(SELECT.GROUPBY == 'NUMEROMOIS')||(SELECT.GROUPBY == 'NUMEROMOISF') ||(SELECT.GROUPBY == 'NUMEROMOISEX')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
				<SERIE field="D1" displayName="SELECT.DATA13 + ' ' + VIEW.PERIODE_D_LABEL + '-' + VIEW.TOPERIODE_D_LABEL" displayNameCalc="true" />
				<SERIE field="F1" displayName="SELECT.DATA13 + ' ' + SELECT.PERIODE_LABEL + '-' + SELECT.TOPERIODE_LABEL" displayNameCalc="true" />
			</CHART>
			<CHART title="Comparatif " type="lineChart" maxItems="52" maxItemsSortOn="D1" maxItemsSortSeq="D" sortField="" sortSeq="D1" visibleCondition="(SELECT.GROUPBY == 'SEMAINEANNE') || (SELECT.GROUPBY == 'SEMAINEANNEF') || (SELECT.GROUPBY == 'SEMAINEANNEEX')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
				<SERIE field="D1" displayName="SELECT.DATA13 + ' ' + VIEW.PERIODE_D_LABEL + '-' + VIEW.TOPERIODE_D_LABEL" displayNameCalc="true" />
				<SERIE field="F1" displayName="SELECT.DATA13 + ' ' + SELECT.PERIODE_LABEL + '-' + SELECT.TOPERIODE_LABEL" displayNameCalc="true" />
			</CHART>
			<CHART title="Comparatif pour les 12 premiers" type="columnChart" maxItems="12" maxItemsSortOn="D1" maxItemsSortSeq="D" sortField="" sortSeq="D" condition="ROW.LVL == '1'"
				 visibleCondition="SELECT.GROUPBY != 'ANNEE' &amp;&amp; SELECT.GROUPBY != 'TRIM' &amp;&amp; SELECT.GROUPBY != 'MOIS' &amp;&amp; SELECT.GROUPBY != 'JOURS'">
				<CATEGORY field="TXT" type="Char" />
				<SERIE field="D1" displayName="SELECT.DATA13 + ' ' + VIEW.PERIODE_D_LABEL + '-' + VIEW.TOPERIODE_D_LABEL" displayNameCalc="true" />
				<SERIE field="F1" displayName="SELECT.DATA13 + ' ' + SELECT.PERIODE_LABEL + '-' + SELECT.TOPERIODE_LABEL" displayNameCalc="true" />
			</CHART>
			<CHART title=" Comparatif pour les 10 premiers" type="columnChart" maxItems="10" maxItemsSortOn="D2" maxItemsSortSeq="D" sortField="DSO" sortSeq="D" condition="ROW.LVL == '1'"
				 visibleCondition="SELECT.GROUPBY != 'ANNEE' &amp;&amp; SELECT.GROUPBY != 'TRIM' &amp;&amp; SELECT.GROUPBY != 'MOIS' &amp;&amp; SELECT.GROUPBY != 'JOUR'">
				<CATEGORY field="TXT" type="Char" />
				<SERIE field="D2" displayName="SELECT.DATA23 + ' ' + VIEW.PERIODE_D_LABEL + '-' + VIEW.TOPERIODE_D_LABEL" displayNameCalc="true" />
				<SERIE field="F2" displayName="SELECT.DATA23 + ' ' + SELECT.PERIODE_LABEL + '-' + SELECT.TOPERIODE_LABEL" displayNameCalc="true" />
			</CHART>
			<DATAGRID title="" total="true" showOthers="false" headerHeight="70" 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="70" type="Char" visible="true" headerText="Code" textAlign="left" otherFunction="text" totalFunction="text" totalComplement="TOTAL">
				</COLUMN>
				<COLUMN dataField="TXT" type="Char" minWidth="150" headerText="SELECT.GROUPBY_LABEL" headerTextCalc="true" textAlign="left" totalFunction="text" otherFunction="text" otherComplement="Autres">
				</COLUMN>
				<COLUMN dataField="F112" width="35" visible="true" type="Number" outputFormat="#"   headerText="'Jour'+'\n'+ '&lt;font color=\'#DB1702\'&gt;N-1&lt;/font&gt;' "  headerTextCalc="true" textAlign="center" totalFunction="sum" otherFunction="sum"  visibleCondition="(SELECT.GROUPBY != 'SEMAINEANNE') &amp;&amp; (SELECT.GROUPBY != 'NUMEROTRIM')" description= "Jours ouvrés. +1 si jour ouvré , +0  si jour weekend. Période N-1">
				</COLUMN>
				<COLUMN dataField="F111" width="35" visible="true" type="Number" outputFormat="#"   headerText=" 'Jour'+'\n'+ '&lt;font color=\'#DB1702\'&gt;N&lt;/font&gt;' " headerTextCalc="true" textAlign="center" totalFunction="sum" otherFunction="sum" visibleCondition="(SELECT.GROUPBY != 'SEMAINEANNE') &amp;&amp; (SELECT.GROUPBY != 'NUMEROTRIM')"  description= "Jours ouvrés. +1 si jour ouvré , +0  si jour weekend. Période N">
				</COLUMN>
				<COLUMN dataField="D1" width="85" visible="true" type="Number" outputFormat="= SELECT.DATA12" fixed="false" selectable="true" headerText="SELECT.DATA13 +'\n'+ '&lt;font color=\'#DB1702\'&gt;N-1&lt;/font&gt;' " headerTextCalc="true" textAlign="center" totalFunction="sum" otherFunction="sum" >
				</COLUMN>
				<COLUMN dataField="F1" width="85" visible="true" type="Number" outputFormat="= SELECT.DATA12" fixed="false"  headerText="SELECT.DATA13 +'\n'+ '&lt;font color=\'#DB1702\'&gt;N&lt;/font&gt;'" headerTextCalc="true" textAlign="center" totalFunction="sum" otherFunction="sum" >
				</COLUMN>
				<COLUMN dataField="E1"  type="Number" headerText="Ecart" width="70" visible="true" outputFormat="= SELECT.DATA12" fixed="false" textAlign="center" totalFunction="sum" totalComplement="" otherFunction="sum">
					<CELLSTYLE name="cellIndicator" value="triangle_down, 10, left middle, 0xD63E00" condition="(SELECT.DATA1.substr(0,3) == 'DEL' &amp;&amp; (ROW.D1 &lt; ROW.F1)) || (ROW.F1 &lt; ROW.D1)" />
					<CELLSTYLE name="cellIndicator" value="triangle_up, 10, left middle, 0x75a0eb" condition="(SELECT.DATA1.substr(0,3) == 'DEL' &amp;&amp; (ROW.F1 &lt; ROW.D1)) || (ROW.D1 &lt; ROW.F1)" />
					<CELLSTYLE name="cellIndicator" value="rectangle, 10, left middle, 0xFFA500" condition="ROW.D1 == ROW.F1" />
				</COLUMN>
				<COLUMN dataField="P1" type="Number" headerText="% évol." width="45" visible="true" outputFormat="= if (ROW.D1 != 0 &amp;&amp; ROW.F1 != 0) {return '0%'} else {return '#'}" fixed="false" textAlign="center" totalFunction="sum" totalComplement="" otherFunction="sum">
				</COLUMN>				
				<COLUMN dataField="D11" width="85" visible="true" type="Number" outputFormat="= SELECT.DATA12" fixed="false"  headerText=" SELECT.DATA13 + String.fromCharCode(13) + 'cumul \n'+'&lt;font color=\'#DB1702\'&gt;N-1&lt;/font&gt;' " headerTextCalc="true" textAlign="center" totalFunction="sum" otherFunction="sum">
				</COLUMN>
				<COLUMN dataField="F11" width="85" visible="true" type="Number" outputFormat="= SELECT.DATA12" fixed="false"  headerText=" SELECT.DATA13 + String.fromCharCode(13) +'cumul \n'+ '&lt;font color=\'#DB1702\'&gt;N&lt;/font&gt;' " headerTextCalc="true" textAlign="center" totalFunction="sum" otherFunction="sum">
				</COLUMN>
				<COLUMN dataField="E11" type="Number" headerText="Ecart" width="70" visible="true" outputFormat="= SELECT.DATA12" fixed="false" textAlign="center" totalFunction="" totalComplement="" otherFunction="" calc="true">
					<CALC formula="ROW.F11 - ROW.D11"/>
					<CELLSTYLE name="cellIndicator" value="triangle_down, 10, left middle, 0xD63E00" condition="(SELECT.DATA1.substr(0,3) == 'DEL' &amp;&amp; (ROW.D11 &lt; ROW.F11)) || (ROW.F11 &lt; ROW.D11)" />
					<CELLSTYLE name="cellIndicator" value="triangle_up, 10, left middle, 0x75a0eb" condition="(SELECT.DATA1.substr(0,3) == 'DEL' &amp;&amp; (ROW.F11 &lt; ROW.D11)) || (ROW.D11 &lt; ROW.F11)" />
					<CELLSTYLE name="cellIndicator" value="rectangle, 10, left middle, 0xFFA500" condition="ROW.D11 == ROW.F11" />
				</COLUMN>
				<COLUMN dataField="P11" type="Number" headerText="% évol." width="45" visible="true" outputFormat="= if (ROW.D1 != 0 &amp;&amp; ROW.F1 != 0) {return '0%'} else {return '#'}" fixed="false" textAlign="center" totalFunction="" totalComplement="" otherFunction="" calc="true">
				<CALC formula="(ROW.E11 / ROW.D11)*100"/>
				</COLUMN>
				
				<COLUMN dataField="D2" width="85" visibleCondition="SELECT.DATA2 != '-1'" type="Number" outputFormat="= SELECT.DATA22" fixed="false" selectable="true" headerText="SELECT.DATA23 + '\n'+'&lt;font color=\'#DB1702\'&gt;N-1&lt;/font&gt;' " headerTextCalc="true" textAlign="center" totalFunction="sum" otherFunction="sum">
				</COLUMN>
				<COLUMN dataField="F2" width="85" visibleCondition="SELECT.DATA2 != '-1'" type="Number" outputFormat="= SELECT.DATA22" fixed="false" selectable="true" headerText="SELECT.DATA23 + '\n' +'&lt;font color=\'#DB1702\'&gt;N&lt;/font&gt;' " headerTextCalc="true" textAlign="center" totalFunction="sum" otherFunction="sum">
				</COLUMN>
				<COLUMN dataField="E2" type="Number" headerText="Ecart" width="70" visibleCondition="SELECT.DATA2 != '-1'" outputFormat="= SELECT.DATA22" fixed="false" textAlign="center" totalFunction="sum" totalComplement="" otherFunction="sum">
					<CELLSTYLE name="cellIndicator" value="triangle_down, 10, left middle, 0xD63E00" condition="(SELECT.DATA2.substr(0,3) == 'DEL' &amp;&amp; (ROW.D2 &lt; ROW.F2)) || (ROW.F2 &lt; ROW.D2)" />
					<CELLSTYLE name="cellIndicator" value="triangle_up, 10, left middle, 0x75a0eb" condition="(SELECT.DATA2.substr(0,3) == 'DEL' &amp;&amp; (ROW.F2 &lt; ROW.D2)) || (ROW.D2 &lt; ROW.F2)" />
					<CELLSTYLE name="cellIndicator" value="rectangle, 10, left middle, 0xFFA500" condition="ROW.D2 == ROW.F2" />
				</COLUMN>
				<COLUMN dataField="P2" type="Number" headerText="% évol." width="45" visibleCondition="SELECT.DATA2 != '-1'" outputFormat="= if (ROW.D2 !=0  &amp;&amp;  ROW.F2 != 0) {return '0%'} else {return '#'}" fixed="false" textAlign="center" totalFunction="sum" totalComplement="" otherFunction="sum">
				</COLUMN>				
				
				<COLUMN dataField="D22" width="85" visibleCondition="SELECT.DATA2 != '-1'" type="Number" outputFormat="= SELECT.DATA22" fixed="false"  headerText=" SELECT.DATA23 + String.fromCharCode(13) + 'cumul  \n'+'&lt;font color=\'#DB1702\'&gt;N-1&lt;/font&gt;' " headerTextCalc="true" textAlign="center" totalFunction="sum" otherFunction="sum">
				</COLUMN>
				<COLUMN dataField="F22" width="85" visibleCondition="SELECT.DATA2 != '-1'" type="Number" outputFormat="= SELECT.DATA22" fixed="false"  headerText=" SELECT.DATA23 + String.fromCharCode(13)  + 'cumul  \n'+ '&lt;font color=\'#DB1702\'&gt;N&lt;/font&gt;' " headerTextCalc="true" textAlign="center" totalFunction="sum" otherFunction="sum">
				</COLUMN>
				<COLUMN dataField="E22" type="Number" headerText="Ecart" width="70" visibleCondition="SELECT.DATA2 != '-1'" outputFormat="= SELECT.DATA22" fixed="false" textAlign="right" totalFunction="sum" totalComplement="" otherFunction="sum" calc="true">
					<CALC formula="ROW.F22 - ROW.D22"/>
					<CELLSTYLE name="cellIndicator" value="triangle_down, 10, left middle, 0xD63E00" condition="(SELECT.DATA2.substr(0,3) == 'DEL' &amp;&amp; (ROW.D22 &lt; ROW.F22)) || (ROW.F22 &lt; ROW.D22)" />
					<CELLSTYLE name="cellIndicator" value="triangle_up, 10, left middle, 0x75a0eb" condition="(SELECT.DATA2.substr(0,3) == 'DEL' &amp;&amp; (ROW.F22 &lt; ROW.D22)) || (ROW.D22 &lt; ROW.F22)" />
					<CELLSTYLE name="cellIndicator" value="rectangle, 10, left middle, 0xFFA500" condition="ROW.D2 == ROW.F2" />
				</COLUMN>
				<COLUMN dataField="P22" type="Number" headerText="% évol." width="45" visibleCondition="SELECT.DATA2 != '-1'" outputFormat="= if (ROW.D2 !=0  &amp;&amp;  ROW.F2 != 0) {return '0%'} else {return '#'}" fixed="false" textAlign="center" totalFunction="" totalComplement="" otherFunction="" calc="true">
					<CALC formula="(ROW.E22 / ROW.D22)*100"/>
				</COLUMN>

			</DATAGRID>
		</ONGLET>
	</PRESENTATION>
</VUE>
