<?xml version="1.0" encoding="ISO-8859-1"?>
<VUE name="ACTI000137" label="Activité. Analyse croisée superviseur d'activité " title="= SELECT.PERIODICITE_LABEL + ' - ' +  SELECT.DATA_LABEL + ' par ' +  SELECT.GROUPBY_LABEL + ' (' + SELECT.PERIODE_LABEL + ' à ' + SELECT.TOPERIODE_LABEL + ')'" database="iCTI" swf="*CTI_view1" softCode="iCTI_activite" globals="ACTI_globals.XML" componentsFile="ACTI_components.XML" 
    helpFile="iCTI_ACTI_ACTI000123.HTML"
    helpDokuWIkiDir="activite:etat_des_dossiers_superviseur_activite" 
    helpDokuWIkiFile="acti000057" 
>    
	<VIEWPROPERTIES componentName="PROPERTIES_ETATDOSSIERS"/>
	<VIEWPROPERTIES>
		<PROPERTY name="DATA">
			<value><![CDATA[[EVAL 
								switch ('[DATA]') {
								case 'MCPT':
									return "v_factures_reference_1.montant_comptabilise[VIEW.CLIHON] ";
									break;
								case 'MNFAC':
									return "v_factures_reference_1.montant_encours[VIEW.CLIHON] ";
									break;
								case 'MFAC':
									return "v_factures_reference_1.montant_facture[VIEW.CLIHON]";
									break;
								case 'NBFAC':
									return 'v_factures_reference_1.nb_factures';
									break;
								case 'NBREG':
									return 'v_factures_reference_1.nb_factures_regularisation';
									break;
								case 'PRREG':
									return 'base.cti_division(
												v_factures_reference_1.nb_factures_regularisation,
												v_factures_reference_1.nb_factures
											) * 100';
									break;
								case 'NBREJ':
									return 'v_factures_reference_1.nb_rejets';
									break;
								case 'NBNGRP':
									return 'v_factures_reference_1.nb_non_groupe';
									break;
								case 'DELGRP':
									return 'v_factures_reference_1.delai_groupage';
									break;
								case 'NBNFAC':
									return 'v_factures_reference_1.nb_non_calcules';
									break;
								case 'DELFAC':
									return 'v_factures_reference_1.delai_facture';
									break;
								case 'NBNEXP':
									return 'v_factures_reference_1.nb_non_expedie[VIEW.CLIHON]';
									break;
								case 'MTNEXP':
									return 'v_factures_reference_1.montant_non_expedie[VIEW.CLIHON]';
									break;				
								case 'MTNEXPHC':
									return "CASE WHEN type_sejour = '1'  THEN v_factures_reference_1.montant_non_expedie[VIEW.CLIHON] ELSE NULL END ";
									break;					
								case 'MTNEXPHJ':
									return "CASE WHEN (type_sejour = '2' OR type_sejour = '5') THEN v_factures_reference_1.montant_non_expedie[VIEW.CLIHON] ELSE NULL END ";
									break;					
								case 'MTNEXPA':
									return "CASE WHEN type_sejour = '3' THEN v_factures_reference_1.montant_non_expedie[VIEW.CLIHON] ELSE NULL END ";
									break;
								case 'DELEXP':
									return 'v_factures_reference_1.delai_expedition';
									break;
								case 'NBNSOL':
									return "v_factures_reference_1.nb_non_solde[VIEW.CLIHON]";
									break;
								case 'MTNSOL':
									return 'v_factures_reference_1.montant_solde[VIEW.CLIHON]';
									break;
								case 'DELSOL':
									return 'v_factures_reference_1.delai_solde[VIEW.CLIHON]';
									break;
								case 'NBNCLO':
									return "v_factures_reference_1.nb_non_cloture[VIEW.CLIHON] - v_factures_reference_1.nb_non_solde[VIEW.CLIHON]";
									break;
								case 'MVFAC':
									return "v_factures_reference_1.montant_facture[VIEW.CLIHON] + v_factures_reference_1.montant_encours[VIEW.CLIHON]";
									break;
								case 'CAMFAC':
									return "
											v_factures_reference_1.montant_facture[VIEW.CLIHON]
											";
									break;
								case 'CAMFHC':
									return "
											CASE WHEN type_sejour = '1' THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END
											";
									break;	
								case 'CAMFHJ':
									return "
											CASE WHEN type_sejour = '2' OR type_sejour = '5'  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END ";
									break;
								case 'CAMFA':
									return "
											CASE WHEN type_sejour = '3' THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END";
									break;	
								case 'CAMFV':
									return "
											v_factures_reference_1.montant_facture[VIEW.CLIHON] + v_factures_reference_1.montant_encours[VIEW.CLIHON]";
									break;						
								case 'CAMFVHC':
									return "
											CASE WHEN type_sejour = '1' THEN  v_factures_reference_1.montant_facture[VIEW.CLIHON] + v_factures_reference_1.montant_encours[VIEW.CLIHON] ELSE NULL END   ";
									break;	
								case 'CAMFVHJ':
									return "
											CASE WHEN type_sejour = '2' OR type_sejour = '5' THEN  v_factures_reference_1.montant_facture[VIEW.CLIHON] + v_factures_reference_1.montant_encours[VIEW.CLIHON] ELSE NULL END  ";
									break;
								case 'CAMFVA':
									return "
											CASE WHEN type_sejour = '3'  THEN  v_factures_reference_1.montant_facture[VIEW.CLIHON] + v_factures_reference_1.montant_encours[VIEW.CLIHON] ELSE NULL END ";
									break;									
								case 'MFACHC':
									return " CASE WHEN type_sejour = '1' THEN  v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END ";
									break;					
								case 'MFACHJ':
									return "CASE WHEN type_sejour = '2' OR type_sejour = '5' THEN  v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END ";
									break;					
								case 'MFACA':  
									return "CASE WHEN type_sejour = '3' THEN  v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END  ";
									break;
								case 'MFACHC':
									return "CASE WHEN type_sejour = '1' THEN  v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END ";
									break;					
								case 'MFACHJ':
									return "CASE WHEN type_sejour = '2' OR type_sejour = '5' THEN  v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END ";
									break;					
								case 'MFACA':
									return "CASE WHEN type_sejour = '3' THEN  v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END  ";
									break;
								case 'MNFHC':
									return "CASE WHEN type_sejour = '1' THEN  v_factures_reference_1.montant_encours[VIEW.CLIHON] ELSE NULL END ";
									break;					
								case 'MNFHJ':
									return "CASE WHEN type_sejour = '2' OR type_sejour = '5' THEN  v_factures_reference_1.montant_encours[VIEW.CLIHON] ELSE NULL END  ";
									break;					
								case 'MNFACA':
									return "CASE WHEN type_sejour = '3'  THEN  v_factures_reference_1.montant_encours[VIEW.CLIHON] ELSE NULL END";
									break;
								case 'MTEXP':
									return "CASE WHEN  v_factures_reference_1.nb_non_expedie[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END ";
									break;					
								case 'MTEXPHC':
									return "CASE WHEN type_sejour = '1' AND  v_factures_reference_1.nb_non_expedie[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END ";
									break;					
								case 'MTEXPHJ':
									return "CASE WHEN (type_sejour = '2' OR type_sejour = '5') AND v_factures_reference_1.nb_non_expedie[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END ";
									break;					
								case 'MTEXPA':
									return "CASE WHEN type_sejour = '3' AND v_factures_reference_1.nb_non_expedie[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END ";
									break;
								case 'MTSOL':
									return "CASE WHEN  v_factures_reference_1.nb_non_solde[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END ";
									break;					
								case 'MTSOLHC':
									return "CASE WHEN type_sejour = '1' AND  v_factures_reference_1.nb_non_solde[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END ";
									break;					
								case 'MTSOLHJ':
									return "CASE WHEN (type_sejour = '2' OR type_sejour = '5') AND  v_factures_reference_1.nb_non_solde[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END ";
									break;					
								case 'MTSOLA':
									return "CASE WHEN type_sejour = '3' AND  v_factures_reference_1.nb_non_solde[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END ";
									break;
								default:
									return 'v_factures_reference_1.nb_factures';
								}
					EVAL]]]></value>
		</PROPERTY>
		<PROPERTY name="DATAM">
			<value><![CDATA[[EVAL 
								switch ('[DATA]') {
								case 'MNFAC':
									return "SUM(v_factures_reference_1.montant_encours[VIEW.CLIHON])";
									break;
								case 'MFAC':
									return "SUM(v_factures_reference_1.montant_facture)";
									break;
								case 'NSEJ':
									return "COUNT(DISTINCT v_sejours_1.no_sejour)";
									break;
								case 'NBFAC':
									return 'SUM(v_factures_reference_1.nb_factures)';
									break;
								case 'NBREG':
									return 'SUM(v_factures_reference_1.nb_factures_regularisation)';
									break;
								case 'PRREG':
									return 'base.cti_division(
												SUM(v_factures_reference_1.nb_factures_regularisation),
												SUM(v_factures_reference_1.nb_factures)
											) * 100';
									break;
								case 'NBREJ':
									return 'SUM(v_factures_reference_1.nb_rejets)';
									break;
								case 'NBNGRP':
									return 'SUM(v_factures_reference_1.nb_non_groupe)';
									break;
								case 'DELGRP':
									return 'AVG(v_factures_reference_1.delai_groupage)';
									break;
								case 'NBNFAC':
									return 'SUM(v_factures_reference_1.nb_non_calcules)';
									break;
								case 'DELFAC':
									return 'AVG(v_factures_reference_1.delai_facture)';
									break;
								case 'NBNEXP':
									return 'SUM(v_factures_reference_1.nb_non_expedie[VIEW.CLIHON])';
									break;
								case 'MTNEXP':
									return 'SUM(v_factures_reference_1.montant_non_expedie[VIEW.CLIHON])';
									break;				
								case 'MTNEXPHC':
									return "SUM( CASE WHEN type_sejour = '1'  THEN v_factures_reference_1.montant_non_expedie[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MTNEXPHJ':
									return "SUM( CASE WHEN (type_sejour = '2' OR type_sejour = '5') THEN v_factures_reference_1.montant_non_expedie[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MTNEXPA':
									return "SUM( CASE WHEN type_sejour = '3' THEN v_factures_reference_1.montant_non_expedie[VIEW.CLIHON] ELSE NULL END )";
									break;
								case 'DELEXP':
									return 'AVG(v_factures_reference_1.delai_expedition)';
									break;
								case 'NBNSOL':
									return "SUM(v_factures_reference_1.nb_non_solde[VIEW.CLIHON])";
									break;
								case 'MTNSOL':
									return 'SUM(v_factures_reference_1.montant_solde[VIEW.CLIHON])';
									break;
								case 'DELSOL':
									return 'AVG(v_factures_reference_1.delai_solde[VIEW.CLIHON])';
									break;
								case 'NBNCLO':
									return "SUM(v_factures_reference_1.nb_non_cloture[VIEW.CLIHON] - v_factures_reference_1.nb_non_solde[VIEW.CLIHON])";
									break;
								case 'MVFAC':
									return "SUM( v_factures_reference_1.montant_facture + v_factures_reference_1.montant_encours[VIEW.CLIHON])";
									break;
								case 'CAMFAC':
									return "base.cti_division(
												SUM(v_factures_reference_1.montant_facture[VIEW.CLIHON] ),
												COUNT(v_factures_reference_1.no_sejour  )
											) ";
									break;	
								case 'CAMFHC':
									return "base.cti_division(
											SUM(CASE WHEN type_sejour = '1' THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END),
											COUNT(CASE WHEN type_sejour = '1' THEN  v_factures_reference_1.no_sejour  ELSE NULL END)
											) ";
									break;	
								case 'CAMFHJ':
									return "base.cti_division(
											SUM(CASE WHEN type_sejour = '2' OR type_sejour = '5'  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END),
											COUNT(CASE WHEN type_sejour = '2' OR type_sejour = '5'  THEN  v_factures_reference_1.no_sejour  ELSE NULL END)
											) ";
									break;
								case 'CAMFA':
									return "base.cti_division(
											SUM(CASE WHEN type_sejour = '3' THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END),
											COUNT(CASE WHEN type_sejour = '3' THEN  v_factures_reference_1.no_sejour  ELSE NULL END)
											) ";
									break;
								case 'CAMFV':
									return "base.cti_division(
											SUM(v_factures_reference_1.montant_facture[VIEW.CLIHON] + v_factures_reference_1.montant_encours[VIEW.CLIHON]),
											COUNT(v_factures_reference_1.no_sejour)
											) ";
									break;						
								case 'CAMFVHC':
									return "base.cti_division(
											SUM( CASE WHEN type_sejour = '1' THEN  v_factures_reference_1.montant_facture[VIEW.CLIHON] + v_factures_reference_1.montant_encours[VIEW.CLIHON] ELSE NULL END  ),
											COUNT(CASE WHEN type_sejour = '1' THEN  v_factures_reference_1.no_sejour  ELSE NULL END)
											) ";
									break;	
								case 'CAMFVHJ':
									return "base.cti_division(
											SUM( CASE WHEN type_sejour = '2' OR type_sejour = '5' THEN  v_factures_reference_1.montant_facture[VIEW.CLIHON] + v_factures_reference_1.montant_encours[VIEW.CLIHON] ELSE NULL END  ),
											COUNT(CASE WHEN type_sejour = '2' OR type_sejour = '5'  THEN  v_factures_reference_1.no_sejour  ELSE NULL END)
											) ";
									break;
								case 'CAMFVA':
									return "base.cti_division(
											SUM( CASE WHEN type_sejour = '3'  THEN  v_factures_reference_1.montant_facture[VIEW.CLIHON] + v_factures_reference_1.montant_encours[VIEW.CLIHON] ELSE NULL END ),
											COUNT(CASE WHEN type_sejour = '3' THEN  v_factures_reference_1.no_sejour  ELSE NULL END)
											) ";
									break;
								case 'MFACHC':
									return "SUM( CASE WHEN type_sejour = '1' THEN  v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MFACHJ':
									return "SUM( CASE WHEN type_sejour = '2' OR type_sejour = '5' THEN  v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MFACA':
									return "SUM( CASE WHEN type_sejour = '3' THEN  v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END  )";
									break;
								case 'MCPT':
									return "SUM(v_factures_reference_1.montant_comptabilise[VIEW.CLIHON] )";
									break;
								case 'MCPTHC':
									return "SUM( CASE WHEN type_sejour = '1' THEN  v_factures_reference_1.montant_comptabilise[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MCPTHJ':
									return "SUM( CASE WHEN type_sejour = '2' OR type_sejour = '5' THEN  v_factures_reference_1.montant_comptabilise[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MCPTA':
									return "SUM( CASE WHEN type_sejour = '3'  THEN  v_factures_reference_1.montant_comptabilise[VIEW.CLIHON] ELSE NULL END )";
									break;
								case 'MNFHC':
									return "SUM(CASE WHEN type_sejour = '1' THEN  v_factures_reference_1.montant_encours[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MNFHJ':
									return "SUM( CASE WHEN type_sejour = '2' OR type_sejour = '5' THEN  v_factures_reference_1.montant_encours[VIEW.CLIHON] ELSE NULL END  )";
									break;					
								case 'MNFACA':
									return "SUM(  CASE WHEN type_sejour = '3'  THEN  v_factures_reference_1.montant_encours[VIEW.CLIHON] ELSE NULL END)";
									break;
								case 'MTEXP':
									return "SUM( CASE WHEN  v_factures_reference_1.nb_non_expedie[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MTEXPHC':
									return "SUM( CASE WHEN type_sejour = '1' AND  v_factures_reference_1.nb_non_expedie[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MTEXPHJ':
									return "SUM( CASE WHEN (type_sejour = '2' OR type_sejour = '5') AND v_factures_reference_1.nb_non_expedie[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MTEXPA':
									return "SUM( CASE WHEN type_sejour = '3' AND v_factures_reference_1.nb_non_expedie[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END )";
									break;
								case 'MTSOL':
									return "SUM(CASE WHEN  v_factures_reference_1.nb_non_solde[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MTSOLHC':
									return "SUM(CASE WHEN type_sejour = '1' AND  v_factures_reference_1.nb_non_solde[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MTSOLHJ':
									return "SUM(CASE WHEN (type_sejour = '2' OR type_sejour = '5') AND  v_factures_reference_1.nb_non_solde[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MTSOLA':
									return "SUM(CASE WHEN type_sejour = '3' AND  v_factures_reference_1.nb_non_solde[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END )";
									break;
								default:
									return 'SUM(v_factures_reference_1.nb_factures)';
								}
					EVAL]]]></value>
		</PROPERTY>
		<PROPERTY name="DATAI">
			<value><![CDATA[[EVAL 
								switch ('[DATA]') {
								case 'MCPT':
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.montant_comptabilise[VIEW.CLIHON] ELSE NULL END )';
									break;
								case 'MNFAC':
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN  v_factures_reference_1.montant_encours[VIEW.CLIHON] ELSE NULL END)';
									break;
								case 'MFAC':
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.montant_facture ELSE NULL END)';
									break;
								case 'NSEJ':
									return 'COUNT(DISTINCT CASE WHEN COLUMNCHECKSEQUENCE THEN v_sejours_1.no_sejour ELSE null END)';
									break;
								case 'NBFAC':
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.nb_factures ELSE NULL END)';
									break;
								case 'NBREG':
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.nb_factures_regularisation ELSE NULL END)';
									break;
								case 'PRREG':
									return 'base.cti_division(
											SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.nb_factures_regularisation ELSE NULL END),
											SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.nb_factures ELSE NULL END)
											) * 100 ';
									break;
								case 'NBREJ':
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.nb_rejets ELSE NULL END)';
									break;
								case 'NBNGRP':
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.nb_non_groupe ELSE NULL END)';
									break;
								case 'DELGRP':
									return 'AVG(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.delai_groupage ELSE NULL END)';
									break;
								case 'NBNFAC':
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.nb_non_calcules ELSE NULL END)';
									break;
								case 'DELFAC':
									return 'AVG(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.delai_facture ELSE NULL END)';
									break;
								case 'NBNEXP':
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.nb_non_expedie[VIEW.CLIHON] ELSE NULL END)';
									break;
								case 'MTNEXP':
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.montant_non_expedie[VIEW.CLIHON] ELSE NULL END)';
									break;				
								case 'MTNEXPHC':
									return "SUM( CASE WHEN COLUMNCHECKSEQUENCE  AND type_sejour = '1'  THEN v_factures_reference_1.montant_non_expedie[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MTNEXPHJ':
									return "SUM( CASE WHEN COLUMNCHECKSEQUENCE  AND (type_sejour = '2' OR type_sejour = '5') THEN v_factures_reference_1.montant_non_expedie[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MTNEXPA':
									return "SUM( CASE WHEN COLUMNCHECKSEQUENCE  AND type_sejour = '3' THEN v_factures_reference_1.montant_non_expedie[VIEW.CLIHON] ELSE NULL END )";
									break;
								case 'DELEXP':
									return 'AVG(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.delai_expedition ELSE NULL END)';
									break;
								case 'NBNSOL':
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.nb_non_solde[VIEW.CLIHON] ELSE NULL END)';
									break;
								case 'MTNSOL':
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.montant_solde[VIEW.CLIHON] ELSE 0 END)';
									break;
								case 'DELSOL':
									return 'AVG(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.delai_solde[VIEW.CLIHON] ELSE NULL END)';
									break;
								case 'NBNCLO':
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.nb_non_cloture[VIEW.CLIHON] - v_factures_reference_1.nb_non_solde[VIEW.CLIHON] ELSE NULL END)';
									break;
								case 'MVFAC':
									return "SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] + v_factures_reference_1.montant_encours[VIEW.CLIHON] ELSE NULL END)";
									break;
								case 'CAMFAC':
									return "base.cti_division(
												SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END),
												COUNT(CASE WHEN  COLUMNCHECKSEQUENCE THEN v_factures_reference_1.no_sejour  ELSE NULL END)
											) ";
									break;	
								case 'CAMFHC':
									return "base.cti_division(
											SUM(CASE WHEN COLUMNCHECKSEQUENCE AND type_sejour = '1' THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END),
											COUNT(CASE WHEN COLUMNCHECKSEQUENCE AND type_sejour = '1' THEN  v_factures_reference_1.no_sejour  ELSE NULL END)
											) ";
									break;	
								case 'CAMFHJ':
									return "base.cti_division(
											SUM(CASE WHEN COLUMNCHECKSEQUENCE AND type_sejour = '2' OR type_sejour = '5'  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END),
											COUNT(CASE WHEN COLUMNCHECKSEQUENCE AND type_sejour = '2' OR type_sejour = '5'  THEN  v_factures_reference_1.no_sejour  ELSE NULL END)
											) ";
									break;
								case 'CAMFA':
									return "base.cti_division(
											SUM(CASE WHEN COLUMNCHECKSEQUENCE AND type_sejour = '3' THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END),
											COUNT(CASE WHEN COLUMNCHECKSEQUENCE AND type_sejour = '3' THEN  v_factures_reference_1.no_sejour  ELSE NULL END)
											) ";
									break;	
								case 'CAMFV':
									return "base.cti_division(
											SUM( CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] + v_factures_reference_1.montant_encours[VIEW.CLIHON] ELSE NULL END),
											COUNT(CASE WHEN COLUMNCHECKSEQUENCE THEN  v_factures_reference_1.no_sejour  ELSE NULL END)
											) ";
									break;						
								case 'CAMFVHC':
									return "base.cti_division(
											SUM( CASE WHEN COLUMNCHECKSEQUENCE AND type_sejour = '1' THEN  v_factures_reference_1.montant_facture[VIEW.CLIHON] + v_factures_reference_1.montant_encours[VIEW.CLIHON] ELSE NULL END  ),
											COUNT(CASE WHEN COLUMNCHECKSEQUENCE AND type_sejour = '1' THEN  v_factures_reference_1.no_sejour  ELSE NULL END)
											) ";
									break;	
								case 'CAMFVHJ':
									return "base.cti_division(
											SUM( CASE WHEN COLUMNCHECKSEQUENCE AND type_sejour = '2' OR type_sejour = '5' THEN  v_factures_reference_1.montant_facture[VIEW.CLIHON] + v_factures_reference_1.montant_encours[VIEW.CLIHON] ELSE NULL END  ),
											COUNT(CASE WHEN COLUMNCHECKSEQUENCE AND type_sejour = '2' OR type_sejour = '5'  THEN  v_factures_reference_1.no_sejour  ELSE NULL END)
											) ";
									break;
								case 'CAMFVA':
									return "base.cti_division(
											SUM( CASE WHEN COLUMNCHECKSEQUENCE AND type_sejour = '3'  THEN  v_factures_reference_1.montant_facture[VIEW.CLIHON] + v_factures_reference_1.montant_encours[VIEW.CLIHON] ELSE NULL END ),
											COUNT(CASE WHEN COLUMNCHECKSEQUENCE AND type_sejour = '3' THEN  v_factures_reference_1.no_sejour  ELSE NULL END)
											) ";
									break;									
								case 'MFACHC':
									return "SUM( CASE WHEN COLUMNCHECKSEQUENCE AND type_sejour = '1' THEN  v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MFACHJ':
									return "SUM( CASE WHEN COLUMNCHECKSEQUENCE AND type_sejour = '2' OR type_sejour = '5' THEN  v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MFACA':
									return "SUM( CASE WHEN COLUMNCHECKSEQUENCE AND type_sejour = '3' THEN  v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END  )";
									break;
								case 'MCPTHC':
									return "SUM( CASE WHEN  COLUMNCHECKSEQUENCE AND  type_sejour = '1' THEN  v_factures_reference_1.montant_comptabilise[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MCPTHJ':
									return "SUM( CASE WHEN  COLUMNCHECKSEQUENCE AND  (type_sejour = '2' OR type_sejour = '5') THEN  v_factures_reference_1.montant_comptabilise[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MCPTA':
									return "SUM( CASE WHEN  COLUMNCHECKSEQUENCE AND type_sejour = '3'  THEN  v_factures_reference_1.montant_comptabilise[VIEW.CLIHON] ELSE NULL END )";
									break;
								case 'MNFHC':
									return "SUM(CASE WHEN COLUMNCHECKSEQUENCE AND type_sejour = '1' THEN  v_factures_reference_1.montant_encours[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MNFHJ':
									return "SUM( CASE WHEN COLUMNCHECKSEQUENCE AND (type_sejour = '2' OR type_sejour = '5') THEN  v_factures_reference_1.montant_encours[VIEW.CLIHON] ELSE NULL END  )";
									break;					
								case 'MNFACA':
									return "SUM(  CASE WHEN COLUMNCHECKSEQUENCE AND type_sejour = '3'  THEN  v_factures_reference_1.montant_encours[VIEW.CLIHON] ELSE NULL END)";
									break;
								case 'MTEXP':
									return "SUM( CASE WHEN COLUMNCHECKSEQUENCE AND v_factures_reference_1.nb_non_expedie[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MTEXPHC':
									return "SUM( CASE WHEN COLUMNCHECKSEQUENCE AND type_sejour = '1' AND  v_factures_reference_1.nb_non_expedie[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MTEXPHJ':
									return "SUM( CASE WHEN COLUMNCHECKSEQUENCE AND (type_sejour = '2' OR type_sejour = '5') AND v_factures_reference_1.nb_non_expedie[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MTEXPA':
									return "SUM( CASE WHEN COLUMNCHECKSEQUENCE AND type_sejour = '3' AND v_factures_reference_1.nb_non_expedie[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END )";
									break;
								case 'MTSOL':
									return "SUM(CASE WHEN COLUMNCHECKSEQUENCE AND   v_factures_reference_1.nb_non_solde[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MTSOLHC':
									return "SUM(CASE WHEN COLUMNCHECKSEQUENCE AND  type_sejour = '1' AND  v_factures_reference_1.nb_non_solde[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MTSOLHJ':
									return "SUM(CASE WHEN  COLUMNCHECKSEQUENCE AND (type_sejour = '2' OR type_sejour = '5') AND  v_factures_reference_1.nb_non_solde[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MTSOLA':
									return "SUM(CASE WHEN COLUMNCHECKSEQUENCE AND type_sejour = '3' AND  v_factures_reference_1.nb_non_solde[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END )";
									break;
								default:
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.nb_factures ELSE NULL END)';
								}
					EVAL]]]></value>
		</PROPERTY>
	</VIEWPROPERTIES>
	<SELECTIONS label="Paramètres de l'analyse">
		<GROUP>
			<FIELD name="ALIAS_PERIODE" label="" UI="combo" width="220" default="CUM_LAST_MONTH" tree="true" globalListProvider="ALIAS_PERIODE" />
            <FIELD name="PERIODE" label="Période de sortie" UI="combo" tree="true" width="200" default="2007-01-01" globalListProvider="DATE_DEBUT" >
			</FIELD>
			<FIELD name="TOPERIODE" label="à" UI="combo" tree="true" width="200" default="2007-01-31" globalListProvider="DATE_FIN" >
			</FIELD>
		</GROUP>
		<GROUP>
			<FIELD name="GROUPBY" label="Regroupement" UI="combo" default="SOR" width="200" tree="true">
				<OPTION label="ETATDOSSIERS_GROUPBY" data="" globalListProvider="ETATDOSSIERS_GROUPBY"/>
			</FIELD>
			<FIELD name="GROUPBY_TAB" label="Présentation" UI="combo" default="AUTO" width="200" visible="= SELECT.GROUPBY_2 != '-1' ">
				<OPTION label="Automatique" data="AUTO"/>
				<OPTION label="Arbre" data="TREE"/>
				<OPTION label="Onglet" data="TAB"/>
			</FIELD>
		</GROUP>
		<GROUP>
			<FIELD name="GROUPBY_2" label="" UI="combo" default="-1"  width="200" tree="true">
				<OPTION label="" data="-1"/>
				<OPTION label="ETATDOSSIERS_GROUPBY" data="" globalListProvider="ETATDOSSIERS_GROUPBY"/>
				<OPTION label="Mois d'activité" data="MOIA"/>
			</FIELD>
			<FIELD name="GROUPBY_3" label="" UI="combo" default="-1"  width="200" tree="true">
				<OPTION label="" data="-1"/>
				<OPTION label="ETATDOSSIERS_GROUPBY" data="" globalListProvider="ETATDOSSIERS_GROUPBY"/>
			</FIELD>
		</GROUP>
		<GROUP>
			<FIELD name="LGROUPBY" label="" UI="combo" default="-1" width="210"  tree="true" visible="false">
				<OPTION label="" data="-1"/>
				<OPTION label="ETATDOSSIERS_GROUPBY" data="" globalListProvider="ETATDOSSIERS_GROUPBY"/>
			</FIELD>			
			<FIELD name="LGROUPBY_2" label="" UI="combo" default="-1" width="210"  tree="true" visible="false">
				<OPTION label="" data="-1"/>
				<OPTION label="ETATDOSSIERS_GROUPBY" data="" globalListProvider="ETATDOSSIERS_GROUPBY"/>
			</FIELD>			
			<FIELD name="LGROUPBY_3" label="" UI="combo" default="-1" width="210"  tree="true" visible="false">
				<OPTION label="" data="-1"/>
				<OPTION label="ETATDOSSIERS_GROUPBY" data="" globalListProvider="ETATDOSSIERS_GROUPBY"/>
			</FIELD>
		</GROUP>
		<GROUP>
			<FIELD name="COLUMNBY" label="Colonnes" UI="combo" default="-1"  width="260" tree="true">
				<OPTION label="" data="-1"/>
				<OPTION label="ETATDOSSIERS_GROUPBY" data="" globalListProvider="ETATDOSSIERS_GROUPBY"/>
			</FIELD>
			<FIELD name="COLUMNBYCOUNT" label="Nombre" UI="combo" default="10" tree="false">
				<OPTION label="5" data="5"/>
				<OPTION label="6" data="6"/>
				<OPTION label="7" data="7"/>
				<OPTION label="8" data="8"/>
				<OPTION label="9" data="9"/>
				<OPTION label="10" data="10"/>
				<OPTION label="11" data="11"/>
				<OPTION label="12" data="12"/>
				<OPTION label="13" data="13"/>
				<OPTION label="14" data="14"/>
				<OPTION label="15" data="15"/>
				<OPTION label="16" data="16"/>
				<OPTION label="17" data="17"/>
				<OPTION label="18" data="18"/>
				<OPTION label="19" data="19"/>
				<OPTION label="20" data="20"/>
			</FIELD>			
		</GROUP>
		<GROUP>
			<FIELD name="DATA" label="Données" UI="combo" tree="true" width="260" default="NBFAC" default2="0">
				<OPTION label="ETATDOSSIERS_DATA" data="" globalListProvider="ETATDOSSIERS_DATA" />
			</FIELD>
		</GROUP>
	</SELECTIONS>
	<SELECTIONS componentName="FILTRES_ETAT_SEJOURS_SOUSSELECTIONS"/>
	<SELECTIONS componentName="FILTRES_ETATDOSSIERS_SELECTIONS"/>
	<SELECTIONS componentName="FILTRES_SEJOURS_SELECTIONS"/>
	<SELECTIONS componentName="FILTRES_PATIENTS_SELECTIONS"/>
	<SELECTIONS componentName="FILTRES_PASSAGES_SELECTIONS" />
	<QUERIES>
		<QUERY label="">
			<SQL optimizer="V_SEJOURS_X">
				<select><![CDATA[		

					CTISELECT_TREE
						LEVEL2_PROPERTIES{VIEWNAME=[VIEW.LEVEL2_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]}
                        COLUMNBYOID{[VIEW.COLUMNBY_OID_FIELD],, [VIEW.COLUMNBY_COD_FIELD] ,, [VIEW.COLUMNBY_TXT_FIELD],, [VIEW.DATA] ,, [COLUMNBYCOUNT]}
						INDICATORS{[VIEW.DATAM],,}	
						INDICATORS_COLUMNS{[VIEW.DATAI],, }
					FROM activite.[VIEW.LEVEL2_VIEW] 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]' 
						[VIEW.SEJOURS_SELECT] 
						[VIEW.ETATDOSSIERS_SELECT]
						[VIEW.PASSAGES_SELECT]
						[VIEW.PATIENTS.SELECT]
				]]></select>
				<FIELDS>
					<INSERT name="CTISELECT_TREE_FIELDS"/>
					<FIELD name="N"/>
					<FIELD name="N1"/>
					<FIELD name="N2"/>
					<FIELD name="N3"/>
					<FIELD name="N4"/>
					<FIELD name="N5"/>
					<FIELD name="N6"/>
					<FIELD name="N7"/>
					<FIELD name="N8"/>
					<FIELD name="N9"/>
					<FIELD name="N10"/>
					<FIELD name="N11"/>
					<FIELD name="N12"/>
					<FIELD name="N13"/>
					<FIELD name="N14"/>
					<FIELD name="N15"/>
					<FIELD name="N16"/>
					<FIELD name="N17"/>
					<FIELD name="N18"/>
					<FIELD name="N19"/>
					<FIELD name="N20"/>
				</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="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="TYPE_COMPARAISON" value="'2'"/>
				</VIEWITEM>
				<VIEWITEM  label="Dernière année" data="2" shortLabel="derniere  année"  view="ACTI000060.XML" enabled="true" rowContext="false" buttonType="COMPARATIF" >
					<ARG name="ALIAS_PERIODE" value="return '-1';" />
					<ARG name="PERIODE_D" value="return VIEW.COMP_PERIODE_D;" />
					<ARG name="TOPERIODE_D" value="return VIEW.COMP_TOPERIODE_D;" />
					<ARG name="PERIODE" value="return SELECT.TOPERIODE.substr(0,4)+'-01-01';" />
					<ARG name="TOPERIODE" value=" return SELECT.TOPERIODE" />
					<ARG name="GROUPBY" value="return 'NUMEROMOIS'" />
					<ARG name="GROUPBY_2" value="return '-1'" />
					<ARG name="GROUPBY_3" value="return '-1'" />
					<ARG name="DATA1" value="'NSEJ'" />
					<ARG name="DATA2" value="'MVFAC'" />
					<ARG name="TYPE_COMPARAISON" value="'2'" />
				</VIEWITEM>	
				<VIEWITEM label="&#8721; dernière Année" shortLabel="&#8721; derniere année"  view="ACTI000146.XML" rowContext="false" enabled="true" buttonType="COMPARATIF">
					<ARG name="ALIAS_PERIODE" value="return '-1';" />
					<ARG name="PERIODE_D" value="return VIEW.COMP_PERIODE_D;" />
					<ARG name="TOPERIODE_D" value="return VIEW.COMP_TOPERIODE_D;" />
					<ARG name="PERIODE" value="return SELECT.TOPERIODE.substr(0,4)+'-01-01';" />
					<ARG name="TOPERIODE" value=" return SELECT.TOPERIODE;" />
					<ARG name="GROUPBY" value="return 'NUMEROMOIS'" />
					<ARG name="GROUPBY_2" value="return '-1'" />
					<ARG name="GROUPBY_3" value="return '-1'" />
					<ARG name="DATA1" value="'NSEJ'" />
					<ARG name="DATA2" value="'MVFAC'" />
					<ARG name="TYPE_COMPARAISON" value="'2'" />
				</VIEWITEM>	
			</VIEWLINK>
			<VIEWLINK label="Comparatif" shortLabel="Comparatif"  view="ACTI000060.XML" rowContext="false" enabled="true" buttonType="COMPARATIF" >
                    <ARG name="PERIODE" value="return SELECT.TOPERIODE.substr(0,4)+'-01-01';"/>
					<ARG name="PERIODE_D" value="return VIEW.COMP_PERIODE_D;" />
					<ARG name="TOPERIODE_D" value="return VIEW.COMP_TOPERIODE_D;" />
					<ARG name="GROUPBY" value="return SELECT.LGROUPBY" />
					<ARG name="GROUPBY_2" value="return SELECT.LGROUPBY_2" />
					<ARG name="GROUPBY_3" value="return SELECT.LGROUPBY_3" />
					<ARG name="DATA1" value="'NSEJ'" />
					<ARG name="DATA2" value="'MVFAC'" />
					<ARG name="DATA3" value="'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'}
											   else {return SELECT.GROUPBY_2;}
					" />
					<ARG name="GROUPBY_2" value="return SELECT.LGROUPBY_2" />
					<ARG name="GROUPBY_3" value="return SELECT.LGROUPBY_3" />
					<ARG name="DATA1" value="'NSEJ'" />
					<ARG name="DATA2" value="'MVFAC'" />
					<ARG name="DATA3" value="'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 SELECT.TOPERIODE.substr(0,4)+'-01-01';"/>
					<ARG name="GROUPBY" value="return SELECT.LGROUPBY" />
					<ARG name="GROUPBY_2" value="return SELECT.LGROUPBY_2" />
					<ARG name="GROUPBY_3" value="return SELECT.LGROUPBY_3" />
					<ARG name="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="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="GROUPBY_TAB" value="return 'TAB';" />
					<ARG name="TYPE_COMPARAISON" value="'2'" />
				</VIEWITEM>	
			</VIEWLINK>
			<VIEWLINK label="Evolution" shortLabel="Evolution"  view="ACTI000059.XML" rowContext="false" enabled="true" buttonType="EVOLUTION" componentName="PERIODICITE_VIEWLINK">
			    <ARG name="PERIODE" value="return SELECT.TOPERIODE.substr(0,4)+'-01-01';"/>
			    <ARG name="PERIODICITE" value="'MONTH'"/>
				<ARG name="DATA" value="return SELECT.DATA"/>
				<ARG name="GROUPBY" value="return SELECT.LGROUPBY" />
				<ARG name="GROUPBY_2" value="return SELECT.LGROUPBY_2" />
				<ARG name="GROUPBY_3" value="return SELECT.LGROUPBY_3" />
			</VIEWLINK>
			<VIEWLINK label="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.LGROUPBY" />
				<ARG name="GROUPBY_2" value="return SELECT.LGROUPBY_2" />
				<ARG name="GROUPBY_3" value="return SELECT.LGROUPBY_3" />
			</VIEWLINK>	
			<VIEWLINK label="Liste 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_2 == 'MOIS' && ROW.OID2 != '0' && ROW.OID2 != '-9999999') {return ROW.OID2;} 
							if (SELECT.GROUPBY == 'MOIS') {return ROW.OID1;}							
						]]>
					</value>
				</ARG>
				
				<ARG name="TOPERIODE">
					<value>
						<![CDATA[
							if (SELECT.GROUPBY_2 == 'MOIS' && ROW.OID2 != '0' && ROW.OID2 != '-9999999') {return ROW.OID2;} 
							if (SELECT.GROUPBY == 'MOIS') {return ROW.OID1;} 	
						]]>
					</value>
				</ARG>
				<ARG name="TIERS" value="if (ROW != null &amp; SELECT.GROUPBY == 'TPY') {return 'TP' + ROW.OID}
												if (ROW != null &amp; SELECT.GROUPBY == 'TTP') {return 'TT' + ROW.OID}
												if (ROW != null &amp; SELECT.GROUPBY == 'TRG') {return 'RG' + ROW.OID}
												if (COLUMN.NAME == 'NNSOL0') {return '0'}
												if (COLUMN.NAME == 'MNSOL0') {return '0'}
												if (COLUMN.NAME == 'DSOL0') {return '0'}
												if (COLUMN.NAME == 'NNSOL1') {return '1'}
												if (COLUMN.NAME == 'MNSOL1') {return '1'}
												if (COLUMN.NAME == 'DSOL1') {return '1'}
												if (COLUMN.NAME == 'NNSOL2') {return '2'}
												if (COLUMN.NAME == 'MNSOL2') {return '2'}
												if (COLUMN.NAME == 'DSOL2') {return '2'}
												return '-1' "/>
				<ARG name="QGROUPE" value="if (COLUMN.NAME == 'NNGRP') {return '1'}
										if (COLUMN.NAME == 'NNFACB') {return '3'}
										if (COLUMN.NAME == 'DGRP') {return '2'}
										return '-1'"/>
				<ARG name="QFACTURE" value="
										if (COLUMN.NAME == 'NNFAC') {return '1'}
										if (COLUMN.NAME == 'NNFACB') {return '1'}
										if (COLUMN.NAME == 'DFAC') {return '2'}
										return '-1'"/>
				<ARG name="QEXPEDIE" value="
										if (COLUMN.NAME == 'NNEXP') {return '1'}
										if (COLUMN.NAME == 'MNEXP') {return '1'}
										if (COLUMN.NAME == 'DEXP') {return '2'}
										return '-1'"/>
				<ARG name="QSOLDE" value="if (COLUMN.NAME == 'NNSOL') {return '1'}
										if (COLUMN.NAME == 'MNSOL') {return '1'}
										if (COLUMN.NAME == 'DSOL') {return '2'}
										if (COLUMN.NAME == 'NNSOL0') {return '1'}
										if (COLUMN.NAME == 'MNSOL0') {return '1'}
										if (COLUMN.NAME == 'DSOL0') {return '2'}
										if (COLUMN.NAME == 'NNSOL1') {return '1'}
										if (COLUMN.NAME == 'MNSOL1') {return '1'}
										if (COLUMN.NAME == 'DSOL1') {return '2'}
										if (COLUMN.NAME == 'NNSOL2') {return '1'}
										if (COLUMN.NAME == 'MNSOL2') {return '1'}
										if (COLUMN.NAME == 'DSOL2') {return '2'}
										return '-1'"/>
				<ARG name="QCLOTURE" value="
										if (COLUMN.NAME == 'NNCLO') {return '1'}
										return '-1'"/>
			</VIEWLINK>
		</VIEWLINKS>
		<ONGLET excelLabel="Tableau croisé" label="Tableau croisé" multiTab="true">
			<CHART title="Evolution" type="lineChart" serieIsCategory="true" fromTotal="false" maxItems="5" maxItemsSortOn="N" sortField="N" sortSeq="D"  visibleCondition="(SELECT.GROUPBY == 'ANNEE'  &amp;&amp; 
				(SELECT.COLUMNBY == 'NUMEROMOIS'  )) || (SELECT.GROUPBY == 'ANNEEEX'  &amp;&amp; 
				(SELECT.COLUMNBY == 'NUMEROMOISEX'  ))" condition="Number(ROW.LVL) == 1">
				<CATEGORY field="TXT" type="Char"/>
				<SERIE field="N1" displayName="VIEW.COLH1" displayNameCalc="true" visibleCondition="VIEW.COLH1 != null"/>
				<SERIE field="N2" displayName="VIEW.COLH2" displayNameCalc="true" visibleCondition="VIEW.COLH2 != null"/>
				<SERIE field="N3" displayName="VIEW.COLH3" displayNameCalc="true" visibleCondition="VIEW.COLH3 != null"/>
				<SERIE field="N4" displayName="VIEW.COLH4" displayNameCalc="true" visibleCondition="VIEW.COLH4 != null"/>
				<SERIE field="N5" displayName="VIEW.COLH5" displayNameCalc="true" visibleCondition="VIEW.COLH5 != null"/>
				<SERIE field="N6" displayName="VIEW.COLH6" displayNameCalc="true" visibleCondition="VIEW.COLH6 != null"/>
				<SERIE field="N7" displayName="VIEW.COLH7" displayNameCalc="true" visibleCondition="VIEW.COLH7 != null"/>
				<SERIE field="N8" displayName="VIEW.COLH8" displayNameCalc="true" visibleCondition="VIEW.COLH8 != null"/>
				<SERIE field="N9" displayName="VIEW.COLH9" displayNameCalc="true" visibleCondition="VIEW.COLH9 != null"/>
				<SERIE field="N10" displayName="VIEW.COLH10" displayNameCalc="true" visibleCondition="VIEW.COLH10 != null"/>
				<SERIE field="N11" displayName="VIEW.COLH11" displayNameCalc="true" visibleCondition="VIEW.COLH11 != null"/>
				<SERIE field="N12" displayName="VIEW.COLH12" displayNameCalc="true" visibleCondition="VIEW.COLH12 != null"/>
				<SERIE field="N13" displayName="VIEW.COLH13" displayNameCalc="true" visibleCondition="VIEW.COLH13 != null"/>
				<SERIE field="N14" displayName="VIEW.COLH14" displayNameCalc="true" visibleCondition="VIEW.COLH14 != null"/>
				<SERIE field="N15" displayName="VIEW.COLH15" displayNameCalc="true" visibleCondition="VIEW.COLH15 != null"/>
				<SERIE field="N16" displayName="VIEW.COLH16" displayNameCalc="true" visibleCondition="VIEW.COLH16 != null"/>
				<SERIE field="N17" displayName="VIEW.COLH17" displayNameCalc="true" visibleCondition="VIEW.COLH17 != null"/>
				<SERIE field="N18" displayName="VIEW.COLH18" displayNameCalc="true" visibleCondition="VIEW.COLH18 != null"/>
				<SERIE field="N19" displayName="VIEW.COLH19" displayNameCalc="true" visibleCondition="VIEW.COLH19 != null"/>
				<SERIE field="N20" displayName="VIEW.COLH20" displayNameCalc="true" visibleCondition="VIEW.COLH20 != null"/>
			</CHART>
			<CHART title="Comparatif (10 premiers)" type="pieChart" maxItems="10" maxItemsSortOn="N" maxItemsSortSeq="D" sortField="N" sortSeq="A" visibleCondition="(SELECT.GROUPBY != 'ANNEE')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
				<SERIE field="N" displayName="SELECT.DATA_LABEL" displayNameCalc="true"/>
			</CHART>
			<DATAGRID title="" total="true" showOthers="true" headerHeight="36" variableRowHeight="true" sortable="= SELECT.GROUPBY_2 == '-1' || SELECT.GROUPBY_TAB == 'TAB'" selectRowInRows="= ROW.OID == '-9999997'" otherRowInRows="= ROW.OID == '-9999998'" totalRowInRows="= ROW.OID == '-9999999'">
				<INSERT name="DATAGRID_MULTITAB_STYLES"/>
				<COLUMN dataField="OID" width="60" type="Char" visible="false" headerText="Oid">
				</COLUMN>
				<COLUMN dataField="COD" width="60" type="Char" headerText="Code" textAlign="left" otherFunction="text" totalFunction="text" totalComplement="TOTAL">
					<INSERT name="COLUMN_COD_MULTITAB_STYLES"/>
				</COLUMN>
				<COLUMN dataField="TXT" type="Char" minWidth="150" headerText="SELECT.GROUPBY_LABEL" headerTextCalc="true" textAlign="left" totalFunction="text" otherFunction="text" otherComplement="*ROW">
				</COLUMN>
				<COLUMN dataField="N" width="100" visible="true" type="Number" outputFormat="= SELECT.DATA2" headerText="Total" textAlign="right" totalFunction="sum" otherFunction="sum">
				</COLUMN>
				<COLUMN dataField="N_P" type="Number" headerText="% / Total" width="40" outputFormat="0%" textAlign="right" visibleCondition="SELECT.DATA != 'TAU' " totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
					<CALC formula="ROW.N / TOTALROW.N * 100"/>
				</COLUMN>
				<COLUMN description=" " dataField="N1" width="70" visibleCondition="VIEW.COLH1 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" headerText="VIEW.COLH1" columnData="= VIEW.COLI1" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN description=" " dataField="N2" width="70" visibleCondition="VIEW.COLH2 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" headerText="VIEW.COLH2" columnData="= VIEW.COLI2" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN description=" " dataField="N3" width="70" visibleCondition="VIEW.COLH3 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" headerText="VIEW.COLH3" columnData="= VIEW.COLI3" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN description=" " dataField="N4" width="70" visibleCondition="VIEW.COLH4 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" headerText="VIEW.COLH4" columnData="= VIEW.COLI4" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN description=" " dataField="N5" width="70" visibleCondition="VIEW.COLH5 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" headerText="VIEW.COLH5" columnData="= VIEW.COLI5" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN description=" " dataField="N6" width="70" visibleCondition="VIEW.COLH6 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" headerText="VIEW.COLH6" columnData="= VIEW.COLI6" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN description=" " dataField="N7" width="70" visibleCondition="VIEW.COLH7 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" headerText="VIEW.COLH7" columnData="= VIEW.COLI7" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN description=" " dataField="N8" width="70" visibleCondition="VIEW.COLH8 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" headerText="VIEW.COLH8" columnData="= VIEW.COLI8" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN description=" " dataField="N9" width="70" visibleCondition="VIEW.COLH9 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" headerText="VIEW.COLH9" columnData="= VIEW.COLI9" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN description=" " dataField="N10" width="70" visibleCondition="VIEW.COLH10 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" headerText="VIEW.COLH10" columnData="= VIEW.COLI10" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN description=" " dataField="N11" width="70" visibleCondition="VIEW.COLH11 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" headerText="VIEW.COLH11" columnData="= VIEW.COLI11" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN description=" " dataField="N12" width="70" visibleCondition="VIEW.COLH12 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" headerText="VIEW.COLH12" columnData="= VIEW.COLI12" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN description=" " dataField="N13" width="70" visibleCondition="VIEW.COLH13 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" headerText="VIEW.COLH13" columnData="= VIEW.COLI13" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN description=" " dataField="N14" width="70" visibleCondition="VIEW.COLH14 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" headerText="VIEW.COLH14" columnData="= VIEW.COLI14" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN description=" " dataField="N15" width="70" visibleCondition="VIEW.COLH15 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" headerText="VIEW.COLH15" columnData="= VIEW.COLI15" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN description=" " dataField="N16" width="70" visibleCondition="VIEW.COLH16 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" headerText="VIEW.COLH16" columnData="= VIEW.COLI16" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN description=" " dataField="N17" width="70" visibleCondition="VIEW.COLH17 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" headerText="VIEW.COLH17" columnData="= VIEW.COLI17" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN description=" " dataField="N18" width="70" visibleCondition="VIEW.COLH18 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" headerText="VIEW.COLH18" columnData="= VIEW.COLI18" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN description=" " dataField="N19" width="70" visibleCondition="VIEW.COLH19 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" headerText="VIEW.COLH19" columnData="= VIEW.COLI19" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN description=" " dataField="N20" width="70" visibleCondition="VIEW.COLH20 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" headerText="VIEW.COLH20" columnData="= VIEW.COLI20" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
			</DATAGRID>
		</ONGLET>
	</PRESENTATION>
</VUE>
