<?xml version="1.0" encoding="ISO-8859-1"?>
<VUE name="ACTI000140" label="ACTI. Effets Prix - Volume" 
title="= 'Effets Prix - Volume par ' +  SELECT.GROUPBY_LABEL + ' ('+'N-1 : ' +VIEW.PERIODE_D_LABEL + ' à ' + VIEW.TOPERIODE_D_LABEL  + '  vs  ' + 'N : '+ SELECT.PERIODE_LABEL + ' à ' + SELECT.TOPERIODE_LABEL + ')' + ' sur le CA facturé + valorisé et les ' + SELECT.DATA01_LABEL " 
database="iCTI" 
swf="*CTI_view1" 
softCode="iCTI_activite" 
typeEts="" 
globals="ACTI_globals.XML" 
componentsFile="ACTI_components.XML" 
helpDokuWIkiDir="" helpDokuWIkiFile="acti000140"  helpFile="iCTI_ACTI_ACTI000140.HTML">
	<VIEWPROPERTIES componentName="PROPERTIES_ETATDOSSIERS"/>
	<VIEWPROPERTIES>
        <PROPERTY dataLink="VIEWPROPERTIES" nameField="name" valueField="value"/>
		<PROPERTY name="DATAFUNC">
			<value><![CDATA[[EVAL 
				// <?php
				
				function ACTI000140_calcSQL($data) {
					
					$ctiDivision = "base.cti_division(%s, %s)";
					$countDistinct = "count(DISTINCT CASE WHEN [VIEW.DATE_GBY] BETWEEN @date_debut@ AND @date_fin@ THEN %s ELSE null END)";
					$countDistinctCaseWhen = "count(DISTINCT CASE WHEN [VIEW.DATE_GBY] BETWEEN @date_debut@ AND @date_fin@ AND type_sejour IN (%s) THEN %s ELSE null END)";
					$periodeDebut = '\'[PERIODE]\'::date';
					$periodeFin = '\'[TOPERIODE]\'::date';
					$periodePrecDebut = '\'[VIEW.PERIODE_D]\'::date';
					$periodePrecFin = '\'[VIEW.TOPERIODE_D]\'::date';
					
					switch ($data) {
						case '1.1':	// Nombre de séjours
							$tmp = sprintf($countDistinct, 'v_factures_reference_1.no_sejour');
							break;
						case '1.2':	// Nombre de séjours HC
							$tmp0 = '1';
                            $tmp = sprintf($countDistinctCaseWhen, $tmp0, 'v_factures_reference_1.no_sejour');
							break;
						case '1.3':	// Nombre de séjours HJ
							$tmp0 = '2,5';
                            $tmp = sprintf($countDistinctCaseWhen, $tmp0, 'v_factures_reference_1.no_sejour');
							break;
                        case '1.4':	// Nombre de séjours Autres
							$tmp0 = '3';
                            $tmp = sprintf($countDistinctCaseWhen, $tmp0, 'v_factures_reference_1.no_sejour');
							break;
						default :	// Nombre de séjours par défaut
							$tmp = sprintf($countDistinct, 'v_factures_reference_1.no_sejour');
					}
					
					$toReplace = array(
						'@date_debut@',
						'@date_fin@'
					);
					
					$curPeriod = array(
						$periodeDebut,
						$periodeFin
					);
					
					$prevPeriod = array(
						$periodePrecDebut,
						$periodePrecFin
					);
					
					return str_replace($toReplace, $curPeriod, $tmp) . ', ' . str_replace($toReplace, $prevPeriod, $tmp);
				}
                
                function ACTI000140_CA_calcSQL($data,$data2) {
					
					
					$ctiDivision = "base.cti_division(%s, %s)";
					$sum = "sum( CASE WHEN [VIEW.DATE_GBY] BETWEEN @date_debut@ AND @date_fin@ THEN %s[VIEW.CLIHON] ELSE 0 END ) + sum( CASE WHEN [VIEW.DATE_GBY] BETWEEN @date_debut@ AND @date_fin@ THEN %s[VIEW.CLIHON] ELSE 0 END )";
					$sum2 = "sum( CASE WHEN [VIEW.DATE_GBY] BETWEEN @date_debut@ AND @date_fin@ AND type_sejour IN (%s) THEN %s[VIEW.CLIHON] ELSE NULL END ) + sum( CASE WHEN [VIEW.DATE_GBY] BETWEEN @date_debut@ AND @date_fin@ AND type_sejour IN (%s) THEN %s[VIEW.CLIHON] ELSE NULL END )";
					$periodeDebut = '\'[PERIODE]\'::date';
					$periodeFin = '\'[TOPERIODE]\'::date';
					$periodePrecDebut = '\'[VIEW.PERIODE_D]\'::date';
					$periodePrecFin = '\'[VIEW.TOPERIODE_D]\'::date';
					
					switch ($data) {
						case '1.1':
                            
                                    $tmp = sprintf($sum, 'v_factures_reference_1.montant_facture', 'v_factures_reference_1.montant_encours');
                                    break;
                                    
                        case '1.2':
                            
                                   $tmp0 = '1';
                                   $tmp = sprintf($sum2, $tmp0, 'v_factures_reference_1.montant_facture', $tmp0, 'v_factures_reference_1.montant_encours');
                                    break;
                                
                        case '1.3':
                            
                                    $tmp0 = '2,5';
                                    $tmp = sprintf($sum2, $tmp0, 'v_factures_reference_1.montant_facture', $tmp0, 'v_factures_reference_1.montant_encours');
                                    break;
                                
                        case '1.4':
                            
                                    $tmp0 = '3';
                                    $tmp = sprintf($sum2, $tmp0, 'v_factures_reference_1.montant_facture', $tmp0,'v_factures_reference_1.montant_encours');
                                    break;
                                
						default :	// CA facturé + valorisé
							$tmp = sprintf($sum, 'v_factures_reference_1.montant_facture', 'v_factures_reference_1.montant_encours');
					}
					
					$toReplace = array(
						'@date_debut@',
						'@date_fin@'
					);
					
					$curPeriod = array(
						$periodeDebut,
						$periodeFin
					);
					
					$prevPeriod = array(
						$periodePrecDebut,
						$periodePrecFin
					);
					
					return str_replace($toReplace, $curPeriod, $tmp) . ', ' . str_replace($toReplace, $prevPeriod, $tmp);
				}
				
				// ?>
			EVAL]]]></value>
		</PROPERTY>
		<PROPERTY name="DATASQL">
			<value><![CDATA[[EVAL 
				// <?php
				
				return 
					ACTI000140_calcSQL('[DATA01]') . ', 0, 0, ' . PHP_EOL . 
					ACTI000140_CA_calcSQL('[DATA01]','[DATA02]'). ', 0 '; 
				// ?>
			EVAL]]]></value>
		</PROPERTY>
	</VIEWPROPERTIES>
	<SELECTIONS label="Paramètres de l'analyse">
		<GROUP label="Période">
            <FIELD name="ALIAS_PERIODE" label="" UI="combo" width="220" default="CUM_LAST_MONTH" tree="true" globalListProvider="ALIAS_PERIODE" />
			<FIELD name="PERIODE" label="Période" UI="combo" tree="true" width="150" default="2014-07-01" printable="false" globalListProvider="DATE_DEBUT" />
			<FIELD name="TOPERIODE" label="à" UI="combo" tree="true" width="150" default="2014-12-31" printable="false" globalListProvider="DATE_FIN" />
		</GROUP>
		<GROUP label="Période précédente">
			<FIELD name="TYPE_COMPARAISON" label="" UI="combo" default="2" width="150">
				<OPTION label="Année précédente" data="2" />
				<OPTION label="Saisie période" data="S" />
			</FIELD>
            <FIELD name="PERIODE_D" label="Période précédente" UI="combo" tree="true" width="150" default="2015-01-01" printable="false" globalListProvider="DATE_DEBUT" visible="= SELECT.TYPE_COMPARAISON == 'S'"/>
			<FIELD name="TOPERIODE_D" label="à" UI="combo" tree="true" width="150" default="2015-12-30" printable="false" globalListProvider="DATE_FIN" visible="= SELECT.TYPE_COMPARAISON == 'S'"/>
		</GROUP>
		<GROUP>
			<FIELD name="DATA01" label="Données" UI="combo" tree="true" width="200" default="1.1" default2="1.1" default3="Séjours" default4="P" printable="false">
                <OPTION label="Séjours" data="1.1" data2="#" data3="Nombre de séjours. Pour les séjours de la CMD 28, nombre de séances" data4="P" treeLevel="1"/>
                <OPTION label="Séjours HC" data="1.2" data2="#" data3="Nombre de séjours en hospitalisation complète" data4="P" treeLevel="1"/>
                <OPTION label="Séjours HJ" data="1.3" data2="#" data3="Nombre de séjours en hospitalisation de jour" data4="P" treeLevel="1"/>
                <OPTION label="Séjours Autres" data="1.4" data2="#" data3="Nombre de séjours externes" data4="P" treeLevel="1"/>
			</FIELD>
            <FIELD name="DATA02" label="Données" UI="combo" tree="true" width="200" default="1" default2="1" default3="Ca fac + val" default4="P" printable="false" visible="false">
                <OPTION label="CA total" data="1" data2="#E" data3="CA total" data4="P" treeLevel="1" />			
			</FIELD>
		</GROUP>
        
		<GROUP label="Regroupements">
			<FIELD name="GROUPBY" width="220" label="Regroupements" UI="combo" default="4" tree="true">
				<OPTION label="Options" data="" globalListProvider="ETATDOSSIERS_GROUPBY" />
			</FIELD>
			<FIELD name="GROUPBY_TAB" width="100" 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 label="">
			<FIELD name="GROUPBY_2" width="220" label="" UI="combo" default="-1" tree="true">
				<OPTION label="Pas de second niveau" data="-1" treeLevel="1" />
				<OPTION label="Options" data="" globalListProvider="ETATDOSSIERS_GROUPBY" />
			</FIELD>
            <FIELD name="GROUPBY_3" label="" UI="combo" default="-1" width="220" tree="true">
				<OPTION label="Pas de troisième niveau" data="-1"/>
				<OPTION label="Options" data="" globalListProvider="ETATDOSSIERS_GROUPBY"/>
			</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_RSS_X" cacheEnabled="true">
				<select><![CDATA[ 
				
					CTISELECT_TREE
                        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]}
						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]}
						OPTIONS{NOTZERO=1}
						ORDERBY{[VIEW.DATA01],, DESC}
						INDICATORS{
							[VIEW.DATASQL]
						}
					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] = indicateurs[1] - indicateurs[2],
							indicateurs[4] = CASE 
												WHEN indicateurs[1] > 0 AND indicateurs[2] > 0 THEN base.cti_division(indicateurs[1] - indicateurs[2], indicateurs[2]) * 100
											 ELSE 0 END,
							indicateurs[7] = indicateurs[5] - indicateurs[6],
							indicateurs[8] = CASE 
												WHEN indicateurs[5] > 0 AND indicateurs[6] > 0 THEN base.cti_division(indicateurs[5] - indicateurs[6], indicateurs[6]) * 100
											 ELSE 0 END
					}
					
				]]></select>
				<FIELDS>
					<INSERT name="CTISELECT_TREE_FIELDS" />
					<FIELD name="SORT" />
					
					
					<!-- Première donnée -->
					<FIELD name="F1" />
					<FIELD name="D1" />
					<FIELD name="D1_ECA" />
					<FIELD name="D1_PCT" />
					
					<!-- Deuxième donnée -->
					<FIELD name="F2" />
					<FIELD name="D2" />
					<FIELD name="D2_ECA" />
					<FIELD name="D2_PCT" />
					
				</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>
        </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="LGROUPBY_2" value="return SELECT.GROUPBY_2" /> 
					<ARG name="LGROUPBY_3" value="return SELECT.GROUPBY_3" /> 
					<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="LGROUPBY_2" value="return SELECT.GROUPBY_2" /> 
					<ARG name="LGROUPBY_3" value="return SELECT.GROUPBY_3" /> 
					<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="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="'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="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="TYPE_COMPARAISON" value="'2'" />
				</VIEWITEM>	
			</VIEWLINK>
			<VIEWLINK label="Comparatif" shortLabel="Comparatif"  view="ACTI000060.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 SELECT.GROUPBY;" />
					<ARG name="GROUPBY_2" value="return SELECT.GROUPBY_2" /> 
					<ARG name="GROUPBY_3" value="return SELECT.GROUPBY_3" /> 
					<ARG name="DATA1" value="'NSEJ'" />
					<ARG name="DATA2" value="'MVFAC'" />
					<ARG name="DATA3" value="'NSEJHC'" />					
					<ARG name="DATA4" value="'MVFHC'" />
					<ARG name="DATA5" value="'NSEJHJ'" />					
					<ARG name="DATA6" value="'MVFHJ'" />				
					<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="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'}
					" />
					<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="'NSEJ'" />
					<ARG name="DATA2" value="'MVFAC'" />
					<ARG name="DATA3" value="'NSEJHC'" />					
					<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="if (SELECT.GROUPBY == 'JOUR' ) {return 'JOURS'}
											   if (SELECT.GROUPBY == 'JOURF' ) {return 'JOURSF'}
											   if (SELECT.GROUPBY == 'MOIS' ) {return 'NUMEROMOIS'}
											   if (SELECT.GROUPBY == 'MOISF' ) {return 'NUMEROMOISF'}
					
					" />
					<ARG name="GROUPBY_2" value="return SELECT.GROUPBY_2" /> 
					<ARG name="GROUPBY_3" value="return SELECT.GROUPBY_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="'MVFAC'"/>
					<ARG name="DATA3" value="'NSEJHC'"/>					
					<ARG name="DATA4" value="'MVFHC'"/>
					<ARG name="DATA5" value="'NSEJHJ'"/>					
					<ARG name="DATA6" value="'MVFHJ'"/>
					<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_2" value="return SELECT.GROUPBY_2" /> 
					<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="Evolution 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_2" value="return SELECT.GROUPBY_2" /> 
					<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="PERIODICITE" value="'MONTH'"/>
				<ARG name="PERIODE" value="return SELECT.TOPERIODE.substr(0,4)+'-01-01'" />
				<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="DATA" value="'MVFAC'"/>
			</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="return SELECT.DATA1"/>
				<ARG name="COLUMNBY" value="'NUMEROMOIS'"/>
				<ARG name="GROUPBY" value="'ANNEE'" />
				<ARG name="GROUPBY_2" value="if (SELECT.GROUPBY != 'ANNEE' ) {return SELECT.GROUPBY ;} "/>
				<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.GROUPBY;" />
				<ARG name="GROUPBY_2" value="return SELECT.GROUPBY_2;" />
				<ARG name="GROUPBY_3" value="return SELECT.GROUPBY_3;" />
				<ARG name="GROUPBY_TAB" value="'TAB'" />
			</VIEWLINK>	
			<VIEWLINK label="Liste des séjours" shortLabel="Séjours" view="ACTI000058.XML" componentName="ETA_DOS_BASE_VIEWLINK" component2Name="STANDARD_BASE_VIEWLINK">
				<ARG name="PERIODE">
					<value>
						<![CDATA[
                            if (SELECT.GROUPBY == 'MOIS') {return ROW.OID1;}
							if (SELECT.GROUPBY_2 == 'MOIS' && ROW.OID2 != '0' && ROW.OID2 != '-9999999') {return ROW.OID2;} 
							if (SELECT.GROUPBY_3 == 'MOIS' && ROW.OID3 != '0' && ROW.OID3 != '-9999999') {return ROW.OID3;} 
							if (SELECT.GROUPBY == 'MOISF') {return ROW.OID1;}
							if (SELECT.GROUPBY_2 == 'MOISF' && ROW.OID2 != '0' && ROW.OID2 != '-9999999') {return ROW.OID2;} 
							if (SELECT.GROUPBY_3 == 'MOISF' && ROW.OID3 != '0' && ROW.OID3 != '-9999999') {return ROW.OID3;} 
							if (SELECT.GROUPBY == 'MOISEX') {return ROW.OID1;}
							if (SELECT.GROUPBY_2 == 'MOISEX' && ROW.OID2 != '0' && ROW.OID2 != '-9999999') {return ROW.OID2;} 
							if (SELECT.GROUPBY_3 == 'MOISEX' && ROW.OID3 != '0' && ROW.OID3 != '-9999999') {return ROW.OID3;} 
						]]>
					</value>
				</ARG>
				<ARG name="TOPERIODE">
					<value>
						<![CDATA[
							if (SELECT.GROUPBY == 'MOIS') {return ROW.OID1;} 	
							if (SELECT.GROUPBY_2 == 'MOIS' && ROW.OID2 != '0' && ROW.OID2 != '-9999999') {return ROW.OID2;} 
							if (SELECT.GROUPBY_3 == 'MOIS' && ROW.OID3 != '0' && ROW.OID3 != '-9999999') {return ROW.OID3;} 
							if (SELECT.GROUPBY == 'MOISF') {return ROW.OID1;}	
							if (SELECT.GROUPBY_2 == 'MOISF' && ROW.OID2 != '0' && ROW.OID2 != '-9999999') {return ROW.OID2;} 
							if (SELECT.GROUPBY_3 == 'MOISF' && ROW.OID3 != '0' && ROW.OID3 != '-9999999') {return ROW.OID3;} 
							if (SELECT.GROUPBY == 'MOISEX') {return ROW.OID1;}	
							if (SELECT.GROUPBY_2 == 'MOISEX' && ROW.OID2 != '0' && ROW.OID2 != '-9999999') {return ROW.OID2;} 
							if (SELECT.GROUPBY_3 == 'MOISEX' && ROW.OID3 != '0' && ROW.OID3 != '-9999999') {return ROW.OID3;} 

						]]>
					</value>
				</ARG>
				<ARG name="QUELLEDATE">
					<value>
						<![CDATA[
								if('[GROUPBY]' == 'ANNEEF' || '[GROUPBY]' == 'TRIMF' || '[GROUPBY]' == 'JOURF' || '[GROUPBY]' == 'NUMEROTRIMF' || '[GROUPBY]' == 'NUMEROMOISF' || '[GROUPBY]' == 'NUMEROJOURF' || '[GROUPBY]' == 'SEMAINEANNEF' || '[GROUPBY]' == 'JOURSF' || '[GROUPBY]' == 'SEMAINEWEF' 
                                    || '[GROUPBY_2]' == 'ANNEEF' || '[GROUPBY_2]' == 'TRIMF' || '[GROUPBY_2]' == 'JOURF' || '[GROUPBY_2]' == 'NUMEROTRIMF' || '[GROUPBY_2]' == 'NUMEROMOISF' || '[GROUPBY_2]' == 'NUMEROJOURF' || '[GROUPBY_2]' == 'SEMAINEANNEF' || '[GROUPBY_2]' == 'JOURSF' || '[GROUPBY_2]' == 'SEMAINEWEF'
                                    || '[GROUPBY_3]' == 'ANNEEF' || '[GROUPBY_3]' == 'TRIMF' || '[GROUPBY_3]' == 'JOURF' || '[GROUPBY_3]' == 'NUMEROTRIMF' || '[GROUPBY_3]' == 'NUMEROMOISF' || '[GROUPBY_3]' == 'NUMEROJOURF' || '[GROUPBY_3]' == 'SEMAINEANNEF' || '[GROUPBY_3]' == 'JOURSF' || '[GROUPBY_3]' == 'SEMAINEWEF') 
                                {return '2';}
								if('[GROUPBY]' == 'ANNEEEX' || '[GROUPBY]' == 'TRIMEX' || '[GROUPBY]' == 'JOUREX' || '[GROUPBY]' == 'NUMEROTRIMEX' || '[GROUPBY]' == 'NUMEROMOISEX' || '[GROUPBY]' == 'NUMEROJOUREX' || '[GROUPBY]' == 'SEMAINEANNEEX' || '[GROUPBY]' == 'JOURSEX' || '[GROUPBY]' == 'SEMAINEWEEX'
                                    || '[GROUPBY_2]' == 'ANNEEEX' || '[GROUPBY_2]' == 'TRIMEX' || '[GROUPBY_2]' == 'JOUREX' || '[GROUPBY_2]' == 'NUMEROTRIMEX' || '[GROUPBY_2]' == 'NUMEROMOISEX' || '[GROUPBY_2]' == 'NUMEROJOUREX' || '[GROUPBY_2]' == 'SEMAINEANNEEX' || '[GROUPBY_2]' == 'JOURSEX' || '[GROUPBY_2]' == 'SEMAINEWEEX'
                                    || '[GROUPBY_3]' == 'ANNEEEX' || '[GROUPBY_3]' == 'TRIMEX' || '[GROUPBY_3]' == 'JOUREX' || '[GROUPBY_3]' == 'NUMEROTRIMEX' || '[GROUPBY_3]' == 'NUMEROMOISEX' || '[GROUPBY_3]' == 'NUMEROJOUREX' || '[GROUPBY_3]' == 'SEMAINEANNEEX' || '[GROUPBY_3]' == 'JOURSEX' || '[GROUPBY_3]' == 'SEMAINEWEEX') 
                                {return '3';}
								return '1';
						]]>
					</value>
				</ARG>
				<ARG name="QDETAIL_TIERS"> 
					<value>
						<![CDATA[
							return '-1';
						]]>
					</value>
				</ARG>		
			</VIEWLINK>
		</VIEWLINKS>
       <ONGLET excelLabel="Effet Simplifié" label="Effet Simplifié" multiTab="true" multiTabBreakField="TABD" multiTabBreakLabelField="TABDL" multiTabBreakLonglabelField="TABDLL">
			<CHART title="" type="group" subType="" percentHeight="100" >
				<CHART title="C.A Total (10 premiers)" type="pieChart" subType="" maxItems="10" maxItemsSortOn="" maxItemsSortSeq="" sortField="F2" sortSeq="D" condition="ROW.LVL == '1'">
					<CATEGORY field="TXT" type="Char" />
					<SERIE field="F2" displayName="C.A Total" />
				</CHART>
                <CHART title="Séjours pour les 10 premiers" type="columnChart" maxItems="10" maxItemsSortOn="F1" maxItemsSortSeq="D" sortField="COD" sortSeq="A" condition="ROW.LVL == '1'">
                    <CATEGORY field="CODTXT" type="Char" />
                    <SERIE field="EPXS" displayName="Effet Prix " displayNameCalc="false" />
                    <SERIE field="EVLS" displayName="Effet Volume" displayNameCalc="false" />
                </CHART>
			</CHART>
			<DATAGRID title="" total="true" showOthers="true" headerHeight="70" variableRowHeight="true" selectRowInRows="= ROW.OID == '-9999997'" otherRowInRows="= ROW.OID == '-9999998'" totalRowInRows="= ROW.OID == '-9999999'" sortable="= SELECT.GROUPBY_2 == '-1' || SELECT.GROUPBY_TAB == 'TAB'">
				<INSERT name="DATAGRID_MULTITAB_STYLES" />
				<COLUMN dataField="LVL" width="50" type="Char" visible="false" headerText="Code" textAlign="left" otherFunction="text" totalFunction="text" />
				<COLUMN dataField="OID" width="60" type="Char" visible="false" headerText="Oid" />
				<COLUMN dataField="COD" width="70" type="Char" headerText="Code" textAlign="left" otherFunction="text" totalFunction="text" totalComplement="TOTAL">
					<CELLSTYLE name="paddingLeft" value="15" condition="ROW.LVL == '2' &amp;&amp; SELECT.GROUPBY_TAB != 'TAB'" />
				</COLUMN>
				<COLUMN dataField="TXT" type="Char" minWidth="200" headerText="SELECT.GROUPBY_LABEL" headerTextCalc="true" textAlign="left" totalFunction="text" otherFunction="text" otherComplement="Autres" />
				<COLUMN dataField="CODTXT" type="Char" minWidth="200" visible="false" totalFunction="text" otherFunction="text" calc="true">
					<CALC formula="ROW.COD + ' ' + ROW.TXT.toString().substr(0,10)" />
				</COLUMN>
				
				<COLUMN dataField="D1" type="Number" width="80" outputFormat="= SELECT.DATA012" selectable="true" headerText="'(Q1)'+ '\n' +SELECT.DATA01_LABEL +'\n'+ '&lt;font color=\'#DB1702\'&gt;N-1&lt;/font&gt;'" headerTextCalc="true" description="= SELECT.DATA013 " textAlign="center">
						<HEADERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
				</COLUMN>
				<COLUMN dataField="F1" type="Number" width="80" outputFormat="= SELECT.DATA012" selectable="true" headerText="'(Q2)' +'\n' +SELECT.DATA01_LABEL +'\n'+ '&lt;font color=\'#DB1702\'&gt;N&lt;/font&gt;'"  headerTextCalc="true" description="= SELECT.DATA013 " textAlign="center">
						<HEADERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
				</COLUMN>
				<COLUMN dataField="D1_ECA" type="Number" width="80" outputFormat="= SELECT.DATA012" headerText="@LF@ Ecart" textAlign="center">
					<CELLSTYLE name="cellIndicator" value="triangle_down, 10, left middle, 0xD63E00" condition="(SELECT.DATA014 == 'P' &amp;&amp; ROW.F1 &lt; ROW.D1) || (SELECT.DATA014 == 'N' &amp;&amp; ROW.F1 &gt; ROW.D1)" />
					<CELLSTYLE name="cellIndicator" value="triangle_up, 10, left middle, 0x75a0eb" condition="(SELECT.DATA014 == 'P' &amp;&amp; ROW.F1 &gt; ROW.D1) || (SELECT.DATA014 == 'N' &amp;&amp; ROW.F1 &lt; ROW.D1)" />
					<CELLSTYLE name="cellIndicator" value="rectangle, 10, left middle, 0xFFA500" condition="ROW.F1 != null &amp;&amp; ROW.D1 != null &amp;&amp; ROW.F1 == ROW.D1" />
                        <HEADERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
                </COLUMN>
				<COLUMN dataField="D1_PCT" type="Number" width="45" outputFormat="= if (ROW.D1 !=0) {return '0%'} else {return '#'}" headerText="@LF@ %" textAlign="center">
						<HEADERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
				</COLUMN>
				
				<COLUMN dataField="D2" type="Number" width="85" outputFormat="#E" selectable="true" headerText="+ '\n' + 'CA total'+ '\n' +  '&lt;font color=\'#DB1702\'&gt;N-1&lt;/font&gt;'  + '\n' " headerTextCalc="true" description="= SELECT.DATA023 " textAlign="center">	
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
				</COLUMN>
				<COLUMN dataField="F2" type="Number" width="85" outputFormat="#E" selectable="true" headerText="+ '\n' + 'CA total'+ '\n' +  '&lt;font color=\'#DB1702\'&gt;N&lt;/font&gt;'  + '\n' " headerTextCalc="true" description="= SELECT.DATA023" textAlign="center">	
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
				</COLUMN>
				<COLUMN dataField="D2_ECA" type="Number" width="95" outputFormat="#E" headerText="(X1) @LF@ Ecart" textAlign="center">
					<CELLSTYLE name="cellIndicator" value="triangle_down, 10, left middle, 0xD63E00" condition="(SELECT.DATA024 == 'P' &amp;&amp; ROW.F2 &lt; ROW.D2) || (SELECT.DATA024 == 'N' &amp;&amp; ROW.F2 &gt; ROW.D2)" />
					<CELLSTYLE name="cellIndicator" value="triangle_up, 10, left middle, 0x75a0eb" condition="(SELECT.DATA024 == 'P' &amp;&amp; ROW.F2 &gt; ROW.D2) || (SELECT.DATA024 == 'N' &amp;&amp; ROW.F2 &lt; ROW.D2)" />
					<CELLSTYLE name="cellIndicator" value="rectangle, 10, left middle, 0xFFA500" condition="ROW.F2 != null &amp;&amp; ROW.D2 != null &amp;&amp; ROW.F2 == ROW.D2" />
                        <HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
				</COLUMN>
				<COLUMN dataField="D2_PCT" type="Number" width="45" outputFormat="= if (ROW.D2 !=0) {return '0%'} else {return '#'}" headerText="@LF@ %" textAlign="center">	
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
				</COLUMN>
                <COLUMN dataField="CA_MOY_OLD" type="Number" width="80" outputFormat="#E" headerText="'(P1)' + '\n' + 'CA moyen '+'\n'+ '&lt;font color=\'#DB1702\'&gt;N-1&lt;/font&gt;'" headerTextCalc="true"  description="CA / nb Séjours" totalFunction="calc" otherFunction="calc" calc="true" textAlign="center">
					<CALC formula="(ROW.D2 / ROW.D1)" />
                    <HEADERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
					<FOOTERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
				</COLUMN>
				<COLUMN dataField="CA_MOY_NOW" type="Number" width="80" outputFormat="#E" headerText="'(P2)' + '\n' + 'CA moyen ' +'\n'+ '&lt;font color=\'#DB1702\'&gt;N&lt;/font&gt;'" headerTextCalc="true"  description="CA / nb Séjours" totalFunction="calc" otherFunction="calc" calc="true" textAlign="center">
					<CALC formula="(ROW.F2 / ROW.F1)" />
                    <HEADERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
                    <FOOTERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
				</COLUMN>
				<COLUMN dataField="EPXS" type="Number" width="95" outputFormat="#E" headerText="@LF@ Effet Prix" description="EP=(P2-P1)*Q2" totalFunction="calc" otherFunction="calc" calc="true" textAlign="center">
					<CALC formula="(ROW.CA_MOY_NOW - ROW.CA_MOY_OLD)* ROW.F1" />
                    <CELLSTYLE name="cellIndicator" value="circle, 5, left middle, 0xD63E00" condition="(ROW.EPXS &lt; '0')" />
                    <HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
					<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
				</COLUMN>
				<COLUMN dataField="EVLS" type="Number" width="95" outputFormat="#E" headerText="@LF@ Effet Volume" description="EV=(Q2-Q1)*P1" totalFunction="calc" otherFunction="calc" calc="true" textAlign="center">
					<CALC formula="(ROW.F1 - ROW.D1)* ROW.CA_MOY_OLD" />
                    <CELLSTYLE name="cellIndicator" value="circle, 5, left middle, 0xD63E00" condition="(ROW.EVLS &lt; '0')" />
                    <HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
					<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
				</COLUMN>
				<COLUMN dataField="ETOT" type="Number" width="90" outputFormat="#E" headerText="@LF@ Somme des Effets" description="X1 = EP + EV " totalFunction="calc" otherFunction="calc" calc="true" textAlign="center">
					<CALC formula="(ROW.EPXS + ROW.EVLS)" />
                    <HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
					<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
				</COLUMN>
			</DATAGRID>
		</ONGLET>
		<ONGLET excelLabel="Effet Croisé" label="Effet Croisé" multiTab="true" multiTabBreakField="TABD" multiTabBreakLabelField="TABDL" multiTabBreakLonglabelField="TABDLL">
			<CHART title="" type="group" subType="" percentHeight="100" >
				<CHART title="C.A Total (10 premiers)" type="pieChart" subType="" maxItems="10" maxItemsSortOn="" maxItemsSortSeq="" sortField="F2" sortSeq="D" condition="ROW.LVL == '1'">
					<CATEGORY field="TXT" type="Char" />
					<SERIE field="F2" displayName="C.A Total" />
				</CHART>
                <CHART title="Séjours pour les 10 premiers" type="columnChart" maxItems="10" maxItemsSortOn="F1" maxItemsSortSeq="D" sortField="COD" sortSeq="A" condition="ROW.LVL == '1'">
                    <CATEGORY field="CODTXT" type="Char" />
                    <SERIE field="EPX" displayName="Effet Prix " displayNameCalc="false" />
                    <SERIE field="EVL" displayName="Effet Volume" displayNameCalc="false" />
                    <SERIE field="ECR" displayName="Effet Croisé" displayNameCalc="false" />
                </CHART>
			</CHART>
			<DATAGRID title="" total="true" showOthers="true" headerHeight="70" variableRowHeight="true" selectRowInRows="= ROW.OID == '-9999997'" otherRowInRows="= ROW.OID == '-9999998'" totalRowInRows="= ROW.OID == '-9999999'" sortable="= SELECT.GROUPBY_2 == '-1' || SELECT.GROUPBY_TAB == 'TAB'">
				<INSERT name="DATAGRID_MULTITAB_STYLES" />
				<COLUMN dataField="LVL" width="50" type="Char" visible="false" headerText="Code" textAlign="left" otherFunction="text" totalFunction="text" />
				<COLUMN dataField="OID" width="60" type="Char" visible="false" headerText="Oid" />
				<COLUMN dataField="COD" width="70" type="Char" headerText="Code" textAlign="left" otherFunction="text" totalFunction="text" totalComplement="TOTAL">
					<CELLSTYLE name="paddingLeft" value="15" condition="ROW.LVL == '2' &amp;&amp; SELECT.GROUPBY_TAB != 'TAB'" />
				</COLUMN>
				<COLUMN dataField="TXT" type="Char" minWidth="200" headerText="SELECT.GROUPBY_LABEL" headerTextCalc="true" textAlign="left" totalFunction="text" otherFunction="text" otherComplement="Autres" />
				<COLUMN dataField="CODTXT" type="Char" minWidth="200" visible="false" totalFunction="text" otherFunction="text" calc="true">
					<CALC formula="ROW.COD + ' ' + ROW.TXT.toString().substr(0,10)" />
				</COLUMN>
				
				<COLUMN dataField="D1" type="Number" width="80" outputFormat="= SELECT.DATA012" selectable="true" headerText="'(Q1)'+ '\n' +SELECT.DATA01_LABEL +'\n'+ '&lt;font color=\'#DB1702\'&gt;N-1&lt;/font&gt;'" headerTextCalc="true" description="= SELECT.DATA013 " textAlign="center">
						<HEADERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
				</COLUMN>
				<COLUMN dataField="F1" type="Number" width="80" outputFormat="= SELECT.DATA012" selectable="true" headerText="'(Q2)' +'\n' +SELECT.DATA01_LABEL +'\n'+ '&lt;font color=\'#DB1702\'&gt;N&lt;/font&gt;'"  headerTextCalc="true" description="= SELECT.DATA013 " textAlign="center">
						<HEADERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
				</COLUMN>
				<COLUMN dataField="D1_ECA" type="Number" width="80" outputFormat="= SELECT.DATA012" headerText="@LF@ Ecart" textAlign="center">
					<CELLSTYLE name="cellIndicator" value="triangle_down, 10, left middle, 0xD63E00" condition="(SELECT.DATA014 == 'P' &amp;&amp; ROW.F1 &lt; ROW.D1) || (SELECT.DATA014 == 'N' &amp;&amp; ROW.F1 &gt; ROW.D1)" />
					<CELLSTYLE name="cellIndicator" value="triangle_up, 10, left middle, 0x75a0eb" condition="(SELECT.DATA014 == 'P' &amp;&amp; ROW.F1 &gt; ROW.D1) || (SELECT.DATA014 == 'N' &amp;&amp; ROW.F1 &lt; ROW.D1)" />
					<CELLSTYLE name="cellIndicator" value="rectangle, 10, left middle, 0xFFA500" condition="ROW.F1 != null &amp;&amp; ROW.D1 != null &amp;&amp; ROW.F1 == ROW.D1" />
                        <HEADERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
                </COLUMN>
				<COLUMN dataField="D1_PCT" type="Number" width="45" outputFormat="= if (ROW.D1 !=0) {return '0%'} else {return '#'}" headerText="@LF@ %" textAlign="center">
						<HEADERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
				</COLUMN>
				
				<COLUMN dataField="D2" type="Number" width="85" outputFormat="#E" selectable="true" headerText="+ '\n' + 'CA total'+ '\n' +  '&lt;font color=\'#DB1702\'&gt;N-1&lt;/font&gt;'  + '\n' " headerTextCalc="true" description="= SELECT.DATA023 " textAlign="center">	
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
				</COLUMN>
				<COLUMN dataField="F2" type="Number" width="85" outputFormat="#E" selectable="true" headerText="+ '\n' + 'CA total'+ '\n' +  '&lt;font color=\'#DB1702\'&gt;N&lt;/font&gt;'  + '\n' " headerTextCalc="true" description="= SELECT.DATA023" textAlign="center">	
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
				</COLUMN>
				<COLUMN dataField="D2_ECA" type="Number" width="95" outputFormat="#E" headerText="(X1) @LF@ Ecart" textAlign="center">
					<CELLSTYLE name="cellIndicator" value="triangle_down, 10, left middle, 0xD63E00" condition="(SELECT.DATA024 == 'P' &amp;&amp; ROW.F2 &lt; ROW.D2) || (SELECT.DATA024 == 'N' &amp;&amp; ROW.F2 &gt; ROW.D2)" />
					<CELLSTYLE name="cellIndicator" value="triangle_up, 10, left middle, 0x75a0eb" condition="(SELECT.DATA024 == 'P' &amp;&amp; ROW.F2 &gt; ROW.D2) || (SELECT.DATA024 == 'N' &amp;&amp; ROW.F2 &lt; ROW.D2)" />
					<CELLSTYLE name="cellIndicator" value="rectangle, 10, left middle, 0xFFA500" condition="ROW.F2 != null &amp;&amp; ROW.D2 != null &amp;&amp; ROW.F2 == ROW.D2" />
                        <HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
				</COLUMN>
				<COLUMN dataField="D2_PCT" type="Number" width="45" outputFormat="= if (ROW.D2 !=0) {return '0%'} else {return '#'}" headerText="@LF@ %" textAlign="center">	
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
				</COLUMN>
                <COLUMN dataField="CA_MOY_OLD" type="Number" width="80" outputFormat="#E" headerText="'(P1)' + '\n' + 'CA moyen '+'\n'+ '&lt;font color=\'#DB1702\'&gt;N-1&lt;/font&gt;'" headerTextCalc="true"  description="CA / nb Séjours" totalFunction="calc" otherFunction="calc" calc="true" textAlign="center">
					<CALC formula="(ROW.D2 / ROW.D1)" />
                    <HEADERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
					<FOOTERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
				</COLUMN>
				<COLUMN dataField="CA_MOY_NOW" type="Number" width="80" outputFormat="#E" headerText="'(P2)' + '\n' + 'CA moyen ' +'\n'+ '&lt;font color=\'#DB1702\'&gt;N&lt;/font&gt;'" headerTextCalc="true"  description="CA / nb Séjours" totalFunction="calc" otherFunction="calc" calc="true" textAlign="center">
					<CALC formula="(ROW.F2 / ROW.F1)" />
                    <HEADERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
                    <FOOTERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
				</COLUMN>
				<COLUMN dataField="EPX" type="Number" width="95" outputFormat="#E" headerText="@LF@ Effet Prix" description="EP=(P2-P1)*Q1" totalFunction="calc" otherFunction="calc" calc="true" textAlign="center">
					<CALC formula="(ROW.CA_MOY_NOW - ROW.CA_MOY_OLD)* ROW.D1" />
                    <CELLSTYLE name="cellIndicator" value="circle, 5, left middle, 0xD63E00" condition="(ROW.EPX &lt; '0')" />
                    <HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
					<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
				</COLUMN>
				<COLUMN dataField="EVL" type="Number" width="95" outputFormat="#E" headerText="@LF@ Effet Volume" description="EV=(Q2-Q1)*P1" totalFunction="calc" otherFunction="calc" calc="true" textAlign="center">
					<CALC formula="(ROW.F1 - ROW.D1)* ROW.CA_MOY_OLD" />
                    <CELLSTYLE name="cellIndicator" value="circle, 5, left middle, 0xD63E00" condition="(ROW.EVL &lt; '0')" />
                    <HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
					<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
				</COLUMN>
				<COLUMN dataField="ECR" type="Number" width="95" outputFormat="#E" headerText="@LF@ Effet Croisé" description="EC=(Q2-Q1)*(P2-P1)" totalFunction="calc" otherFunction="calc" calc="true" textAlign="center">
					<CALC formula="((ROW.F1 - ROW.D1)*(ROW.CA_MOY_NOW - ROW.CA_MOY_OLD) )" />
                    <CELLSTYLE name="cellIndicator" value="circle, 5, left middle, 0xD63E00" condition="(ROW.ECR &lt; '0')" />
                    <HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
					<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
				</COLUMN>
				<COLUMN dataField="ETOT" type="Number" width="90" outputFormat="#E" headerText="@LF@ Somme des Effets" description="X1 = EP + EV + EC" totalFunction="calc" otherFunction="calc" calc="true" textAlign="center">
					<CALC formula="(ROW.EPX + ROW.EVL + ROW.ECR)" />
                    <HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
					<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
				</COLUMN>
			</DATAGRID>
		</ONGLET>
	</PRESENTATION>
</VUE>
