<?xml version="1.0" encoding="ISO-8859-1"?>
<VUE name="RH000105" 
	label="RH. Analyse Paramétrable" 
	title="= 'Analyse RH par ' +  SELECT.GROUPBY_LABEL + ' (' + SELECT.PERIODE_LABEL + ' à ' + SELECT.TOPERIODE_LABEL + ')' " 
	database="iCTI" 
	swf="*CTI_view1" 
	globals="RH_globals.XML" 
	componentsFile="RH_components.XML" 
	softCode="iCTI_rh"
		helpDokuWIkiDir="rh:vues:Analyse _paramétrable" helpDokuWIkiFile="rh000105"  helpFile=""
>	

	<VIEWPROPERTIES componentName="PROPERTIES_PAIE"/>
	<VIEWPROPERTIES componentName="PROPERTIES_GROUPBY"/>
	<VIEWPROPERTIES>
		<PROPERTY dataLink="VIEWPROPERTIES" nameField="name" valueField="value"/>
	</VIEWPROPERTIES>
	<VIEWPROPERTIES>
		<PROPERTY name="DATAFUNC">
			<value><![CDATA[[EVAL 
				// <?php
				
				function RH000105_calcSQL($data) {
					$ctiDivision = "base.cti_division(%s, %s)";
					$countDistinctCaseWhen = "count(DISTINCT CASE WHEN v_rh_view_1.date_paie BETWEEN @date_debut@ AND @date_fin@ THEN %s ELSE null END)";
					$maxDistinctCaseWhen = "max(DISTINCT CASE WHEN v_rh_view_1.date_paie BETWEEN @date_debut@ AND @date_fin@ THEN %s ELSE null END)";
					$sumDistinctCaseWhen = "sum(CASE WHEN v_rh_view_1.date_paie BETWEEN @date_debut@ AND @date_fin@ THEN %s ELSE 0 END)";
					$moyDistinctCaseWhen = "base.cti_avg_distinct_on(DISTINCT array[%s , %s])";
					$periodeDebut = '\'[PERIODE]\'::date';
					$periodeFin = '\'[TOPERIODE]\'::date';
					
					switch ($data) {
						case 'NBSAL':
							$tmp1 = sprintf($countDistinctCaseWhen, 'v_rh_view_1.salarie_id');
							break;
						case 'NBRUB':
							$tmp1 = sprintf($countDistinctCaseWhen, 'v_rh_view_1.rubrique_id');
							break;
						case 'NBETP':
							$tmp1 = 'base.cti_division('.sprintf($sumDistinctCaseWhen, 'v_rh_view_1.etp_paye').', base.cti_months_between(@date_debut@, @date_fin@))';
							break;   
						case 'NBETPT':
							$tmp1 = 'base.cti_division (
										base.cti_division('.sprintf($sumDistinctCaseWhen, 'v_rh_view_1.heures_travaillees').', max(v_rh_view_1.base_calcul_etp)) ,
										base.cti_months_between(@date_debut@, @date_fin@)
							        )';
							break;
						case 'NBHP':
							$tmp1 = sprintf($sumDistinctCaseWhen, 'v_rh_view_1.heures_payees');
							break;
						case 'NBHT':
							$tmp1 = sprintf($sumDistinctCaseWhen, 'v_rh_view_1.heures_travaillees');
							break;
						case 'MTMASSE':
							$tmp1 = sprintf($sumDistinctCaseWhen, 'v_rh_view_1.montant_masse_salariale');
							break;


						case 'MTHORMOYCHAR':
							$tmp1 = 'base.cti_division('.sprintf($sumDistinctCaseWhen, 'v_rh_view_1.montant_masse_salariale').', '.sprintf($sumDistinctCaseWhen, 'v_rh_view_1.heures_payees').')';
							break;
						case 'MTMASSEMOY':
							$tmp1 = '
								base.cti_division('.
									sprintf($sumDistinctCaseWhen, 'v_rh_view_1.montant_masse_salariale').','.
									sprintf($sumDistinctCaseWhen, 'v_rh_view_1.etp_paye').'
								)
							';
							break;
						case 'MTMASSEPCT':
							$tmp1 = '
								base.cti_division(
									base.cti_division('.
										sprintf($sumDistinctCaseWhen, 'v_rh_view_1.montant_net_a_payer_salarie').','.
										sprintf($sumDistinctCaseWhen, 'v_rh_view_1.etp_paye').'
									),
									base.cti_division('.
										sprintf($sumDistinctCaseWhen, 'v_rh_view_1.montant_masse_salariale').','.
										sprintf($sumDistinctCaseWhen, 'v_rh_view_1.etp_paye').'
									)
								) * 100
							';
							break;
						case 'MTNETAPAYERMOY' :
							$tmp1 = 'base.cti_division('.sprintf($sumDistinctCaseWhen, 'v_rh_view_1.montant_net_a_payer_salarie').', '.sprintf($sumDistinctCaseWhen, 'v_rh_view_1.etp_paye').')';
							break;


						case 'MTBRUT':
							$tmp1 = sprintf($sumDistinctCaseWhen, 'v_rh_view_1.montant_brut');
							break;
						case 'MTBRUTMOY':
							$tmp1 = 'base.cti_division('.sprintf($sumDistinctCaseWhen, 'v_rh_view_1.montant_brut').','.sprintf($sumDistinctCaseWhen, 'v_rh_view_1.etp_paye').')';
							break;
						case 'MTBRUTAVANTAGE':
							$tmp1 = sprintf($sumDistinctCaseWhen, 'v_rh_view_1.montant_brut + v_rh_view_1.montant_avantage_nature');
							break;
						case 'MTAVANTAGE':
							$tmp1 = sprintf($sumDistinctCaseWhen, 'v_rh_view_1.montant_avantage_nature');
							break;
						case 'MTFRAISIMPOS':
							$tmp1 = sprintf($sumDistinctCaseWhen, 'v_rh_view_1.montant_frais_imposables');
							break;
						case 'MTODNETSALARIE':
							$tmp1 = sprintf($sumDistinctCaseWhen, 'v_rh_view_1.montant_od_net_salarie');
							break;
						case 'MTODNETPATRONALE':
							$tmp1 = sprintf($sumDistinctCaseWhen, 'v_rh_view_1.montant_od_net_patronale');
							break;
						case 'MTCOTSALARIE':
							$tmp1 = sprintf($sumDistinctCaseWhen, 'v_rh_view_1.montant_cotisation_salarie');
							break;
						case 'MTCOTPATRONALE':
							$tmp1 = sprintf($sumDistinctCaseWhen, 'v_rh_view_1.montant_cotisation_patronale');
							break;
						case 'MTNETIMPOSABLE':
							$tmp1 = sprintf($sumDistinctCaseWhen, 'v_rh_view_1.montant_net_imposable_salarie');
							break;
						case 'MTNETAPAYER':
							$tmp1 = sprintf($sumDistinctCaseWhen, 'v_rh_view_1.montant_net_a_payer_salarie');
							break;
						case 'BASE':
							$tmp1 = sprintf($sumDistinctCaseWhen, 'v_rh_view_1.base');
							break;
						case 'AGE':
							$tmp1 = sprintf($maxDistinctCaseWhen, 'v_rh_view_1.age_id');
							break;
						case 'MOYAGE':
							$tmp1 =  sprintf($moyDistinctCaseWhen, 'v_rh_view_1.salarie_id' ,'v_rh_view_1.age_id');
							break;
						case 'DNA':
							$tmp1 = sprintf($maxDistinctCaseWhen, 'v_rh_view_1.date_naissance');
							break;
						case 'SEX':
							$tmp1 = sprintf($maxDistinctCaseWhen, 'v_rh_view_1.sexe_id');
							break;
						case 'ANCMOY':
							$tmp1 = 'base.cti_avg_distinct_on
							(
								DISTINCT 
									(CASE WHEN 1=1
										AND v_rh_view_1.date_fin_activite BETWEEN @date_debut@ AND @date_fin@
									THEN ARRAY[salarie_id::numeric, anciennete_annee_id::numeric]
									ELSE null END)
							)';
							break;
						default :
							$tmp1 = 'null';
					}
					
					return str_replace(array('@date_debut@', '@date_fin@'), array($periodeDebut, $periodeFin), $tmp1) ;
				}
				
				// ?>
			EVAL]]]></value>
		</PROPERTY>
		<PROPERTY name="DATASQL">
			<value><![CDATA[[EVAL 
				// <?php
				
				return 
					RH000105_calcSQL('NBSAL') .','. PHP_EOL .
					RH000105_calcSQL('MOYAGE') .','. PHP_EOL .
					RH000105_calcSQL('[DATA01]') .','. PHP_EOL . 
					RH000105_calcSQL('[DATA02]') .','. PHP_EOL . 
					RH000105_calcSQL('[DATA03]') .','. PHP_EOL .
					RH000105_calcSQL('[DATA04]') .','. PHP_EOL . 
					RH000105_calcSQL('[DATA05]') .','. PHP_EOL . 
					RH000105_calcSQL('[DATA06]') .','. PHP_EOL .
					RH000105_calcSQL('[DATA07]') .','. PHP_EOL . 
					RH000105_calcSQL('[DATA08]') .','. PHP_EOL . 
					RH000105_calcSQL('[DATA09]') .','. PHP_EOL .
					RH000105_calcSQL('[DATA10]') .','. PHP_EOL . 
					RH000105_calcSQL('[DATA11]') .','. PHP_EOL . 
					RH000105_calcSQL('[DATA12]');
				
				// ?>
			EVAL]]]></value>
		</PROPERTY>
	</VIEWPROPERTIES>
	<SELECTIONS label="Paramètres de l'analyse" displayText="">
		<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="" UI="combo" tree="true" width="200" default="2014-01-01" globalListProvider="PERIODE_DEBUT" />
			<FIELD name="TOPERIODE" label="au" UI="combo" tree="true" width="200" default="2014-12-31" globalListProvider="PERIODE_FIN" />
		</GROUP>
		<GROUP label="Données (12 Max)">
			<FIELD name="DATA01" label="" UI="combo" width="210" default="0" default2="" tree="true" printable="false" showIfNotDefault="true">
				<OPTION label="" data="0" />
				<OPTION label="Options" data="" globalListProvider="DATA_AP" />
			</FIELD>
			<FIELD name="DATA02" label="" UI="combo" width="210" default="0" default2="0" tree="true" printable="false" selectable="false" showIfNotDefault="true" visible="= (SELECT.DATA01 != '0')">
				<OPTION label="" data="0" />
				<OPTION label="Options" data="" globalListProvider="DATA_AP" />
			</FIELD>
			<FIELD name="DATA03" label="" UI="combo" width="210" default="0" default2="0" tree="true" printable="false" showIfNotDefault="true" visible="= (SELECT.DATA01 != '0') &amp;&amp; ( SELECT.DATA02 != '0')">
				<OPTION label="" data="0" />
				<OPTION label="Options" data="" globalListProvider="DATA_AP" />
				<OPTION label="Options" data="" globalListProvider="DATA_EC" />
			</FIELD>
		</GROUP >
		<GROUP>
			<FIELD name="DATA04" label="" UI="combo" width="210" default="0" default2="0" tree="true" printable="false"  showIfNotDefault="true" visible="= (SELECT.DATA03 != '0') &amp;&amp; ( SELECT.DATA02 != '0') &amp;&amp; ( SELECT.DATA01 != '0')">
				<OPTION label="" data="0" />
				<OPTION label="Options" data="" globalListProvider="DATA_AP" />
				<OPTION label="Options" data="" globalListProvider="DATA_EC" />
			</FIELD>
			<FIELD name="DATA05" label="" UI="combo" width="210" default="0" default2="0" tree="true" printable="false"  showIfNotDefault="true" visible="= (SELECT.DATA03 != '0') &amp;&amp; ( SELECT.DATA02 != '0') &amp;&amp; ( SELECT.DATA01 != '0') &amp;&amp; ( SELECT.DATA04 != '0')">
				<OPTION label="" data="0" />
				<OPTION label="Options" data="" globalListProvider="DATA_AP" />
				<OPTION label="Options" data="" globalListProvider="DATA_EC" />
			</FIELD>
			<FIELD name="DATA06" label="" UI="combo" width="210" default="0" default2="0" tree="true" printable="false"  showIfNotDefault="true" visible="= (SELECT.DATA03 != '0') &amp;&amp; ( SELECT.DATA02 != '0') &amp;&amp; ( SELECT.DATA01 != '0') &amp;&amp; ( SELECT.DATA04 != '0') &amp;&amp; ( SELECT.DATA05 != '0')">
				<OPTION label="" data="0" />
				<OPTION label="Options" data="" globalListProvider="DATA_AP" />
				<OPTION label="Options" data="" globalListProvider="DATA_EC" />
			</FIELD>
		</GROUP>
		<GROUP>
			<FIELD name="DATA07" label="" UI="combo" width="210" default="0" default2="0" tree="true" printable="false"  showIfNotDefault="true" visible="= (SELECT.DATA05 != '0') &amp;&amp; ( SELECT.DATA06 != '0') &amp;&amp; ( SELECT.DATA04 != '0') &amp;&amp; (SELECT.DATA03 != '0') &amp;&amp; ( SELECT.DATA02 != '0') &amp;&amp; ( SELECT.DATA01 != '0')">
				<OPTION label="" data="0" />
				<OPTION label="Options" data="" globalListProvider="DATA_AP" />
				<OPTION label="Options" data="" globalListProvider="DATA_EC" />
			</FIELD>
			<FIELD name="DATA08" label="" UI="combo" width="210" default="0" default2="0" tree="true" printable="false"  showIfNotDefault="true" visible="= (SELECT.DATA05 != '0') &amp;&amp; ( SELECT.DATA06 != '0') &amp;&amp; ( SELECT.DATA04 != '0') &amp;&amp; (SELECT.DATA03 != '0') &amp;&amp; ( SELECT.DATA02 != '0') &amp;&amp; ( SELECT.DATA01 != '0') &amp;&amp; ( SELECT.DATA07 != '0')">
				<OPTION label="" data="0" />
				<OPTION label="Options" data="" globalListProvider="DATA_AP" />
				<OPTION label="Options" data="" globalListProvider="DATA_EC" />
			</FIELD>
			<FIELD name="DATA09" label="" UI="combo" width="210" default="0" default2="0" tree="true" printable="false"  showIfNotDefault="true" visible="= (SELECT.DATA05 != '0') &amp;&amp; ( SELECT.DATA06 != '0') &amp;&amp; ( SELECT.DATA04 != '0') &amp;&amp; (SELECT.DATA03 != '0') &amp;&amp; ( SELECT.DATA02 != '0') &amp;&amp; ( SELECT.DATA01 != '0') &amp;&amp; ( SELECT.DATA07 != '0') &amp;&amp; ( SELECT.DATA08 != '0')">
				<OPTION label="" data="0" />
				<OPTION label="Options" data="" globalListProvider="DATA_AP" />
				<OPTION label="Options" data="" globalListProvider="DATA_EC" />
			</FIELD>
		</GROUP>
		<GROUP>
			<FIELD name="DATA10" label="" UI="combo" width="210" default="0" default2="0" tree="true" printable="false"  showIfNotDefault="true" visible="= (SELECT.DATA09 != '0') &amp;&amp; ( SELECT.DATA08 != '0') &amp;&amp; ( SELECT.DATA07 != '0') &amp;&amp; (SELECT.DATA05 != '0') &amp;&amp; ( SELECT.DATA06 != '0') &amp;&amp; ( SELECT.DATA04 != '0') &amp;&amp; (SELECT.DATA03 != '0') &amp;&amp; ( SELECT.DATA02 != '0') &amp;&amp; ( SELECT.DATA01 != '0')">
				<OPTION label="" data="0" />
				<OPTION label="Options" data="" globalListProvider="DATA_AP" />
				<OPTION label="Options" data="" globalListProvider="DATA_EC" />
			</FIELD>
			<FIELD name="DATA11" label="" UI="combo" width="210" default="0" default2="0" tree="true" printable="false"  showIfNotDefault="true" visible="= (SELECT.DATA09 != '0') &amp;&amp; ( SELECT.DATA08 != '0') &amp;&amp; ( SELECT.DATA07 != '0')  &amp;&amp; (SELECT.DATA05 != '0') &amp;&amp; ( SELECT.DATA06 != '0') &amp;&amp; ( SELECT.DATA04 != '0') &amp;&amp; (SELECT.DATA03 != '0') &amp;&amp; ( SELECT.DATA02 != '0') &amp;&amp; ( SELECT.DATA01 != '0') &amp;&amp; ( SELECT.DATA10 != '0')">
				<OPTION label="" data="0" />
				<OPTION label="Options" data="" globalListProvider="DATA_AP" />
				<OPTION label="Options" data="" globalListProvider="DATA_EC" />
			</FIELD>
			<FIELD name="DATA12" label="" UI="combo" width="210" default="0" default2="0" tree="true" printable="false"  showIfNotDefault="true" visible="= (SELECT.DATA09 != '0') &amp;&amp; ( SELECT.DATA08 != '0') &amp;&amp; ( SELECT.DATA07 != '0') &amp;&amp; (SELECT.DATA05 != '0') &amp;&amp; ( SELECT.DATA06 != '0') &amp;&amp; ( SELECT.DATA04 != '0') &amp;&amp; (SELECT.DATA03 != '0') &amp;&amp; ( SELECT.DATA02 != '0') &amp;&amp; ( SELECT.DATA01 != '0') &amp;&amp; ( SELECT.DATA10 != '0') &amp;&amp; ( SELECT.DATA11 != '0')">
				<OPTION label="" data="0" />
				<OPTION label="Options" data="" globalListProvider="DATA_AP" />
				<OPTION label="Options" data="" globalListProvider="DATA_EC" />
			</FIELD>
		</GROUP>
		<GROUP label="Regroupement">
			<FIELD name="GROUPBY" label="" width="250" UI="combo" default="RUP" tree="true" >
				<OPTION label="Entreprise" data="ENT" treeLevel="1" globalListProvider="ENTREPRISE_GROUPBY"/>
				<OPTION label="Paie" data="RUP" treeLevel="1" globalListProvider="PAIE_GROUPBY"/>
				<OPTION label="[DICT.RH.SALARIE#1]" data="SAL" treeLevel="1" globalListProvider="SALARIE_GROUPBY"/>
				<OPTION label="[DICT.RH.CONTRAT#1]" data="CNT" treeLevel="1" globalListProvider="CONTRAT_GROUPBY"/>
				<OPTION label="Temporel" data="MOIACT" treeLevel="1" globalListProvider="TEMPOREL_PAIE_GROUPBY"/>
				<OPTION label="Référentiel SAE" data="REFERENTIEL_SAE" treeLevel="1" globalListProvider="REFERENTIEL_SAE_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 label="">
			<FIELD name="GROUPBY_2" label="" width="250" UI="combo" default="-1" tree="true" >
				<OPTION label="Pas de second niveau" data="-1"/>
				<OPTION label="Entreprise" data="ENT" treeLevel="1" globalListProvider="ENTREPRISE_GROUPBY"/>
				<OPTION label="Paie" data="RUP" treeLevel="1" globalListProvider="PAIE_GROUPBY"/>
				<OPTION label="[DICT.RH.SALARIE#1]" data="SAL" treeLevel="1" globalListProvider="SALARIE_GROUPBY"/>
				<OPTION label="[DICT.RH.CONTRAT#1]" data="CNT" treeLevel="1" globalListProvider="CONTRAT_GROUPBY"/>
				<OPTION label="Temporel" data="MOIACT" treeLevel="1" globalListProvider="TEMPOREL_PAIE_GROUPBY"/>
				<OPTION label="Référentiel SAE" data="REFERENTIEL_SAE" treeLevel="1" globalListProvider="REFERENTIEL_SAE_GROUPBY"/>
			</FIELD>
		</GROUP>
		<GROUP label="">
			<FIELD name="GROUPBY_3" label="" width="250" UI="combo" default="-1" tree="true" >
				<OPTION label="Pas de troisième niveau" data="-1"/>
				<OPTION label="Entreprise" data="ENT" treeLevel="1" globalListProvider="ENTREPRISE_GROUPBY"/>
				<OPTION label="Paie" data="RUP" treeLevel="1" globalListProvider="PAIE_GROUPBY"/>
				<OPTION label="[DICT.RH.SALARIE#1]" data="SAL" treeLevel="1" globalListProvider="SALARIE_GROUPBY"/>
				<OPTION label="[DICT.RH.CONTRAT#1]" data="CNT" treeLevel="1" globalListProvider="CONTRAT_GROUPBY"/>
				<OPTION label="Temporel" data="MOIACT" treeLevel="1" globalListProvider="TEMPOREL_PAIE_GROUPBY"/>
				<OPTION label="Référentiel SAE" data="REFERENTIEL_SAE" treeLevel="1" globalListProvider="REFERENTIEL_SAE_GROUPBY"/>
			</FIELD>
		</GROUP>
	</SELECTIONS>
	<SELECTIONS componentName="FILTRES_SALCNT_SOUSSELECTIONS"/>
	<SELECTIONS componentName="FILTRES_PAIE_SELECTIONS"/>
	<SELECTIONS componentName="FILTRES_SALARIES_SELECTIONS"/>
	<SELECTIONS componentName="FILTRES_CONTRATS_SELECTIONS"/>
	<SELECTIONS componentName="FILTRES_REFERENTIEL_SAE_SELECTIONS"/>
	<QUERIES>
		<QUERY label="">
			<SQL>
				<select><![CDATA[		
					CTISELECT_TREE
						GROUPBY1{[VIEW.GROUPBY_OID_FIELD],, [VIEW.GROUPBY_COD_FIELD],, [VIEW.GROUPBY_TXT_FIELD]}
						GROUPBY1MODE{[GROUPBY_TAB]}
						GROUPBY_2{[VIEW.GROUPBY_2_OID_FIELD],, [VIEW.GROUPBY_2_COD_FIELD],, [VIEW.GROUPBY_2_TXT_FIELD]}
						GROUPBY_3{[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 rh.v_historique_paie_1 v_rh_view_1
					WHERE 
						(v_rh_view_1.date_paie BETWEEN '[PERIODE]' AND '[TOPERIODE]' )
						[VIEW.SALARIES_SELECT]
						[VIEW.CONTRATS_SELECT]
						[VIEW.REFERENTIEL_SAE_SELECT]
						
						[VIEW.PAIE_SELECT]
				]]></select>
				<FIELDS>
					<INSERT name="CTISELECT_TREE_FIELDS" />
					<FIELD name="SORT" />
					<FIELD name="NBSAL" />
					<FIELD name="MOYAGE" />
					<FIELD name="D1" />
					<FIELD name="D2" />
					<FIELD name="D3" />
					<FIELD name="D4" />
					<FIELD name="D5" />
					<FIELD name="D6" />
					<FIELD name="D7" />
					<FIELD name="D8" />
					<FIELD name="D9" />
					<FIELD name="D10" />
					<FIELD name="D11" />
					<FIELD name="D12" />
				</FIELDS>
			</SQL>
		</QUERY>
		<QUERY type="propertiesLink" name="VIEWPROPERTIES" forSelections="false">
				<SQL>
					<select><![CDATA[
							SELECT 'X_PERIODE_D', greatest(to_date(to_char('[PERIODE]'::date - INTERVAL  '1 year', 'YYYY-MM-DD'), 'YYYY-MM-DD'), (SELECT min(date_debut) FROM pmsi.p_imports))::text
						UNION ALL
							SELECT 'X_TOPERIODE_D', greatest(to_date(to_char('[TOPERIODE]'::date - INTERVAL  '1 year', 'YYYY-MM-DD'), 'YYYY-MM-DD'), (SELECT min(date_debut) FROM pmsi.p_imports))::text
					]]></select>
					<FIELDS>
						<FIELD name="name"/>
						<FIELD name="value"/>
					</FIELDS>
				</SQL>
			</QUERY>
	</QUERIES>
	<PRESENTATION>
		<VIEWLINKS>
			<VIEWLINK label="Comparatif" shortLabel="Comparatif" view="RH000017.XML" enabled="true" rowContext="false" buttonType="COMPARATIF">
				<ARG name="PERIODE_D" value="return VIEW.X_PERIODE_D;" />
				<ARG name="TOPERIODE_D" value="return VIEW.X_TOPERIODE_D;" />
				<ARG name="DATA1" value="'NBSAL'" />
				<ARG name="DATA2" value="return SELECT.DATA01" />
				<ARG name="DATA3" value="return SELECT.DATA02" />
				<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;" />
			</VIEWLINK>
			<VIEWLINK label="Evolution" shortLabel="Evolution" view="RH000015.XML" enabled="true" rowContext="false" componentName="PERIODICITE_VIEWLINK" buttonType="EVOLUTION">
				<ARG name="DATA" value="return SELECT.DATA01" />
			</VIEWLINK>
			<VIEWLINK label="Analyse croisée" shortLabel="Analyse croisée" view="RH000016.XML" enabled="true" rowContext="false" buttonType="ANALYSE_CROISEE">
				<ARG name="PERIODE" value="return VIEW.PERIODE;" />
				<ARG name="TOPERIODE" value="return VIEW.TOPERIODE;" />
				<ARG name="DATA" value="return SELECT.DATA01" />
				<ARG name="COLUMNBY" value="'UP'" />
				<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'" />
				<ARG name="COLUMNBYCOUNT" value="'12'" />
			</VIEWLINK>
			<VIEWLINK label="Justificatif paie" shortLabel="Justificatif paie" view="RH000011.XML" componentName="RH_VIEWLINK" >
				<ARGS name="SPEC" >
					<value><![CDATA[
						LINKVARIABLES['GROUPBY_2'] = 'SAL'
						return 'OK';
					]]></value>
				</ARGS>
			</VIEWLINK>
		</VIEWLINKS>
		<ONGLET excelLabel="Comparaison" label="Comparaison" multiTab="true" multiTabBreakField="TABD" multiTabBreakLabelField="TABDL" multiTabBreakLonglabelField="TABDLL">
			<CHART title="" type="group" subType="h" percentHeight="100">
				<CHART title="Nombre de [DICT.RH.SALARIE#3]" type="pieChart" subType="" maxItems="10" maxItemsSortOn="NBSAL" maxItemsSortSeq="D" sortField="CODTXT" sortSeq="D" condition="ROW.LVL == '1'">
					<CATEGORY field="CODTXT" type="Char" />
					<SERIE field="NBSAL" displayName="Nombre de [DICT.RH.SALARIE#3]" />
				</CHART>
				<CHART title="Répartition 1ère donnée" type="pieChart" subType="" maxItems="10" maxItemsSortOn="D1" maxItemsSortSeq="D" sortField="CODTXT" sortSeq="D" condition="ROW.LVL == '1'">
					<CATEGORY field="CODTXT" type="Char" />
					<SERIE field="D1" displayName="SELECT.DATA01_LABEL " displayNameCalc="true"/>
				</CHART>
				<CHART title="Répartition 2ème donnée" type="pieChart" subType="" maxItems="10" maxItemsSortOn="D2" maxItemsSortSeq="D" sortField="CODTXT" sortSeq="D" condition="ROW.LVL == '1'">
					<CATEGORY field="CODTXT" type="Char" />
					<SERIE field="D2" displayName="SELECT.DATA02_LABEL " displayNameCalc="true"/>
				</CHART>
			</CHART>
			<DATAGRID title="" total="true" showOthers="true" headerHeight="50" 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="NBSAL" type="Number" width="80" outputFormat="#" selectable="true" headerText="Nombre de [DICT.RH.SALARIE#3]" otherFunction="text" totalFunction="text" description="Nombre de [DICT.RH.SALARIE#3] distinct"/>
				<COLUMN dataField="P_RSA" type="Number" headerText="% [DICT.RH.SALARIE#1]" width="50" selectable="true" outputFormat="#,0%" textAlign="right" totalFunction="calc" totalComplement="" otherFunction="calc" calc="true"
					description="Poids du nombre de [DICT.RH.SALARIE#2] du critère de regroupement dans le nombre de [DICT.RH.SALARIE#2] Total">
					<CALC formula="ROW.NBSAL / TOTALROW.NBSAL * 100" />
				</COLUMN>
				<COLUMN dataField="MOYAGE" type="Number" width="80" outputFormat="#" selectable="true" visible="false" headerText="Moyenne d'age" />
				<COLUMN dataField="D1" type="Number" width="90" outputFormat="= SELECT.DATA012" selectable="true" headerText="SELECT.DATA01_LABEL" headerTextCalc="true" description=" " visible="false" />
				<COLUMN dataField="D1_2" type="Number" width="= if (SELECT.DATA01 == 'SEX' || SELECT.DATA01 == 'AGE') {return 30} else {return 90}" textAlign="right" fixed="false" outputFormat="= SELECT.DATA012" selectable="true" headerText="SELECT.DATA01_LABEL" headerTextCalc="true" description="= SELECT.DATA013 " visibleCondition="SELECT.DATA01 != '0'" totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
				<CALC formula="
					switch(SELECT.DATA01) {
						case 'AGE' :
							if (SELECT.GROUPBY == 'SAL' || SELECT.GROUPBY2 == 'SAL' || SELECT.GROUPBY3 == 'SAL' )
							{return ROW.D1;}
							else {return ROW.MOYAGE;}
							break;
						case 'SEX' :
							if (SELECT.GROUPBY == 'SAL' || SELECT.GROUPBY_2 == 'SAL' || SELECT.GROUPBY_3 == 'SAL' )
							{return NULL;}
							else {return NULL;}
							break;
						default :
							return ROW.D1;
							break;
					}" />
					<CELLSTYLE name="cellIndicator" value="femme, 12,right middle , 0xEB76B1" condition="ROW.D1 == '2' &amp;&amp; SELECT.DATA01 == 'SEX' " /> 
					<CELLSTYLE name="cellIndicator" value="homme, 12,right middle , 0x75a0eb " condition="ROW.D1== '1' &amp;&amp; SELECT.DATA01 == 'SEX' " /> 
					<CELLSTYLE name="cellIndicator" value="rectangle, 10, right middle, 0x666666" condition="ROW.D1 != '2' &amp;&amp; ROW.D1 != '1' &amp;&amp; SELECT.DATA01 == 'SEX' " />
				</COLUMN>
				<COLUMN dataField="D2" type="Number" width="90" outputFormat="= SELECT.DATA022" selectable="true" headerText="SELECT.DATA02_LABEL" headerTextCalc="true" description=" " visible="false" />
				<COLUMN dataField="D2_2" type="Number" width="= if (SELECT.DATA02 == 'SEX' || SELECT.DATA02 == 'AGE') {return 30} else {return 90}" outputFormat="= SELECT.DATA022" selectable="true" headerText="SELECT.DATA02_LABEL" headerTextCalc="true" description="= SELECT.DATA023 " visibleCondition="SELECT.DATA02 != '0' &amp;&amp; SELECT.DATA01 != '0'" totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
				<CALC formula="
					switch(SELECT.DATA02) {
						case 'AGE' :
							if (SELECT.GROUPBY == 'SAL' || SELECT.GROUPBY2 == 'SAL' || SELECT.GROUPBY3 == 'SAL' )
							{return ROW.D2;}
							else {return ROW.MOYAGE;}
							break;
						case 'SEX' :
							if (SELECT.GROUPBY == 'SAL' || SELECT.GROUPBY_2 == 'SAL' || SELECT.GROUPBY_3 == 'SAL' )
							{return NULL;}
							else {return NULL;}
							break;
						default :
							return ROW.D2;
							break;
					}" />
					<CELLSTYLE name="cellIndicator" value="femme, 12,right middle , 0xEB76B1" condition="ROW.D2 == '2' &amp;&amp; SELECT.DATA02 == 'SEX' " /> 
					<CELLSTYLE name="cellIndicator" value="homme, 12,right middle , 0x75a0eb " condition="ROW.D2== '1' &amp;&amp; SELECT.DATA02 == 'SEX' " /> 
					<CELLSTYLE name="cellIndicator" value="rectangle, 10, right middle, 0x666666" condition="ROW.D2 != '2' &amp;&amp; ROW.D2 != '1' &amp;&amp; SELECT.DATA02 == 'SEX' " />
				</COLUMN>
				<COLUMN dataField="D3" type="Number" width="90" outputFormat="= SELECT.DATA032" selectable="true" headerText="SELECT.DATA03_LABEL" headerTextCalc="true" description=" " visible="false" />
				<COLUMN dataField="D3_2" type="Number" width="= if (SELECT.DATA03 == 'SEX' || SELECT.DATA03 == 'AGE') {return 30} else {return 90}" outputFormat="= if(SELECT.DATA03=='4.3'){return SELECT.DATA012} else { return SELECT.DATA032}" selectable="true" headerText="SELECT.DATA03_LABEL" headerTextCalc="true" description="= SELECT.DATA033" visibleCondition="SELECT.DATA03 != '0' &amp;&amp; SELECT.DATA02 != '0' &amp;&amp; SELECT.DATA01 != '0'" totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
					<CALC formula="
					switch(SELECT.DATA03) {
						case '4.2' :
							return ROW.D2 / TOTALROW.D2 * 100;
							break;
						case '4.3' :
							return ROW.D1 - ROW.D2;
							break;
						case '4.4' :
							return ((ROW.D1 - ROW.D2)/ ROW.D1 * 100);
							break;
						case 'AGE' :
							if (SELECT.GROUPBY == 'SAL' || SELECT.GROUPBY_2 == 'SAL' || SELECT.GROUPBY_3 == 'SAL' )
							{return ROW.D3;}
							else {return ROW.MOYAGE;}
							break;
						case 'SEX' :
							if (SELECT.GROUPBY == 'SAL' || SELECT.GROUPBY_2 == 'SAL' || SELECT.GROUPBY_3 == 'SAL' )
							{return NULL;}
							else {return NULL;}
							break;
						default :
							return ROW.D3;
							break;
					}" />
					<CELLSTYLE name="cellIndicator" value="femme, 12,right middle , 0xEB76B1" condition="ROW.D3 == '2' &amp;&amp; SELECT.DATA03 == 'SEX' " /> 
					<CELLSTYLE name="cellIndicator" value="homme, 12,right middle , 0x75a0eb " condition="ROW.D3== '1' &amp;&amp; SELECT.DATA03 == 'SEX' " /> 
					<CELLSTYLE name="cellIndicator" value="rectangle, 10, right middle, 0x666666" condition="ROW.D3 != '2' &amp;&amp; ROW.D3 != '1' &amp;&amp; SELECT.DATA03 == 'SEX' " />
				</COLUMN>
				<COLUMN dataField="D4" type="Number" width="90" outputFormat="= SELECT.DATA042" selectable="true" headerText="SELECT.DATA04_LABEL" headerTextCalc="true" description=" " visible="false" />
				<COLUMN dataField="D4_2" type="Number" width="= if (SELECT.DATA04 == 'SEX' || SELECT.DATA04 == 'AGE') {return 30} else {return 90}" outputFormat="=  if(SELECT.DATA04=='4.3'){return SELECT.DATA022} else { return SELECT.DATA042}" selectable="true" headerText="SELECT.DATA04_LABEL" headerTextCalc="true" description="= SELECT.DATA043 " visibleCondition="SELECT.DATA04 != '0' &amp;&amp; SELECT.DATA03 != '0' &amp;&amp; SELECT.DATA02 != '0' &amp;&amp; SELECT.DATA01 != '0'" totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
					<CALC formula="
					switch(SELECT.DATA04) {
						case '4.2' :
							return ROW.D3 / TOTALROW.D3 * 100;
							break;
						case '4.3' :
							return ROW.D2 - ROW.D3;
							break;
						case '4.4' :
							return ((ROW.D2 - ROW.D3)/ ROW.D2 * 100);
							break;
						case 'AGE' :
							if (SELECT.GROUPBY == 'SAL' || SELECT.GROUPBY_2 == 'SAL' || SELECT.GROUPBY_3 == 'SAL' )
							{return ROW.D4;}
							else {return ROW.MOYAGE;}
							break;
						case 'SEX' :
							if (SELECT.GROUPBY == 'SAL' || SELECT.GROUPBY_2 == 'SAL' || SELECT.GROUPBY_3 == 'SAL' )
							{return NULL;}
							else {return NULL;}
							break;
						default :
							return ROW.D4;
							break;
					}" />
					<CELLSTYLE name="cellIndicator" value="femme, 12,right middle , 0xEB76B1" condition="ROW.D4 == '2' &amp;&amp; SELECT.DATA04 == 'SEX' " /> 
					<CELLSTYLE name="cellIndicator" value="homme, 12,right middle , 0x75a0eb " condition="ROW.D4== '1' &amp;&amp; SELECT.DATA04 == 'SEX' " /> 
					<CELLSTYLE name="cellIndicator" value="rectangle, 10, right middle, 0x666666" condition="ROW.D4 != '2' &amp;&amp; ROW.D4 != '1' &amp;&amp; SELECT.DATA04 == 'SEX' " />
				</COLUMN>
				<COLUMN dataField="D5" type="Number" width="90" outputFormat="= SELECT.DATA052" selectable="true" headerText="SELECT.DATA05_LABEL" headerTextCalc="true" description=" " visible="false" />
				<COLUMN dataField="D5_2" type="Number" width="= if (SELECT.DATA05 == 'SEX' || SELECT.DATA05 == 'AGE') {return 30} else {return 90}" outputFormat="= if(SELECT.DATA05=='4.3'){return SELECT.DATA032} else { return SELECT.DATA052}" selectable="true" headerText="SELECT.DATA05_LABEL" headerTextCalc="true" description="= SELECT.DATA053 " visibleCondition="SELECT.DATA05 != '0' &amp;&amp; SELECT.DATA04 != '0' &amp;&amp; SELECT.DATA03 != '0' &amp;&amp; SELECT.DATA02 != '0' &amp;&amp; SELECT.DATA01 != '0'" totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
				<CALC formula="
					switch(SELECT.DATA05) {
						case '4.2' :
							return ROW.D4 / TOTALROW.D4 * 100;
							break;
						case '4.3' :
							return ROW.D3 - ROW.D4;
							break;
						case '4.4' :
							return ((ROW.D3 - ROW.D4)/ ROW.D3 * 100);
							break;
						case 'AGE' :
							if (SELECT.GROUPBY == 'SAL' || SELECT.GROUPBY_2 == 'SAL' || SELECT.GROUPBY_3 == 'SAL' )
							{return ROW.D5;}
							else {return ROW.MOYAGE;}
							break;
						case 'SEX' :
							if (SELECT.GROUPBY == 'SAL' || SELECT.GROUPBY_2 == 'SAL' || SELECT.GROUPBY_3 == 'SAL' )
							{return NULL;}
							else {return NULL;}
							break;
						default :
							return ROW.D5;
							break;
					}" />
					<CELLSTYLE name="cellIndicator" value="femme, 12,right middle , 0xEB76B1" condition="ROW.D5 == '2' &amp;&amp; SELECT.DATA05 == 'SEX' " /> 
					<CELLSTYLE name="cellIndicator" value="homme, 12,right middle , 0x75a0eb " condition="ROW.D5== '1' &amp;&amp; SELECT.DATA05 == 'SEX' " /> 
					<CELLSTYLE name="cellIndicator" value="rectangle, 10, right middle, 0x666666" condition="ROW.D5 != '2' &amp;&amp; ROW.D5 != '1' &amp;&amp; SELECT.DATA05 == 'SEX' " />
				</COLUMN>
				<COLUMN dataField="D6" type="Number" width="90" outputFormat="= SELECT.DATA062" selectable="true" headerText="SELECT.DATA06_LABEL" headerTextCalc="true" description=" " visible="false" />
				<COLUMN dataField="D6_2" type="Number" width="= if (SELECT.DATA06 == 'SEX' || SELECT.DATA06 == 'AGE') {return 30} else {return 90}" outputFormat="= if(SELECT.DATA06=='4.3'){return SELECT.DATA042} else { return SELECT.DATA062}" selectable="true" headerText="SELECT.DATA06_LABEL" headerTextCalc="true" description="= SELECT.DATA063 " visibleCondition="SELECT.DATA06 != '0' &amp;&amp; SELECT.DATA05 != '0' &amp;&amp; SELECT.DATA04 != '0' &amp;&amp; SELECT.DATA03 != '0' &amp;&amp; SELECT.DATA02 != '0' &amp;&amp; SELECT.DATA01 != '0'" totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
				<CALC formula="
					switch(SELECT.DATA06) {
						case '4.2' :
							return ROW.D5 / TOTALROW.D5 * 100;
							break;
						case '4.3' :
							return ROW.D4 - ROW.D5;
							break;
						case '4.4' :
							return ((ROW.D4 - ROW.D5)/ ROW.D4 * 100);
							break;
						case 'AGE' :
							if (SELECT.GROUPBY == 'SAL' || SELECT.GROUPBY_2 == 'SAL' || SELECT.GROUPBY_3 == 'SAL' )
							{return ROW.D6;}
							else {return ROW.MOYAGE;}
							break;
						case 'SEX' :
							if (SELECT.GROUPBY == 'SAL' || SELECT.GROUPBY_2 == 'SAL' || SELECT.GROUPBY_3 == 'SAL' )
							{return NULL;}
							else {return NULL;}
							break;
						default :
							return ROW.D6;
							break;
					}" />
					<CELLSTYLE name="cellIndicator" value="femme, 12,right middle , 0xEB76B1" condition="ROW.D6 == '2' &amp;&amp; SELECT.DATA06 == 'SEX' " /> 
					<CELLSTYLE name="cellIndicator" value="homme, 12,right middle , 0x75a0eb " condition="ROW.D6== '1' &amp;&amp; SELECT.DATA06 == 'SEX' " /> 
					<CELLSTYLE name="cellIndicator" value="rectangle, 10, right middle, 0x666666" condition="ROW.D6 != '2' &amp;&amp; ROW.D6 != '1' &amp;&amp; SELECT.DATA06 == 'SEX' " />
				</COLUMN>
				<COLUMN dataField="D7" type="Number" width="90" outputFormat="= SELECT.DATA072" selectable="true" headerText="SELECT.DATA07_LABEL" headerTextCalc="true" description=" " visible="false" />
				<COLUMN dataField="D7_2" type="Number" width="= if (SELECT.DATA07 == 'SEX' || SELECT.DATA07 == 'AGE') {return 30} else {return 90}" outputFormat="= if(SELECT.DATA07=='4.3'){return SELECT.DATA052} else { return SELECT.DATA072}" selectable="true" headerText="SELECT.DATA07_LABEL" headerTextCalc="true" description="= SELECT.DATA073 " visibleCondition="SELECT.DATA07 != '0' &amp;&amp; SELECT.DATA06 != '0' &amp;&amp; SELECT.DATA05 != '0' &amp;&amp; SELECT.DATA04 != '0' &amp;&amp; SELECT.DATA03 != '0' &amp;&amp; SELECT.DATA02 != '0' &amp;&amp; SELECT.DATA01 != '0'" totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
				<CALC formula="
					switch(SELECT.DATA07) {
						case '4.2' :
							return ROW.D6 / TOTALROW.D6 * 100;
							break;
						case '4.3' :
							return ROW.D5 - ROW.D6;
							break;
						case '4.4' :
							return ((ROW.D5 - ROW.D6)/ ROW.D5 * 100);
							break;
						case 'AGE' :
							if (SELECT.GROUPBY == 'SAL' || SELECT.GROUPBY_2 == 'SAL' || SELECT.GROUPBY_3 == 'SAL' )
							{return ROW.D7;}
							else {return ROW.MOYAGE;}
							break;
						case 'SEX' :
							if (SELECT.GROUPBY == 'SAL' || SELECT.GROUPBY_2 == 'SAL' || SELECT.GROUPBY_3 == 'SAL' )
							{return NULL;}
							else {return NULL;}
							break;
						default :
							return ROW.D7;
							break;
					}" />
					<CELLSTYLE name="cellIndicator" value="femme, 12,right middle , 0xEB76B1" condition="ROW.D7 == '2' &amp;&amp; SELECT.DATA07 == 'SEX' " /> 
					<CELLSTYLE name="cellIndicator" value="homme, 12,right middle , 0x75a0eb " condition="ROW.D7== '1' &amp;&amp; SELECT.DATA07 == 'SEX' " /> 
					<CELLSTYLE name="cellIndicator" value="rectangle, 10, right middle, 0x666666" condition="ROW.D7 != '2' &amp;&amp; ROW.D7 != '1' &amp;&amp; SELECT.DATA07 == 'SEX' " />
				</COLUMN>
				<COLUMN dataField="D8" type="Number" width="90" outputFormat="= SELECT.DATA082" selectable="true" headerText="SELECT.DATA08_LABEL" headerTextCalc="true" description=" " visible="false" />
				<COLUMN dataField="D8_2" type="Number" width="= if (SELECT.DATA08 == 'SEX' || SELECT.DATA08 == 'AGE') {return 30} else {return 90}" outputFormat="= if(SELECT.DATA08=='4.3'){return SELECT.DATA062} else { return SELECT.DATA082}" selectable="true" headerText="SELECT.DATA08_LABEL" headerTextCalc="true" description="= SELECT.DATA083" visibleCondition="SELECT.DATA08 != '0' &amp;&amp; SELECT.DATA07 != '0' &amp;&amp; SELECT.DATA06 != '0' &amp;&amp; SELECT.DATA05 != '0' &amp;&amp; SELECT.DATA04 != '0' &amp;&amp; SELECT.DATA03 != '0' &amp;&amp; SELECT.DATA02 != '0' &amp;&amp; SELECT.DATA01 != '0'" totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
				<CALC formula="
					switch(SELECT.DATA08) {
						case '4.2' :
							return ROW.D7 / TOTALROW.D7 * 100;
							break;
						case '4.3' :
							return ROW.D6 - ROW.D7;
							break;
						case '4.4' :
							return ((ROW.D6 - ROW.D7)/ ROW.D6 * 100);
							break;
						case 'AGE' :
							if (SELECT.GROUPBY == 'SAL' || SELECT.GROUPBY_2 == 'SAL' || SELECT.GROUPBY_3 == 'SAL' )
							{return ROW.D8;}
							else {return ROW.MOYAGE;}
							break;
						case 'SEX' :
							if (SELECT.GROUPBY == 'SAL' || SELECT.GROUPBY_2 == 'SAL' || SELECT.GROUPBY_3 == 'SAL' )
							{return NULL;}
							else {return NULL;}
							break;
						default :
							return ROW.D8;
							break;
					}" />
					<CELLSTYLE name="cellIndicator" value="femme, 12,right middle , 0xEB76B1" condition="ROW.D8 == '2' &amp;&amp; SELECT.DATA08 == 'SEX' " /> 
					<CELLSTYLE name="cellIndicator" value="homme, 12,right middle , 0x75a0eb " condition="ROW.D8== '1' &amp;&amp; SELECT.DATA08 == 'SEX' " /> 
					<CELLSTYLE name="cellIndicator" value="rectangle, 10, right middle, 0x666666" condition="ROW.D8 != '2' &amp;&amp; ROW.D8 != '1' &amp;&amp; SELECT.DATA08 == 'SEX' " />
				</COLUMN>
				<COLUMN dataField="D9" type="Number" width="90" outputFormat="= SELECT.DATA092" selectable="true" headerText="SELECT.DATA09_LABEL" headerTextCalc="true" description=" " visible="false" />
				<COLUMN dataField="D9_2" type="Number" width="= if (SELECT.DATA09 == 'SEX' || SELECT.DATA09 == 'AGE') {return 30} else {return 90}" outputFormat="= if(SELECT.DATA09=='4.3'){return SELECT.DATA072} else { return SELECT.DATA092}" selectable="true" headerText="SELECT.DATA09_LABEL" headerTextCalc="true" description="= SELECT.DATA093 " visibleCondition="SELECT.DATA09 != '0' &amp;&amp; SELECT.DATA08 != '0' &amp;&amp; SELECT.DATA07 != '0' &amp;&amp; SELECT.DATA06 != '0' &amp;&amp; SELECT.DATA05 != '0' &amp;&amp; SELECT.DATA04 != '0' &amp;&amp; SELECT.DATA03 != '0' &amp;&amp; SELECT.DATA02 != '0' &amp;&amp; SELECT.DATA01 != '0'" totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
				<CALC formula="
					switch(SELECT.DATA09) {
						case '4.2' :
							return ROW.D8 / TOTALROW.D8 * 100;
							break;
						case '4.3' :
							return ROW.D7 - ROW.D8;
							break;
						case '4.4' :
							return ((ROW.D7 - ROW.D8)/ ROW.D7 * 100);
							break;
						case 'AGE' :
							if (SELECT.GROUPBY == 'SAL' || SELECT.GROUPBY_2 == 'SAL' || SELECT.GROUPBY_3 == 'SAL' )
							{return ROW.D9;}
							else {return ROW.MOYAGE;}
							break;
						case 'SEX' :
							if (SELECT.GROUPBY == 'SAL' || SELECT.GROUPBY_2 == 'SAL' || SELECT.GROUPBY_3 == 'SAL' )
							{return NULL;}
							else {return NULL;}
							break;
						default :
							return ROW.D9;
							break;
					}" />
					<CELLSTYLE name="cellIndicator" value="femme, 12,right middle , 0xEB76B1" condition="ROW.D9 == '2' &amp;&amp; SELECT.DATA09 == 'SEX' " /> 
					<CELLSTYLE name="cellIndicator" value="homme, 12,right middle , 0x75a0eb " condition="ROW.D9== '1' &amp;&amp; SELECT.DATA09 == 'SEX' " /> 
					<CELLSTYLE name="cellIndicator" value="rectangle, 10, right middle, 0x666666" condition="ROW.D9 != '2' &amp;&amp; ROW.D9 != '1' &amp;&amp; SELECT.DATA09 == 'SEX' " />
				</COLUMN>
				<COLUMN dataField="D10" type="Number" width="90" outputFormat="= SELECT.DATA102" selectable="true" headerText="SELECT.DATA10_LABEL" headerTextCalc="true" description=" " visible="false" />
				<COLUMN dataField="D10_2" type="Number" width="= if (SELECT.DATA010 == 'SEX' || SELECT.DATA010 == 'AGE') {return 30} else {return 90}" outputFormat="= if(SELECT.DATA10=='4.3'){return SELECT.DATA082} else { return SELECT.DATA102}" selectable="true" headerText=" SELECT.DATA10_LABEL" headerTextCalc="true" description="= SELECT.DATA103 " visibleCondition="SELECT.DATA10 != '0' &amp;&amp; SELECT.DATA09 != '0' &amp;&amp; SELECT.DATA08 != '0' &amp;&amp; SELECT.DATA07 != '0' &amp;&amp; SELECT.DATA06 != '0' &amp;&amp; SELECT.DATA05 != '0' &amp;&amp; SELECT.DATA04 != '0' &amp;&amp; SELECT.DATA03 != '0' &amp;&amp; SELECT.DATA02 != '0' &amp;&amp; SELECT.DATA01 != '0'" totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
				<CALC formula="
					switch(SELECT.DATA10) {
						case '4.2' :
							return ROW.D9 / TOTALROW.D9 * 100;
							break;
						case '4.3' :
							return ROW.D8 - ROW.D9;
							break;
						case '4.4' :
							return ((ROW.D8 - ROW.D9)/ ROW.D8 * 100);
							break;
						case 'AGE' :
							if (SELECT.GROUPBY == 'SAL' || SELECT.GROUPBY_2 == 'SAL' || SELECT.GROUPBY_3 == 'SAL' )
							{return ROW.D10;}
							else {return ROW.MOYAGE;}
							break;
						case 'SEX' :
							if (SELECT.GROUPBY == 'SAL' || SELECT.GROUPBY_2 == 'SAL' || SELECT.GROUPBY_3 == 'SAL' )
							{return NULL;}
							else {return NULL;}
							break;
						default :
							return ROW.D10;
							break;
					}" />
					<CELLSTYLE name="cellIndicator" value="femme, 12,right middle , 0xEB76B1" condition="ROW.D10 == '2' &amp;&amp; SELECT.DATA010 == 'SEX' " /> 
					<CELLSTYLE name="cellIndicator" value="homme, 12,right middle , 0x75a0eb " condition="ROW.D10== '1' &amp;&amp; SELECT.DATA010 == 'SEX' " /> 
					<CELLSTYLE name="cellIndicator" value="rectangle, 10, right middle, 0x666666" condition="ROW.D10 != '2' &amp;&amp; ROW.D10 != '1' &amp;&amp; SELECT.DATA010 == 'SEX' " />
				</COLUMN>
				<COLUMN dataField="D11" type="Number" width="90" outputFormat="= SELECT.DATA112" selectable="true" headerText="SELECT.DATA11_LABEL" headerTextCalc="true" description=" " visible="false" />
				<COLUMN dataField="D11_2" type="Number" width="= if (SELECT.DATA011 == 'SEX' || SELECT.DATA011 == 'AGE') {return 30} else {return 90}" outputFormat="= if(SELECT.DATA11=='4.3'){return SELECT.DATA092} else { return SELECT.DATA112}" selectable="true" headerText=" SELECT.DATA11_LABEL" headerTextCalc="true" description="= SELECT.DATA113" visibleCondition="SELECT.DATA11 != '0' &amp;&amp; SELECT.DATA10 != '0' &amp;&amp; SELECT.DATA09 != '0' &amp;&amp; SELECT.DATA08 != '0' &amp;&amp; SELECT.DATA07 != '0' &amp;&amp; SELECT.DATA06 != '0' &amp;&amp; SELECT.DATA05 != '0' &amp;&amp; SELECT.DATA04 != '0' &amp;&amp; SELECT.DATA03 != '0' &amp;&amp; SELECT.DATA02 != '0' &amp;&amp; SELECT.DATA01 != '0'" totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
				<CALC formula="
					switch(SELECT.DATA11) {
						case '4.2' :
							return ROW.D10 / TOTALROW.D10 * 100;
							break;
						case '4.3' :
							return ROW.D9 - ROW.D10;
							break;
						case '4.4' :
							return ((ROW.D9 - ROW.D10)/ ROW.D9 * 100);
							break;
						case 'AGE' :
							if (SELECT.GROUPBY == 'SAL' || SELECT.GROUPBY_2 == 'SAL' || SELECT.GROUPBY_3 == 'SAL' )
							{return ROW.D11;}
							else {return ROW.MOYAGE;}
							break;
						case 'SEX' :
							if (SELECT.GROUPBY == 'SAL' || SELECT.GROUPBY_2 == 'SAL' || SELECT.GROUPBY_3 == 'SAL' )
							{return NULL;}
							else {return NULL;}
							break;
						default :
							return ROW.D11;
							break;
					}" />
					<CELLSTYLE name="cellIndicator" value="femme, 12,right middle , 0xEB76B1" condition="ROW.D11 == '2' &amp;&amp; SELECT.DATA011 == 'SEX' " /> 
					<CELLSTYLE name="cellIndicator" value="homme, 12,right middle , 0x75a0eb " condition="ROW.D11== '1' &amp;&amp; SELECT.DATA011 == 'SEX' " /> 
					<CELLSTYLE name="cellIndicator" value="rectangle, 10, right middle, 0x666666" condition="ROW.D11 != '2' &amp;&amp; ROW.D11 != '1' &amp;&amp; SELECT.DATA011 == 'SEX' " />
				</COLUMN>
				<COLUMN dataField="D12" type="Number" width="90" outputFormat="= SELECT.DATA122" selectable="true" headerText="SELECT.DATA12_LABEL" headerTextCalc="true" description=" " visible="false" />
				<COLUMN dataField="D12_2" type="Number" width="= if (SELECT.DATA012 == 'SEX' || SELECT.DATA012 == 'AGE') {return 30} else {return 90}" outputFormat="= if(SELECT.DATA12=='4.3'){return SELECT.DATA102} else { return SELECT.DATA122}" selectable="true" headerText=" SELECT.DATA12_LABEL" headerTextCalc="true" description="= SELECT.DATA123" visibleCondition="SELECT.DATA12 != '0' &amp;&amp; SELECT.DATA11 != '0' &amp;&amp; SELECT.DATA10 != '0' &amp;&amp; SELECT.DATA09 != '0' &amp;&amp; SELECT.DATA08 != '0' &amp;&amp; SELECT.DATA07 != '0' &amp;&amp; SELECT.DATA06 != '0' &amp;&amp; SELECT.DATA05 != '0' &amp;&amp; SELECT.DATA04 != '0' &amp;&amp; SELECT.DATA03 != '0' &amp;&amp; SELECT.DATA02 != '0' &amp;&amp; SELECT.DATA01 != '0'" totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
				<CALC formula="
					switch(SELECT.DATA12) {
						case '4.2' :
							return ROW.D11 / TOTALROW.D11 * 100;
							break;
						case '4.3' :
							return ROW.D10 - ROW.D11;
							break;
						case '4.4' :
							return ((ROW.D10 - ROW.D11)/ ROW.D10 * 100);
							break;
						case 'AGE' :
							if (SELECT.GROUPBY == 'SAL' || SELECT.GROUPBY_2 == 'SAL' || SELECT.GROUPBY_3 == 'SAL' )
							{return ROW.D12;}
							else {return ROW.MOYAGE;}
							break;
						case 'SEX' :
							if (SELECT.GROUPBY == 'SAL' || SELECT.GROUPBY_2 == 'SAL' || SELECT.GROUPBY_3 == 'SAL' )
							{return NULL;}
							else {return NULL;}
							break;
						default :
							return ROW.D12;
							break;
					}" />
					<CELLSTYLE name="cellIndicator" value="femme, 12,right middle , 0xEB76B1" condition="ROW.D12 == '2' &amp;&amp; SELECT.DATA012 == 'SEX' " /> 
					<CELLSTYLE name="cellIndicator" value="homme, 12,right middle , 0x75a0eb " condition="ROW.D12== '1' &amp;&amp; SELECT.DATA012 == 'SEX' " /> 
					<CELLSTYLE name="cellIndicator" value="rectangle, 10, right middle, 0x666666" condition="ROW.D12 != '2' &amp;&amp; ROW.D12 != '1' &amp;&amp; SELECT.DATA012 == 'SEX' " />
				</COLUMN>
			</DATAGRID>
		</ONGLET>
	</PRESENTATION>
</VUE>
