<?xml version="1.0" encoding="ISO-8859-1"?>
<VUE name="ACTI000143" label="Activité. Superviseur d'activité" title="= 'Superviseur d\'activité 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">
	<VIEWPROPERTIES componentName="PROPERTIES_ANALYSE_TT"/>
	<VIEWPROPERTIES>
		<PROPERTY dataLink="VIEWPROPERTIES" nameField="name" valueField="value" />
		<PROPERTY name="ORDERBY">
			<value><![CDATA[[EVAL 
					
					$groupbys = array(
										'[GROUPBY]', 
										'[GROUPBY_2]', 
										'[GROUPBY_3]',
										substr('[GROUBY]', 0, 6), 
										substr('[GROUBY_2]', 0, 6), 
										substr('[GROUBY_3]', 0, 6)
									);
					$exceptions = array('ANNEE', 'TRIM', 'TRIM', 'JOUR', 'NUMEROTRIM', 'NUMEROMOIS', 'NUMEROJOUR','SEMAINEANNE','JOURS','SEMAINEWE','ANNEEF', 'TRIMF', 'MOISF', 'JOURF', 'NUMEROTRIMF', 'NUMEROMOISF', 'NUMEROJOURF','SEMAINEANNEF','JOURSF','SEMAINEWEF','ANNEEEX', 'TRIMEX', 'MOISEX', 'JOUREX', 'NUMEROTRIMEX', 'NUMEROMOISEX', 'NUMEROJOUREX','SEMAINEANNEEX','JOURSEX','SEMAINEWEEX');
					
					$result = array_intersect($groupbys, $exceptions);
					
					if (count($result) > 0) {
						return "DEFAULT";
					}
					
					else {
						return "indicateurs[49]";
					}
					
			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="150" default="2009-01-01" globalListProvider="DATE_DEBUT" >
			</FIELD>
			<FIELD name="TOPERIODE" label="à " UI="combo" tree="true" width="150" default="2009-01-31" globalListProvider="DATE_FIN" >
			</FIELD>
		</GROUP>
		<GROUP>
			<FIELD name="GROUPBY" label="Regroupement" UI="combo" default="NUMEROMOIS" width="210" tree="true">
				<OPTION label="ANALYSE_TEMPS_TRAIMTEMENT_G1" data="" globalListProvider="ANALYSE_TEMPS_TRAIMTEMENT_G1"/>
			</FIELD>
			<FIELD name="GROUPBY_TAB" label="Présentation" UI="combo" default="AUTO" visible="= SELECT.GROUPBY_2 != '-1' ">
				<OPTION label="Automatique" data="AUTO"/>
				<OPTION label="Arbre" data="TREE"/>
				<OPTION label="Onglet" data="TAB"/>
			</FIELD>
		</GROUP>
		<GROUP>
			<FIELD name="GROUPBY_2" label="" UI="combo" default="-1" width="210"  tree="true">
				<OPTION label="" data="-1"/>
				<OPTION label="ANALYSE_TEMPS_TRAIMTEMENT_G2" data="" globalListProvider="ANALYSE_TEMPS_TRAIMTEMENT_G2"/>
			</FIELD>
		</GROUP>
	</SELECTIONS>
	<SELECTIONS componentName="FILTRES_ETAT_SEJOURS_SOUSSELECTIONS"/>
	<SELECTIONS label="Clinique / honoraire" collapsible="true" displayText="= var display:String = '';
					if (SELECT.CLIHON  != '0') {
							display = display + ' #B#' + SELECT.CLIHON_LABEL + '#/B#';
						}
						
						if (display != '') {
							display = '#B#Filtres C/H #/B# = ' + display;
						}
						return display;
						">
		<GROUP>
			<FIELD name="CLIHON" label="C/H" UI="combo" default="C" showIfNotDefault="true">
				<OPTION label="Clinique et Honoraires" data="-1"/>
				<OPTION label="Clinique" data="C"/>
				<OPTION label="Honoraires" data="H"/>
			</FIELD>
		</GROUP>
		
	</SELECTIONS>
	<SELECTIONS componentName="FILTRES_SEJOURS_SELECTIONS"/>
	<SELECTIONS componentName="FILTRES_PRESTATIONS_SELECTIONS"/>
	<SELECTIONS componentName="FILTRES_PATIENTS_SELECTIONS"/>
	<SELECTIONS componentName="FILTRES_PASSAGES_SELECTIONS" />
	<QUERIES>
		<QUERY label="Occupation">
			<SQL optimizer="V_SEJOURS_X">
				<select><![CDATA[		
					CTISELECT_TREE
					WORKTABLE{acti000143_1}
					LEVEL0_PROPERTIES{VIEWNAME=[VIEW.LEVEL01_VIEW]}
					LEVEL1_PROPERTIES{VIEWNAME=[VIEW.LEVEL11_VIEW]}
					LEVEL2_PROPERTIES{VIEWNAME=[VIEW.LEVEL21_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]}
					SIGNIFDATA{[VIEW.ACTIVITE_SIGNIFICATIVE_DATA],, [ACTIVITE_SIGNIFICATIVE_MODE],, [ACTIVITE_SIGNIFICATIVE_NUMBER]}
					INDICATORS{
						'1',,
						COUNT(DISTINCT v_factures_lignes_c_4.no_sejour),,
						COUNT(DISTINCT v_factures_lignes_c_4.facture_id),,
						SUM (v_sejours_1.nb_non_facture),,
						SUM(v_factures_lignes_c_4.montant_encours)  ,,
						SUM(v_factures_lignes_c_4.montant_facture),,
						SUM(v_factures_lignes_c_4.montant_facture) + SUM(v_factures_lignes_c_4.montant_encours),,
						0,,
						0
					}
					ORDERBY{[VIEW.ORDERBY],, DESC}
					FROM #V_FACTURES_LIGNES_C_X#
						JOIN #V_SEJOURS_X# ON v_sejours_1.no_sejour = v_factures_lignes_c_4.no_sejour
						JOIN base.p_calendrier  ON (v_factures_lignes_c_4.date_fin = p_calendrier.date)
					WHERE  
					    v_factures_lignes_c_4.date_fin BETWEEN '[PERIODE]' AND '[TOPERIODE]' AND v_factures_lignes_c_4.date_fin <= (SELECT valeur_date FROM activite.t_divers WHERE code = 'NOW')

						[VIEW.SEJOURS_SELECT] 
						[VIEW.PASSAGES_SELECT]
						[VIEW.PATIENTS_SELECT]
						
					AFTER{	
						UPDATE acti000143_1 SET 
							indicateurs[8] = (
												SELECT mt_cpt_occ
												FROM activite.p_chiffrier_resultat_calcule_gliss
												WHERE p_chiffrier_resultat_calcule_gliss.date_comptable = (
														SELECT CASE 
																WHEN ('[TOPERIODE]')::DATE > (
																		SELECT valeur_date
																		FROM activite.t_divers
																		WHERE code = 'NOWCLOTURE'
																		)
																	THEN (
																			SELECT valeur_date
																			FROM activite.t_divers
																			WHERE code = 'NOWCLOTURE'
																			)
																ELSE '[TOPERIODE]'
																END
														)
												)
											,

                            indicateurs[9] = (
												(
													SELECT mt_cpt_occ_j
													FROM activite.p_chiffrier_resultat_calcule_gliss
													WHERE p_chiffrier_resultat_calcule_gliss.date_comptable = (
															SELECT CASE 
																	WHEN ('[TOPERIODE]')::DATE > (
																			SELECT valeur_date
																			FROM activite.t_divers
																			WHERE code = 'NOWCLOTURE'
																			)
																		THEN (
																				SELECT valeur_date
																				FROM activite.t_divers
																				WHERE code = 'NOWCLOTURE'
																				)
																	ELSE '[TOPERIODE]'
																	END
															)
													) * 20
												) / 30
                         
                         
					}
				
				]]></select>
				<FIELDS>
					<INSERT name="CTISELECT_TREE_FIELDS"/>
					<FIELD name="SORT" />
					<FIELD name="ONGLET"/>
					<FIELD name="NSEJO"/>
					<FIELD name="NFACO"/>
					<FIELD name="NNFACO"/>
					<FIELD name="MNFACO"/>
					<FIELD name="MFACO"/>
					<FIELD name="MFACVO"/>
					<FIELD name="MMOCC"/>
					<FIELD name="MJOCC"/>
				</FIELDS>
			</SQL>
		</QUERY>
		<QUERY label="Groupés">
			<SQL optimizer="V_SEJOURS_X">
				<select><![CDATA[	
					CTISELECT_TREE
					WORKTABLE{acti000143_5}
					LEVEL0_PROPERTIES{VIEWNAME=[VIEW.LEVEL00_VIEW]}
					LEVEL1_PROPERTIES{VIEWNAME=[VIEW.LEVEL10_VIEW]}
					LEVEL2_PROPERTIES{VIEWNAME=[VIEW.LEVEL20_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]}
					SIGNIFDATA{[VIEW.ACTIVITE_SIGNIFICATIVE_DATA],, [ACTIVITE_SIGNIFICATIVE_MODE],, [ACTIVITE_SIGNIFICATIVE_NUMBER]}
					INDICATORS{
						'0',,
						COUNT(DISTINCT v_factures_reference_1.no_sejour),,
						SUM(v_factures_reference_1.nb_factures),,
			
						SUM(v_factures_reference_1.nb_non_calcules)  ,,
						SUM(v_factures_reference_1.montant_encours[VIEW.CLIHON])  ,,
						SUM(v_factures_reference_1.montant_facture[VIEW.CLIHON]),,
						SUM(v_factures_reference_1.montant_facture[VIEW.CLIHON]) + SUM(v_factures_reference_1.montant_encours[VIEW.CLIHON]),,
						0,,
						0


					}
					ORDERBY{[VIEW.ORDERBY],, DESC}
					FROM activite.[LEVELPROPERTY.VIEWNAME] v_factures_reference_1
						JOIN #V_SEJOURS_X#  ON (v_factures_reference_1.no_sejour = v_sejours_1.no_sejour)
						JOIN base.p_calendrier  ON (v_factures_reference_1.date_groupage = p_calendrier.date)
					WHERE  
					    v_factures_reference_1.date_groupage BETWEEN '[PERIODE]' AND '[TOPERIODE]'

						[VIEW.SEJOURS_SELECT] 
						[VIEW.PASSAGES_SELECT]
						[VIEW.PATIENTS_SELECT]
						
					AFTER{	
						UPDATE acti000143_5 SET 
							indicateurs[8] = (
												SELECT mt_cpt_grp
												FROM activite.p_chiffrier_resultat_calcule_gliss
												WHERE p_chiffrier_resultat_calcule_gliss.date_comptable = (
														SELECT CASE 
																WHEN ('[TOPERIODE]')::DATE > (
																		SELECT valeur_date
																		FROM activite.t_divers
																		WHERE code = 'NOWCLOTURE'
																		)
																	THEN (
																			SELECT valeur_date
																			FROM activite.t_divers
																			WHERE code = 'NOWCLOTURE'
																			)
																ELSE '[TOPERIODE]'
																END
														)
												)
											,

                            indicateurs[9] = (
												(
													SELECT mt_cpt_grp_j
													FROM activite.p_chiffrier_resultat_calcule_gliss
													WHERE p_chiffrier_resultat_calcule_gliss.date_comptable = (
															SELECT CASE 
																	WHEN ('[TOPERIODE]')::DATE > (
																			SELECT valeur_date
																			FROM activite.t_divers
																			WHERE code = 'NOWCLOTURE'
																			)
																		THEN (
																				SELECT valeur_date
																				FROM activite.t_divers
																				WHERE code = 'NOWCLOTURE'
																				)
																	ELSE '[TOPERIODE]'
																	END
															)
													) * 20
												) / 30
                         
                         
					}
				
				]]></select>
				<FIELDS>
					<INSERT name="CTISELECT_TREE_FIELDS"/>
					<FIELD name="SORT" />
					<FIELD name="ONGLET"/>
					<FIELD name="NSEJ"/>
					<FIELD name="NFAC"/>
					<FIELD name="NNFAC"/>
					<FIELD name="MNFAC"/>
					<FIELD name="MFAC"/>
					<FIELD name="MFACV"/>
					<FIELD name="MMGRP"/>
					<FIELD name="MJGRP"/>
				</FIELDS>
			</SQL>
		</QUERY>
		<QUERY label="Sortie">
			<SQL optimizer="V_SEJOURS_X">
				<select><![CDATA[	
					CTISELECT_TREE
					WORKTABLE{acti000143_0}
					LEVEL0_PROPERTIES{VIEWNAME=[VIEW.LEVEL00_VIEW]}
					LEVEL1_PROPERTIES{VIEWNAME=[VIEW.LEVEL10_VIEW]}
					LEVEL2_PROPERTIES{VIEWNAME=[VIEW.LEVEL20_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]}
					SIGNIFDATA{[VIEW.ACTIVITE_SIGNIFICATIVE_DATA],, [ACTIVITE_SIGNIFICATIVE_MODE],, [ACTIVITE_SIGNIFICATIVE_NUMBER]}
					INDICATORS{
						'0',,
						COUNT(DISTINCT v_factures_reference_1.no_sejour),,
						SUM(v_factures_reference_1.nb_factures),,
			
						SUM(v_factures_reference_1.nb_non_calcules)  ,,
						SUM(v_factures_reference_1.montant_encours[VIEW.CLIHON])  ,,
						SUM(v_factures_reference_1.montant_facture[VIEW.CLIHON]),,
						SUM(v_factures_reference_1.montant_facture[VIEW.CLIHON]) + SUM(v_factures_reference_1.montant_encours[VIEW.CLIHON]),,
						0,,
						0


					}
					ORDERBY{[VIEW.ORDERBY],, DESC}
					FROM activite.[LEVELPROPERTY.VIEWNAME] v_factures_reference_1
						JOIN #V_SEJOURS_X#  ON (v_factures_reference_1.no_sejour = v_sejours_1.no_sejour)
						JOIN base.p_calendrier  ON (v_factures_reference_1.date_fin_facture = p_calendrier.date)
					WHERE  
					    v_factures_reference_1.date_fin_facture BETWEEN '[PERIODE]' AND '[TOPERIODE]' AND v_factures_reference_1.date_fin_facture <= (SELECT valeur_date FROM activite.t_divers WHERE code = 'NOW')

						[VIEW.SEJOURS_SELECT] 
						[VIEW.PASSAGES_SELECT]
						[VIEW.PATIENTS_SELECT]
						
					AFTER{	
						UPDATE acti000143_0 SET 
							indicateurs[8] = (
												SELECT mt_cpt_sor
												FROM activite.p_chiffrier_resultat_calcule_gliss
												WHERE p_chiffrier_resultat_calcule_gliss.date_comptable = (
														SELECT CASE 
																WHEN ('[TOPERIODE]')::DATE > (
																		SELECT valeur_date
																		FROM activite.t_divers
																		WHERE code = 'NOWCLOTURE'
																		)
																	THEN (
																			SELECT valeur_date
																			FROM activite.t_divers
																			WHERE code = 'NOWCLOTURE'
																			)
																ELSE '[TOPERIODE]'
																END
														)
											)
											,
                            indicateurs[9] = (
												(
													SELECT mt_cpt_sor_j
													FROM activite.p_chiffrier_resultat_calcule_gliss
													WHERE p_chiffrier_resultat_calcule_gliss.date_comptable = (
															SELECT CASE 
																	WHEN ('[TOPERIODE]')::DATE > (
																			SELECT valeur_date
																			FROM activite.t_divers
																			WHERE code = 'NOWCLOTURE'
																			)
																		THEN (
																				SELECT valeur_date
																				FROM activite.t_divers
																				WHERE code = 'NOWCLOTURE'
																				)
																	ELSE '[TOPERIODE]'
																	END
															)
												) * 20
											) / 30
					}
				
				]]></select>
				<FIELDS>
					<INSERT name="CTISELECT_TREE_FIELDS"/>
					<FIELD name="SORT" />
					<FIELD name="ONGLET"/>
					<FIELD name="NSEJ"/>
					<FIELD name="NFAC"/>
					<FIELD name="NNFAC"/>
					<FIELD name="MNFAC"/>
					<FIELD name="MFAC"/>
					<FIELD name="MFACV"/>
					<FIELD name="MMSOR"/>
					<FIELD name="MJSOR"/>
				</FIELDS>
			</SQL>
		</QUERY>
		<QUERY label="Facturation">
			<SQL optimizer="V_SEJOURS_X" >
				<select><![CDATA[		
					CTISELECT_TREE
					WORKTABLE{acti000143_2}
					LEVEL0_PROPERTIES{VIEWNAME=[VIEW.LEVEL02_VIEW]}
					LEVEL1_PROPERTIES{VIEWNAME=[VIEW.LEVEL12_VIEW]}
					LEVEL2_PROPERTIES{VIEWNAME=[VIEW.LEVEL22_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]}
					SIGNIFDATA{[VIEW.ACTIVITE_SIGNIFICATIVE_DATA],, [ACTIVITE_SIGNIFICATIVE_MODE],, [ACTIVITE_SIGNIFICATIVE_NUMBER]}
					INDICATORS{
						'2',,
						COUNT(DISTINCT v_factures_reference_1.no_sejour),,
						COUNT(DISTINCT v_factures_reference_1.facture_id),,

						SUM( v_factures_reference_1.montant_encours) ,,
						SUM(v_factures_reference_1.montant_facture),,
						SUM(v_factures_reference_1.montant_facture) + SUM(v_factures_reference_1.montant_encours),,
						SUM(CASE WHEN type_sejour = '1'  THEN v_factures_reference_1.montant_facture ELSE NULL END),,
						SUM(CASE WHEN type_sejour = '2' OR type_sejour = '5'  THEN v_factures_reference_1.montant_facture ELSE NULL END),,
						SUM(CASE WHEN type_sejour = '3'  THEN v_factures_reference_1.montant_facture ELSE NULL END),,
						0,,
						0,,
						COUNT(DISTINCT CASE WHEN type_sejour = '1'  THEN v_factures_reference_1.no_sejour ELSE NULL END),,
						COUNT(DISTINCT CASE WHEN type_sejour = '2' OR type_sejour = '5'  THEN v_factures_reference_1.no_sejour ELSE NULL END),,
						COUNT(DISTINCT CASE WHEN type_sejour = '3'  THEN v_factures_reference_1.no_sejour ELSE NULL END),,
                        SUM(CASE WHEN v_factures_reference_1.montant_facture < 0 THEN v_factures_reference_1.montant_facture ELSE NULL END ),,
						SUM(CASE WHEN v_factures_reference_1.montant_facture > 0 THEN v_factures_reference_1.montant_facture ELSE NULL END )


					}
					ORDERBY{[VIEW.ORDERBY],, DESC}
					FROM activite.v_factures_lignes_c_4 v_factures_reference_1
						JOIN #V_SEJOURS_X#  ON (v_factures_reference_1.no_sejour = v_sejours_1.no_sejour)
						JOIN base.p_calendrier  ON (v_factures_reference_1.date_facture = p_calendrier.date)
					WHERE  
					    v_factures_reference_1.date_facture BETWEEN '[PERIODE]' AND '[TOPERIODE]'

						[VIEW.SEJOURS_SELECT]
						[VIEW.PASSAGES_SELECT]
						[VIEW.PATIENTS_SELECT]
						[VIEW.PRESTATIONS_SELECT]
						
					AFTER{	
						UPDATE acti000143_2 SET 
							indicateurs[10] = (
												SELECT mt_cpt
												FROM activite.p_chiffrier_resultat_calcule_gliss
												WHERE p_chiffrier_resultat_calcule_gliss.date_comptable = (
														SELECT CASE 
																WHEN ('[TOPERIODE]')::DATE > (
																		SELECT valeur_date
																		FROM activite.t_divers
																		WHERE code = 'NOWCLOTURE'
																		)
																	THEN (
																			SELECT valeur_date
																			FROM activite.t_divers
																			WHERE code = 'NOWCLOTURE'
																			)
																ELSE '[TOPERIODE]'
																END
														)
												)
											,

                            indicateurs[11] = 
											(
												(
													SELECT mt_cpt_j
													FROM activite.p_chiffrier_resultat_calcule_gliss
													WHERE p_chiffrier_resultat_calcule_gliss.date_comptable = (
															SELECT CASE 
																	WHEN ('[TOPERIODE]')::DATE > (
																			SELECT valeur_date
																			FROM activite.t_divers
																			WHERE code = 'NOWCLOTURE'
																			)
																		THEN (
																				SELECT valeur_date
																				FROM activite.t_divers
																				WHERE code = 'NOWCLOTURE'
																				)
																	ELSE '[TOPERIODE]'
																	END
															)
													)
											)

                         
                         
					}
				
				]]></select>
				<FIELDS>
					<INSERT name="CTISELECT_TREE_FIELDS"/>
					<FIELD name="SORT" />
					<FIELD name="ONGLET"/>
					<FIELD name="NSEJFF"/>
					<FIELD name="NFACSF"/>
					<FIELD name="MNFACF"/>
					<FIELD name="MFACF"/>
					<FIELD name="MFACVF"/>
					<FIELD name="MFACHC"/>
					<FIELD name="MFACHJ"/>
					<FIELD name="MFACAUT"/>
					<FIELD name="MMVEN"/>
					<FIELD name="MJVEN"/>
					<FIELD name="SEJHC"/>
					<FIELD name="SEJHJ"/>
					<FIELD name="SEJAUT"/>
					<FIELD name="MFACFAV"/>
					<FIELD name="MFACFAD"/>
				</FIELDS>
			</SQL>
		</QUERY>
		<QUERY label="Expédition">
			<SQL optimizer="V_SEJOURS_X">
				<select><![CDATA[		
					CTISELECT_TREE
					WORKTABLE{acti000143_3}
					LEVEL0_PROPERTIES{VIEWNAME=[VIEW.LEVEL03_VIEW]}
					LEVEL1_PROPERTIES{VIEWNAME=[VIEW.LEVEL13_VIEW]}
					LEVEL2_PROPERTIES{VIEWNAME=[VIEW.LEVEL23_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]}
					SIGNIFDATA{[VIEW.ACTIVITE_SIGNIFICATIVE_DATA],, [ACTIVITE_SIGNIFICATIVE_MODE],, [ACTIVITE_SIGNIFICATIVE_NUMBER]}
					INDICATORS{
						'3',,
						COUNT(DISTINCT v_factures_reference_1.no_sejour),,
						SUM(v_factures_reference_1.nb_factures),,
			
						SUM(v_factures_reference_1.nb_non_calcules)  ,,
						SUM(v_factures_reference_1.montant_encours[VIEW.CLIHON])  ,,
						SUM(v_factures_reference_1.montant_facture[VIEW.CLIHON]),,
						SUM(CASE WHEN   v_factures_reference_1.nb_non_expedie[VIEW.CLIHON] <> 1   THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE 0 END ),,
						SUM( CASE WHEN   v_factures_reference_1.nb_non_expedie[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture_1[VIEW.CLIHON] ELSE 0 END),,
						SUM( CASE WHEN   v_factures_reference_1.nb_non_expedie[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture_2[VIEW.CLIHON] ELSE 0 END),,
						SUM( CASE WHEN   v_factures_reference_1.nb_non_expedie[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture_0[VIEW.CLIHON] ELSE 0 END),,
						0,,
						0

					}
					ORDERBY{[VIEW.ORDERBY],, DESC}
					FROM activite.[LEVELPROPERTY.VIEWNAME] v_factures_reference_1
						JOIN #V_SEJOURS_X#  ON (v_factures_reference_1.no_sejour = v_sejours_1.no_sejour)
						JOIN base.p_calendrier  ON (v_factures_reference_1.date_expedition = p_calendrier.date)
					WHERE  
					    v_factures_reference_1.date_expedition BETWEEN '[PERIODE]' AND '[TOPERIODE]'

						[VIEW.SEJOURS_SELECT] 
						[VIEW.PASSAGES_SELECT]
						[VIEW.PATIENTS_SELECT]
					AFTER{	
						UPDATE acti000143_3 SET 
							indicateurs[11] = (
												SELECT mt_cpt
												FROM activite.p_chiffrier_resultat_calcule_gliss
												WHERE p_chiffrier_resultat_calcule_gliss.date_comptable = (
														SELECT CASE 
																WHEN ('[TOPERIODE]')::DATE > (
																		SELECT valeur_date
																		FROM activite.t_divers
																		WHERE code = 'NOWCLOTURE'
																		)
																	THEN (
																			SELECT valeur_date
																			FROM activite.t_divers
																			WHERE code = 'NOWCLOTURE'
																			)
																ELSE '[TOPERIODE]'
																END
														)
												)
											,

                            indicateurs[12] = 
											(
												(
													SELECT mt_cpt_j
													FROM activite.p_chiffrier_resultat_calcule_gliss
													WHERE p_chiffrier_resultat_calcule_gliss.date_comptable = (
															SELECT CASE 
																	WHEN ('[TOPERIODE]')::DATE > (
																			SELECT valeur_date
																			FROM activite.t_divers
																			WHERE code = 'NOWCLOTURE'
																			)
																		THEN (
																				SELECT valeur_date
																				FROM activite.t_divers
																				WHERE code = 'NOWCLOTURE'
																				)
																	ELSE '[TOPERIODE]'
																	END
															)
													)
											)

                         
                         
					}
				
				]]></select>
				<FIELDS>
					<INSERT name="CTISELECT_TREE_FIELDS"/>
					<FIELD name="SORT" />
					<FIELD name="ONGLET"/>
					<FIELD name="NSEJEX"/>
					<FIELD name="NFACSEX"/>
					<FIELD name="NNFACF"/>
					<FIELD name="MNFACF"/>
					<FIELD name="MFACF"/>
					<FIELD name="MEXP"/>
					<FIELD name="MEXPAMO"/>
					<FIELD name="MEXPAMC"/>
					<FIELD name="MEXPPAT"/>
					<FIELD name="MMEXP"/>
					<FIELD name="MJEXP"/>
				</FIELDS>
			</SQL>
		</QUERY>
		<QUERY label="Réglement">
			<SQL optimizer="V_SEJOURS_X">
				<select><![CDATA[		
					CTISELECT_TREE
					WORKTABLE{acti000143_4}
					LEVEL0_PROPERTIES{VIEWNAME=[VIEW.LEVEL04_VIEW]}
					LEVEL1_PROPERTIES{VIEWNAME=[VIEW.LEVEL14_VIEW]}
					LEVEL2_PROPERTIES{VIEWNAME=[VIEW.LEVEL24_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]}
					SIGNIFDATA{[VIEW.ACTIVITE_SIGNIFICATIVE_DATA],, [ACTIVITE_SIGNIFICATIVE_MODE],, [ACTIVITE_SIGNIFICATIVE_NUMBER]}
					INDICATORS{
						'4',,
						COUNT(DISTINCT v_facture_solde_tiers_c_1.no_sejour),,
						COUNT(DISTINCT  v_facture_solde_tiers_c_1.no_facture),,
						SUM(v_facture_solde_tiers_c_1.montant_regle),,
						SUM(v_facture_solde_tiers_c_1.montant_regle_0),,
						SUM(v_facture_solde_tiers_c_1.montant_regle_1),,
						SUM(v_facture_solde_tiers_c_1.montant_regle_2),,
						0,,
						0
					}
					ORDERBY{[VIEW.ORDERBY],, DESC}
					FROM activite.[LEVELPROPERTY.VIEWNAME] v_facture_solde_tiers_c_1
						JOIN #V_SEJOURS_X#  ON (v_facture_solde_tiers_c_1.no_sejour = v_sejours_1.no_sejour)
						JOIN base.p_calendrier  ON (v_facture_solde_tiers_c_1.date_comptable = p_calendrier.date)
					WHERE  
					    v_facture_solde_tiers_c_1.date_comptable BETWEEN '[PERIODE]' AND '[TOPERIODE]'

						[VIEW.SEJOURS_SELECT]
						[VIEW.PASSAGES_SELECT]
						[VIEW.PATIENTS_SELECT]
					AFTER{	
						UPDATE acti000143_4 SET 
							indicateurs[8] = (
												SELECT mt_reg
												FROM activite.p_chiffrier_resultat_calcule_gliss
												WHERE p_chiffrier_resultat_calcule_gliss.date_comptable = (
														SELECT CASE 
																WHEN ('[TOPERIODE]')::DATE > (
																		SELECT valeur_date
																		FROM activite.t_divers
																		WHERE code = 'NOWCLOTURE'
																		)
																	THEN (
																			SELECT valeur_date
																			FROM activite.t_divers
																			WHERE code = 'NOWCLOTURE'
																			)
																ELSE '[TOPERIODE]'
																END
														)
												)
											,

                            indicateurs[9] = (
												(
													SELECT mt_reg_j
													FROM activite.p_chiffrier_resultat_calcule_gliss
													WHERE p_chiffrier_resultat_calcule_gliss.date_comptable = (
															SELECT CASE 
																	WHEN ('[TOPERIODE]')::DATE > (
																			SELECT valeur_date
																			FROM activite.t_divers
																			WHERE code = 'NOWCLOTURE'
																			)
																		THEN (
																				SELECT valeur_date
																				FROM activite.t_divers
																				WHERE code = 'NOWCLOTURE'
																				)
																	ELSE '[TOPERIODE]'
																	END
															)
													) 
												) 
                         
                         
					}
				
				]]></select>
				<FIELDS>
					<INSERT name="CTISELECT_TREE_FIELDS"/>
					<FIELD name="SORT" />
					<FIELD name="ONGLET"/>
					<FIELD name="NSEJR"/>
					<FIELD name="NFACSR"/>
					<FIELD name="MREG"/>
					<FIELD name="MREG0"/>
					<FIELD name="MREG1"/>
					<FIELD name="MREG2"/>
					<FIELD name="MMREG"/>
					<FIELD name="MJREG"/>
				</FIELDS>
			</SQL>
		</QUERY> 
		<QUERY label="Synthèse">
			<SQL optimizer="V_SEJOURS_X">
				<select><![CDATA[
				
					DROP TABLE IF EXISTS ACTI000143_syn;
                    CREATE TEMP TABLE ACTI000143_syn AS
					select 	acti000143_1.oidt, 
							acti000143_1.labelt, 
							acti000143_1.textet, 
							acti000143_1.oid1, 
							acti000143_1.code1,
						    acti000143_1.oid2, 
						    acti000143_1.code2, 
						    acti000143_1.oid3, 
						    acti000143_1.code3,
						    acti000143_1.oid, 
						    acti000143_1.code, 
						    acti000143_1.texte, 
						    acti000143_1.level, 
						    acti000143_1.sort

							,acti000143_0.indicateurs[2] as sej_sortie
							,acti000143_0.indicateurs[7] as ca_total
							
							,acti000143_1.indicateurs[2] as sej_occ
							,acti000143_1.indicateurs[7] as ca_total_occ
							
							,acti000143_2.indicateurs[2] as sej_fac
							,acti000143_2.indicateurs[5]  as ca_fac	
							
							,acti000143_2.indicateurs[6] as sej_fac_hc
							,acti000143_2.indicateurs[7]  as ca_fac_hj							
							
							,acti000143_3.indicateurs[2] as sej_exp
							,acti000143_3.indicateurs[6] as ca_exp
							
							,acti000143_4.indicateurs[2] as sej_reg
							,acti000143_4.indicateurs[4]  as ca_reg							
							
							,acti000143_5.indicateurs[2] as sej_grb
							,acti000143_5.indicateurs[7]  as ca_grb
							
					FROM acti000143_1
					 LEFT JOIN acti000143_0 ON (acti000143_0.code = acti000143_1.code) AND (acti000143_0.code1 = acti000143_1.code1 )
					 LEFT JOIN acti000143_2 ON (acti000143_0.code = acti000143_2.code) AND  (acti000143_0.code1 = acti000143_2.code1 )
					 LEFT JOIN acti000143_3 ON (acti000143_0.code = acti000143_3.code) AND (acti000143_0.code1 = acti000143_3.code1 )
					 LEFT JOIN acti000143_4 ON (acti000143_0.code = acti000143_4.code) AND (acti000143_0.code1 = acti000143_4.code1 )
					 LEFT JOIN acti000143_5 ON (acti000143_0.code = acti000143_5.code) AND (acti000143_0.code1 = acti000143_5.code1 );
					
				
				select      ACTI000143_syn.oidt, 
							ACTI000143_syn.labelt, 
							ACTI000143_syn.textet, 
							ACTI000143_syn.oid1, 
							ACTI000143_syn.code1,
						    ACTI000143_syn.oid2, 
						    ACTI000143_syn.code2, 
						    ACTI000143_syn.oid3, 
						    ACTI000143_syn.code3,
						    ACTI000143_syn.oid, 
						    ACTI000143_syn.code, 
						    ACTI000143_syn.texte, 
						    ACTI000143_syn.level, 
							ACTI000143_syn.sej_sortie,
							ACTI000143_syn.ca_total,							
							ACTI000143_syn.sej_occ,
							ACTI000143_syn.ca_total_occ,
							ACTI000143_syn.sej_fac,
							ACTI000143_syn.ca_fac,
							ACTI000143_syn.sej_exp,
							ACTI000143_syn.ca_exp,
							ACTI000143_syn.sej_reg,
							ACTI000143_syn.ca_reg, 
							ACTI000143_syn.sej_fac_hc,
							ACTI000143_syn.ca_fac_hj,
							ACTI000143_syn.sej_grb, 
							ACTI000143_syn.ca_grb
						from ACTI000143_syn
                        where oidt is not null
						order by  code1,code2;
						

					
				]]></select>
				<FIELDS>
					<INSERT name="CTISELECT_TREE_FIELDS"/>	
					<FIELD name="NSEJSO"/>
					<FIELD name="CATOTAL"/>					
					<FIELD name="NSEJOCC"/>
					<FIELD name="CATOTALOCC"/>
					<FIELD name="SEJ_FAC"/>
					<FIELD name="CA_FAC"/>
					<FIELD name="SEJ_EXP"/>
					<FIELD name="CA_EXP"/>
					<FIELD name="SEJ_REG"/>
					<FIELD name="CA_REG"/>
					<FIELD name="CA_HJ"/>
					<FIELD name="CA_HC"/>					
					<FIELD name="SEJ_GRB"/>
					<FIELD name="CA_GRB"/>
				</FIELDS>
			</SQL>
		</QUERY> 
		<QUERY type="propertiesLink" name="VIEWPROPERTIES" forSelections="false">
			<SQL>
				<select><![CDATA[
						SELECT 'X_PERIODE', greatest(to_date(to_char('[PERIODE]'::date - INTERVAL  '3 year', 'YYYY-MM-DD'), 'YYYY-MM-DD'), (SELECT min(date_debut) FROM activite.p_factures ))::text;
				]]></select>
				<FIELDS>
					<FIELD name="name"/>
					<FIELD name="value"/>
				</FIELDS>
			</SQL>
		</QUERY>
	</QUERIES>
	<PRESENTATION>
		<VIEWLINKS>
			<VIEWLINK label="Comparatif" shortLabel="Comparatif" view="ACTI000063.XML" visible="= (TAB == 3)" enabled="true" rowContext="false" >
				<ARG name="QUELLEDATE" value="'2'" /> 
				<ARGS name="SPEC">
					<value><![CDATA[
						LINKVARIABLES['TYPE_COMPARAISON'] = '2';
						LINKVARIABLES['DATA1'] = 'MTFAC';
						LINKVARIABLES['DATA2'] = '0';
						LINKVARIABLES['DATA3'] = '0';
						if (SELECT.QUELMONTANT == '2') {
							LINKVARIABLES['DATA1'] = 'MTCPT';
						}
						if (SELECT.QUELMONTANT == 'FACVSBG') {
							//LINKVARIABLES['DATA1'] = 'MTCPT';
						}
						if (SELECT.QUELMONTANT == 'ENF') {
							LINKVARIABLES['DATA1'] = 'MTENC';
						}
						if (SELECT.QUELMONTANT == 'MF-ENF') {
							LINKVARIABLES['DATA1'] = 'MTFACENC';
						}
						if (SELECT.QUELMONTANT == 'MC-ENF') {
							LINKVARIABLES['DATA1'] = 'MTFACENC';
						} 
						return 'OK';
					]]></value>
				</ARGS>
				<ARG name="GROUPBY" value="return 'UFS';
					
					" />
				<ARG name="DATA1" value="'FAVNBS'" />
				<ARG name="DATA2" value="'MTFACENC'" />
				<ARG name="DATA3" value="'FAVMTTHC'" />
				<ARG name="TYPE_COMPARAISON" value="'2'" />
			</VIEWLINK>
			<VIEWLINK label="Evolution" shortLabel="Evolution" view="ACTI000062.XML" enabled="true" rowContext="false" visible="= (TAB == 3)" >
				<ARG name="QUELLEDATE" value="return '2';" /> 
				<ARGS name="SPEC">
					<value><![CDATA[
						LINKVARIABLES['TYPE_COMPARAISON'] = '2';
						LINKVARIABLES['DATA'] = 'MTFAC';
						if (SELECT.QUELMONTANT == '2') {
							LINKVARIABLES['DATA'] = 'MTCPT';
						}
						if (SELECT.QUELMONTANT == 'FACVSBG') {
							//LINKVARIABLES['DATA'] = 'MTCPT';
						}
						if (SELECT.QUELMONTANT == 'ENF') {
							LINKVARIABLES['DATA'] = 'MTENC';
						}
						if (SELECT.QUELMONTANT == 'MF-ENF') {
							LINKVARIABLES['DATA'] = 'MTFACENC';
						}
						if (SELECT.QUELMONTANT == 'MC-ENF') {
							LINKVARIABLES['DATA'] = 'MTFACENC';
						}
						return 'OK';
					]]></value>
				</ARGS>
				<ARG name="PERIODE" value="return SELECT.PERIODE.substr(0,4)+'-01-01'"/>
				<ARG name="GROUPBY" value="return 'UF';"/>
				<ARG name="DATA1" value="return 'MTFACENC';" />   
				<ARG name="PERIODICITE" value="if(SELECT.PERIODE.substr(5,2) == '01') {return 'WEEK2';} else {return 'MONTH';}" />    
			</VIEWLINK>
			<VIEWLINK label="Analyse croisée" shortLabel="Analyse croisée" view="ACTI000082.XML" enabled="true" rowContext="false" visible="= (TAB == 3)" buttonType="ANALYSE_CROISEE" >
				<ARG name="ALIAS_PERIODE" value="return '-1'" />
				<ARG name="QUELLEDATE" value="return '2';" /> 
				<ARG name="PERIODE" value="return VIEW.X_PERIODE;" />
				<ARG name="DATA" value="'MTFACENC'" />
				<ARG name="COLUMNBY" value="'NUMEROMOIS'" />
				<ARG name="GROUPBY" value="'ANNEE'" />
				<ARG name="GROUPBY_2" value="return 'UF';"/>
				<ARG name="GROUPBY_TAB" value="'TAB'" />
				<ARG name="COLUMNBYCOUNT" value="'12'" />
			</VIEWLINK>				
			<VIEWLINK label="Analyse" shortLabel="Analyse" view="ACTI000018.XML" enabled="true" rowContext="false" visible="= (TAB == 3)" buttonType="ANALYSE" >
				<ARG name="ALIAS_PERIODE" value="return '-1'" />
				<ARG name="QUELLEDATE" value="return '2';" /> 
				<ARG name="GROUPBY" value="return 'UFS';" />
				<ARG name="GROUPBY_TAB" value="'TAB'" />
			</VIEWLINK>	
			<VIEWLINK label="Liste des séjours" shortLabel="Séjours" view="ACTI000016.XML"  visible="= (TAB == 3)" componentName="ETA_DOS_BASE_VIEWLINK" component2Name="STANDARD_BASE_VIEWLINK">
				<ARG name="PERIODE">
					<value>
						<![CDATA[
							if (SELECT.GROUPBY == 'MOIS') {return ROW.OID1;}
							if (SELECT.GROUPBY_2 == 'MOIS' && ROW.OID2 != '0' && ROW.OID2 != '-9999999') {return ROW.OID2;} 
							if (SELECT.GROUPBY_3 == 'MOIS' && ROW.OID3 != '0' && ROW.OID3 != '-9999999') {return ROW.OID3;} 
							if (SELECT.GROUPBY == 'MOISF') {return ROW.OID1;}
							if (SELECT.GROUPBY_2 == 'MOISF' && ROW.OID2 != '0' && ROW.OID2 != '-9999999') {return ROW.OID2;} 
							if (SELECT.GROUPBY_3 == 'MOISF' && ROW.OID3 != '0' && ROW.OID3 != '-9999999') {return ROW.OID3;} 
							if (SELECT.GROUPBY == 'MOISEX') {return ROW.OID1;}
							if (SELECT.GROUPBY_2 == 'MOISEX' && ROW.OID2 != '0' && ROW.OID2 != '-9999999') {return ROW.OID2;} 
							if (SELECT.GROUPBY_3 == 'MOISEX' && ROW.OID3 != '0' && ROW.OID3 != '-9999999') {return ROW.OID3;} 
							
						]]>
					</value>
				</ARG>
				<ARG name="TOPERIODE">
					<value>
						<![CDATA[
							if (SELECT.GROUPBY == 'MOIS') {return ROW.OID1;} 	
							if (SELECT.GROUPBY_2 == 'MOIS' && ROW.OID2 != '0' && ROW.OID2 != '-9999999') {return ROW.OID2;} 
							if (SELECT.GROUPBY_3 == 'MOIS' && ROW.OID3 != '0' && ROW.OID3 != '-9999999') {return ROW.OID3;} 
							if (SELECT.GROUPBY == 'MOISF') {return ROW.OID1;}	
							if (SELECT.GROUPBY_2 == 'MOISF' && ROW.OID2 != '0' && ROW.OID2 != '-9999999') {return ROW.OID2;} 
							if (SELECT.GROUPBY_3 == 'MOISF' && ROW.OID3 != '0' && ROW.OID3 != '-9999999') {return ROW.OID3;} 
							if (SELECT.GROUPBY == 'MOISEX') {return ROW.OID1;}	
							if (SELECT.GROUPBY_2 == 'MOISEX' && ROW.OID2 != '0' && ROW.OID2 != '-9999999') {return ROW.OID2;} 
							if (SELECT.GROUPBY_3 == 'MOISEX' && ROW.OID3 != '0' && ROW.OID3 != '-9999999') {return ROW.OID3;} 
						]]>
					</value>
				</ARG>
				<ARG name="QUELLEDATE">
					<value>
						<![CDATA[
								return '2';
						]]>
					</value>
				</ARG>
				<ARG name="QDETAIL_TIERS"> 
					<value>
						<![CDATA[
							return '-1';
						]]>
					</value>
				</ARG>		
			</VIEWLINK>

			<VIEWLINK label="Comparatif" shortLabel="Comparatif" view="ACTI000063.XML" visible="= (TAB == 2)" enabled="true" rowContext="false" >
				<ARG name="QUELLEDATE" value="'5'" /> 
				<ARGS name="SPEC">
					<value><![CDATA[
						LINKVARIABLES['TYPE_COMPARAISON'] = '2';
						LINKVARIABLES['DATA1'] = 'MTFAC';
						LINKVARIABLES['DATA2'] = '0';
						LINKVARIABLES['DATA3'] = '0';
						if (SELECT.QUELMONTANT == '2') {
							LINKVARIABLES['DATA1'] = 'MTCPT';
						}
						if (SELECT.QUELMONTANT == 'FACVSBG') {
							//LINKVARIABLES['DATA1'] = 'MTCPT';
						}
						if (SELECT.QUELMONTANT == 'ENF') {
							LINKVARIABLES['DATA1'] = 'MTENC';
						}
						if (SELECT.QUELMONTANT == 'MF-ENF') {
							LINKVARIABLES['DATA1'] = 'MTFACENC';
						}
						if (SELECT.QUELMONTANT == 'MC-ENF') {
							LINKVARIABLES['DATA1'] = 'MTFACENC';
						} 
						return 'OK';
					]]></value>
				</ARGS>
				<ARG name="GROUPBY" value="return 'UFS';
					
					" />
				<ARG name="DATA1" value="'FAVNBS'" />
				<ARG name="DATA2" value="'MTFACENC'" />
				<ARG name="DATA3" value="'FAVMTTHC'" />
				<ARG name="TYPE_COMPARAISON" value="'2'" />
			</VIEWLINK>
			<VIEWLINK label="Evolution" shortLabel="Evolution" view="ACTI000062.XML" enabled="true" rowContext="false" visible="= (TAB == 2)" >
				<ARG name="QUELLEDATE" value="return '5';" /> 
				<ARGS name="SPEC">
					<value><![CDATA[
						LINKVARIABLES['TYPE_COMPARAISON'] = '2';
						LINKVARIABLES['DATA'] = 'MTFAC';
						if (SELECT.QUELMONTANT == '2') {
							LINKVARIABLES['DATA'] = 'MTCPT';
						}
						if (SELECT.QUELMONTANT == 'FACVSBG') {
							//LINKVARIABLES['DATA'] = 'MTCPT';
						}
						if (SELECT.QUELMONTANT == 'ENF') {
							LINKVARIABLES['DATA'] = 'MTENC';
						}
						if (SELECT.QUELMONTANT == 'MF-ENF') {
							LINKVARIABLES['DATA'] = 'MTFACENC';
						}
						if (SELECT.QUELMONTANT == 'MC-ENF') {
							LINKVARIABLES['DATA'] = 'MTFACENC';
						}
						return 'OK';
					]]></value>
				</ARGS>
				<ARG name="PERIODE" value="return SELECT.PERIODE.substr(0,4)+'-01-01'"/>
				<ARG name="GROUPBY" value="return 'UFS';"/>
				<ARG name="DATA1" value="return 'MTFACENC';" />   
				<ARG name="PERIODICITE" value="if(SELECT.PERIODE.substr(5,2) == '01') {return 'WEEK2';} else {return 'MONTH';}" />    
			</VIEWLINK>
			<VIEWLINK label="Analyse croisée" shortLabel="Analyse croisée" view="ACTI000082.XML" enabled="true" rowContext="false" visible="= (TAB == 2)" buttonType="ANALYSE_CROISEE" >
				<ARG name="ALIAS_PERIODE" value="return '-1'" />
				<ARG name="QUELLEDATE" value="return '5';" /> 
				<ARG name="PERIODE" value="return VIEW.X_PERIODE;" />
				<ARG name="DATA" value="'MTFACENC'" />
				<ARG name="COLUMNBY" value="'NUMEROMOIS'" />
				<ARG name="GROUPBY" value="'ANNEE'" />
				<ARG name="GROUPBY_2" value="return 'UFS';"/>
				<ARG name="GROUPBY_TAB" value="'TAB'" />
				<ARG name="COLUMNBYCOUNT" value="'12'" />
			</VIEWLINK>				
			<VIEWLINK label="Analyse" shortLabel="Analyse" view="ACTI000018.XML" enabled="true" rowContext="false" visible="= (TAB == 2)" buttonType="ANALYSE" >
				<ARG name="ALIAS_PERIODE" value="return '-1'" />
				<ARG name="QUELLEDATE" value="return '5';" /> 
				<ARG name="GROUPBY" value="return 'UFS';" />
				<ARG name="GROUPBY_TAB" value="'TAB'" />
			</VIEWLINK>	
			<VIEWLINK label="Liste des séjours" shortLabel="Séjours" view="ACTI000058.XML" visible="= (TAB == 2)" componentName="STANDARD_BASE_VIEWLINK" component2Name="ETA_DOS_BASE_VIEWLINK">
			   <ARG name="QUELLEDATE" value="return '5';" />               
			   <ARG name="QUELMONTANT" value="return 'FAV';" />               
				<ARG name="PERIODE">
					<value>
						<![CDATA[
							if (SELECT.GROUPBY == 'MOIS') {return ROW.OID1;}
							if (SELECT.GROUPBY_2 == 'MOIS' && ROW.OID2 != '0' && ROW.OID2 != '-9999999') {return ROW.OID2;} 
							if (SELECT.GROUPBY_3 == 'MOIS' && ROW.OID3 != '0' && ROW.OID3 != '-9999999') {return ROW.OID3;} 							
							if (SELECT.GROUPBY == 'MOISA') {return ROW.OID1;}
							if (SELECT.GROUPBY_2 == 'MOISA' && ROW.OID2 != '0' && ROW.OID2 != '-9999999') {return ROW.OID2;} 
							if (SELECT.GROUPBY_3 == 'MOISA' && ROW.OID3 != '0' && ROW.OID3 != '-9999999') {return ROW.OID3;} 
							
						]]>
					</value>
				</ARG>
				<ARG name="TOPERIODE">
					<value>
						<![CDATA[
							if (SELECT.GROUPBY == 'MOIS') {return ROW.OID1;} 	
							if (SELECT.GROUPBY_2 == 'MOIS' && ROW.OID2 != '0' && ROW.OID2 != '-9999999') {return ROW.OID2;} 
							if (SELECT.GROUPBY_3 == 'MOIS' && ROW.OID3 != '0' && ROW.OID3 != '-9999999') {return ROW.OID3;} 	
							if (SELECT.GROUPBY == 'MOISA') {return ROW.OID1;} 	
							if (SELECT.GROUPBY_2 == 'MOISA' && ROW.OID2 != '0' && ROW.OID2 != '-9999999') {return ROW.OID2;} 
							if (SELECT.GROUPBY_3 == 'MOISA' && ROW.OID3 != '0' && ROW.OID3 != '-9999999') {return ROW.OID3;} 
						]]>
					</value>
				</ARG>
			</VIEWLINK>
		
			

			
			<VIEWLINK label="Comparatif" shortLabel="Comparatif" view="ACTI000063.XML" enabled="true" visible="= (TAB == 1)" rowContext="false" >
				<ARG name="QUELLEDATE" value="return '1';" /> 
				<ARGS name="SPEC">
					<value><![CDATA[
						LINKVARIABLES['TYPE_COMPARAISON'] = '2';
						LINKVARIABLES['DATA1'] = 'MTFAC';
						LINKVARIABLES['DATA2'] = '0';
						LINKVARIABLES['DATA3'] = '0';
						if (SELECT.QUELMONTANT == '2') {
							LINKVARIABLES['DATA1'] = 'MTCPT';
						}
						if (SELECT.QUELMONTANT == 'FACVSBG') {
							//LINKVARIABLES['DATA1'] = 'MTCPT';
						}
						if (SELECT.QUELMONTANT == 'ENF') {
							LINKVARIABLES['DATA1'] = 'MTENC';
						}
						if (SELECT.QUELMONTANT == 'MF-ENF') {
							LINKVARIABLES['DATA1'] = 'MTFACENC';
						}
						if (SELECT.QUELMONTANT == 'MC-ENF') {
							LINKVARIABLES['DATA1'] = 'MTFACENC';
						}
						return 'OK';
					]]></value>
				</ARGS>
				<ARG name="GROUPBY" value="if (SELECT.GROUPBY == 'JOUR' ) {return 'JOURSA'}
							   if (SELECT.GROUPBY == 'JOURS' ) {return 'JOURSA'}
							   if (SELECT.GROUPBY == 'WEEK' ) {return 'SEMAINEANNEA'}
							   if (SELECT.GROUPBY == 'NUMEROMOIS' ) {return 'NUMEROMOISA'}
							   if (SELECT.GROUPBY == 'MOIS' ) {return 'MOISA'}
							   if (SELECT.GROUPBY == 'TRIM' || SELECT.GROUPBY == 'NUMEROTRIM') {return 'NUMEROMOISA'}
							   if (SELECT.GROUPBY == 'ANNEE' ) {return 'ANNEEA'}
				" />
				<ARG name="DATA1" value="'FAVNBS'" />
				<ARG name="DATA2" value="'MTFACENC'" />
				<ARG name="DATA3" value="'FAVMTTHC'" />
				<ARG name="TYPE_COMPARAISON" value="'2'" />
			</VIEWLINK>
			<VIEWLINK label="Evolution" shortLabel="Evolution" view="ACTI000062.XML" enabled="true" rowContext="false" visible="= (TAB == 1)" componentName="PERIODICITE_VIEWLINK" component2Name="PRESTATIONS_BASE_VIEWLINK">
				<ARG name="QUELLEDATE" value="return '1';" /> 
				<ARG name="GROUPBY" value="return 'UF';"/>
				<ARGS name="SPEC">
					<value><![CDATA[
						LINKVARIABLES['TYPE_COMPARAISON'] = '2';
						LINKVARIABLES['DATA'] = 'MTFAC';
						if (SELECT.QUELMONTANT == '2') {
							LINKVARIABLES['DATA'] = 'MTCPT';
						}
						if (SELECT.QUELMONTANT == 'FACVSBG') {
							//LINKVARIABLES['DATA'] = 'MTCPT';
						}
						if (SELECT.QUELMONTANT == 'ENF') {
							LINKVARIABLES['DATA'] = 'MTENC';
						}
						if (SELECT.QUELMONTANT == 'MF-ENF') {
							LINKVARIABLES['DATA'] = 'MTFACENC';
						}
						if (SELECT.QUELMONTANT == 'MC-ENF') {
							LINKVARIABLES['DATA'] = 'MTFACENC';
						}
						return 'OK';
					]]></value>
				</ARGS>
				<ARG name="PERIODE" value="return SELECT.PERIODE.substr(0,4)+'-01-01'"/>
				<ARG name="DATA1" value="return 'FAVMTT';" />   
				<ARG name="PERIODICITE" value="if(SELECT.PERIODE.substr(5,2) == '01') {return 'WEEK2';} else {return 'MONTH';}" />   
			</VIEWLINK>			
			<VIEWLINK label="Analyse croisée" shortLabel="Analyse croisée" view="ACTI000082.XML" visible="= (TAB == 1)" enabled="true" rowContext="false" buttonType="ANALYSE_CROISEE" >
				<ARG name="ALIAS_PERIODE" value="return '-1'" />
				<ARG name="QUELLEDATE" value="return '1';" /> 
				<ARG name="DATA" value="'MTFACENC'" />
				<ARG name="PERIODE" value="return VIEW.X_PERIODE;" />
				<ARG name="COLUMNBY" value="'NUMEROMOISA'" />
				<ARG name="GROUPBY" value="'ANNEEA'" />
				<ARG name="GROUPBY_2" value="return 'UF';"/>
				<ARG name="GROUPBY_TAB" value="'TAB'" />
				<ARG name="COLUMNBYCOUNT" value="'12'" />
			</VIEWLINK>	
			<VIEWLINK label="Analyse" shortLabel="Analyse" view="ACTI000018.XML" enabled="true" rowContext="false" visible="= (TAB == 1)" buttonType="ANALYSE" >
				<ARG name="ALIAS_PERIODE" value="return '-1'" />
				<ARG name="QUELLEDATE" value="return '1';" /> 
				<ARG name="GROUPBY" value="return 'UF';" />
				<ARG name="GROUPBY_TAB" value="'TAB'" />
			</VIEWLINK>	
			<VIEWLINK label="Liste des séjours" shortLabel="Séjours" view="ACTI000016.XML" visible="= (TAB == 1)" component2Name="STANDARD_BASE_VIEWLINK" component3Name="ETA_DOS_BASE_VIEWLINK">
			   <ARG name="QUELLEDATE" value="return '1';" />               
			   <ARG name="QUELMONTANT" value="return 'FAV';" />               
				<ARG name="PERIODE">
					<value>
						<![CDATA[
							if (SELECT.GROUPBY == 'MOIS') {return ROW.OID1;}
							if (SELECT.GROUPBY_2 == 'MOIS' && ROW.OID2 != '0' && ROW.OID2 != '-9999999') {return ROW.OID2;} 
							if (SELECT.GROUPBY_3 == 'MOIS' && ROW.OID3 != '0' && ROW.OID3 != '-9999999') {return ROW.OID3;} 							
							if (SELECT.GROUPBY == 'MOISA') {return ROW.OID1;}
							if (SELECT.GROUPBY_2 == 'MOISA' && ROW.OID2 != '0' && ROW.OID2 != '-9999999') {return ROW.OID2;} 
							if (SELECT.GROUPBY_3 == 'MOISA' && ROW.OID3 != '0' && ROW.OID3 != '-9999999') {return ROW.OID3;} 
							
						]]>
					</value>
				</ARG>
				<ARG name="TOPERIODE">
					<value>
						<![CDATA[
							if (SELECT.GROUPBY == 'MOIS') {return ROW.OID1;} 	
							if (SELECT.GROUPBY_2 == 'MOIS' && ROW.OID2 != '0' && ROW.OID2 != '-9999999') {return ROW.OID2;} 
							if (SELECT.GROUPBY_3 == 'MOIS' && ROW.OID3 != '0' && ROW.OID3 != '-9999999') {return ROW.OID3;} 	
							if (SELECT.GROUPBY == 'MOISA') {return ROW.OID1;} 	
							if (SELECT.GROUPBY_2 == 'MOISA' && ROW.OID2 != '0' && ROW.OID2 != '-9999999') {return ROW.OID2;} 
							if (SELECT.GROUPBY_3 == 'MOISA' && ROW.OID3 != '0' && ROW.OID3 != '-9999999') {return ROW.OID3;} 
						]]>
					</value>
				</ARG>
			</VIEWLINK>
		
			<VIEWLINK label="Comparatif" shortLabel="Comparatif" view="ACTI000063.XML" visible="= (TAB == 4)" enabled="true" rowContext="false" >
				<ARG name="QUELLEDATE" value="'3'" /> 
				<ARGS name="SPEC">
					<value><![CDATA[
						LINKVARIABLES['TYPE_COMPARAISON'] = '2';
						LINKVARIABLES['DATA1'] = 'MTFAC';
						LINKVARIABLES['DATA2'] = '0';
						LINKVARIABLES['DATA3'] = '0';
						if (SELECT.QUELMONTANT == '2') {
							LINKVARIABLES['DATA1'] = 'MTCPT';
						}
						if (SELECT.QUELMONTANT == 'FACVSBG') {
							//LINKVARIABLES['DATA1'] = 'MTCPT';
						}
						if (SELECT.QUELMONTANT == 'ENF') {
							LINKVARIABLES['DATA1'] = 'MTENC';
						}
						if (SELECT.QUELMONTANT == 'MF-ENF') {
							LINKVARIABLES['DATA1'] = 'MTFACENC';
						}
						if (SELECT.QUELMONTANT == 'MC-ENF') {
							LINKVARIABLES['DATA1'] = 'MTFACENC';
						}
						return 'OK';
					]]></value>
				</ARGS>
				<ARG name="GROUPBY" value="if (SELECT.GROUPBY == 'JOUR' ) {return 'JOURSF'}
											   if (SELECT.GROUPBY == 'JOURS' ) {return 'JOURSF'}
											   if (SELECT.GROUPBY == 'SEMAINEANNE' ) {return 'SEMAINEANNEF'}
											   if (SELECT.GROUPBY == 'NUMEROTRIM' ) {return 'NUMEROTRIMF'}
											   if (SELECT.GROUPBY == 'NUMEROMOIS' ) {return 'NUMEROMOISF'}
											   if (SELECT.GROUPBY == 'MOIS' ) {return 'MOISF'}
											   if (SELECT.GROUPBY == 'TRIM' ) {return 'TRIMF'}
											   if (SELECT.GROUPBY == 'ANNEE' ) {return 'ANNEEF'}
					" />
				<ARG name="DATA1" value="'FAVNBS'" />
				<ARG name="DATA2" value="'MTFACENC'" />
				<ARG name="DATA3" value="'FAVMTTHC'" />
				<ARG name="TYPE_COMPARAISON" value="'2'" />
			</VIEWLINK>
			<VIEWLINK label="Evolution" shortLabel="Evolution" view="ACTI000062.XML" enabled="true" rowContext="false" visible="= (TAB == 4)" componentName="PERIODICITE_VIEWLINK" >
				<ARG name="QUELLEDATE" value="'3'" /> 
				<ARGS name="SPEC">
					<value><![CDATA[
						LINKVARIABLES['TYPE_COMPARAISON'] = '2';
						LINKVARIABLES['DATA'] = 'MTFAC';
						if (SELECT.QUELMONTANT == '2') {
							LINKVARIABLES['DATA'] = 'MTCPT';
						}
						if (SELECT.QUELMONTANT == 'FACVSBG') {
							//LINKVARIABLES['DATA'] = 'MTCPT';
						}
						if (SELECT.QUELMONTANT == 'ENF') {
							LINKVARIABLES['DATA'] = 'MTENC';
						}
						if (SELECT.QUELMONTANT == 'MF-ENF') {
							LINKVARIABLES['DATA'] = 'MTFACENC';
						}
						if (SELECT.QUELMONTANT == 'MC-ENF') {
							LINKVARIABLES['DATA'] = 'MTFACENC';
						}
						return 'OK';
					]]></value>
				</ARGS>
				<ARG name="PERIODE" value="return SELECT.PERIODE.substr(0,4)+'-01-01'"/>
				<ARG name="GROUPBY" value="return 'UF';"/>
				<ARG name="DATA1" value="'FAVNBS'" />
				<ARG name="DATA2" value="'MTFACENC'" />
				<ARG name="DATA3" value="'FAVMTTHC'" />  
				<ARG name="PERIODICITE" value="if(SELECT.PERIODE.substr(5,2) == '01') {return 'WEEK2';} else {return 'MONTH';}" />    
			</VIEWLINK>
			<VIEWLINK label="Analyse croisée" shortLabel="Analyse croisée" view="ACTI000082.XML" enabled="true" rowContext="false" visible="= (TAB == 4)" buttonType="ANALYSE_CROISEE" >
				<ARG name="ALIAS_PERIODE" value="return '-1'" />
				<ARG name="QUELLEDATE" value="'3'" /> 
				<ARG name="PERIODE" value="return VIEW.X_PERIODE;" />
				<ARG name="DATA" value="'MTFAC'" />
				<ARG name="COLUMNBY" value="'NUMEROMOISF'" />
				<ARG name="GROUPBY" value="'ANNEEF'" />
				<ARG name="GROUPBY_2" value="return 'UF';"/>
				<ARG name="GROUPBY_TAB" value="'TAB'" />
				<ARG name="COLUMNBYCOUNT" value="'12'" />
			</VIEWLINK>	
			<VIEWLINK label="Analyse" shortLabel="Analyse" view="ACTI000018.XML" enabled="true" rowContext="false" visible="= (TAB == 4)" buttonType="ANALYSE" >
				<ARG name="ALIAS_PERIODE" value="return '-1'" />
				<ARG name="QUELLEDATE" value="return '3';" /> 
				<ARG name="GROUPBY" value="return 'UF';" />
				<ARG name="GROUPBY_TAB" value="'TAB'" />
			</VIEWLINK>	
			<VIEWLINK label="Liste des séjours" shortLabel="Séjours" view="ACTI000016.XML" componentName="PRESTATIONS_BASE_VIEWLINK" visible="= (TAB == 4)" component2Name="STANDARD_BASE_VIEWLINK" component3Name="ETA_DOS_BASE_VIEWLINK">
			   <ARG name="QUELLEDATE" value="'3'" />               
			   <ARGS name="SPEC">
					<value><![CDATA[
 						LINKVARIABLES['GROUPBY_2'] = '-1';
						LINKVARIABLES['GROUPBY_3'] = '-1';
                        if (SELECT.GROUPBY != '-1' && (ROW.OID1 == '0' || ROW.OID1 == '-9999999') || ROW == null) {
                            LINKVARIABLES['GROUPBY_2'] = SELECT.GROUPBY;
                        }
                        if (SELECT.GROUPBY_2 != '-1' && (ROW.OID2 == '0' || ROW.OID2 == '-9999999' || ROW == null)) {
                            if (LINKVARIABLES['GROUPBY_2'] == '-1') {
                                LINKVARIABLES['GROUPBY_2'] = SELECT.GROUPBY_2;
                            }
                            else {
                                LINKVARIABLES['GROUPBY_3'] = SELECT.GROUPBY_2;
                            }
                        }
                        

                        LINKVARIABLES['QUELMONTANT'] = 'FAC';
                        switch (TABNAME) {
                            case 'FAC' :
                                LINKVARIABLES['QUELMONTANT'] = 'FAC';
                                if (SELECT.QUELMONTANT == '2') {
                                    LINKVARIABLES['QUELMONTANT'] = 'CPT';
                                }
                                break;
                            case 'VAL' :
                                LINKVARIABLES['QUELMONTANT'] = 'VAL';
                                break;
                            case 'FAV' :
                                LINKVARIABLES['QUELMONTANT'] = 'FAV';
                                if (SELECT.QUELMONTANT == '2') {
                                    LINKVARIABLES['QUELMONTANT'] = 'CPV';
                                }
                                break;
                            case 'TIE' :
                                LINKVARIABLES['QUELMONTANT'] = 'FACTIE';
                                if (SELECT.QUELMONTANT == '2') {
                                    LINKVARIABLES['QUELMONTANT'] = 'CPTTIE';
                                }
                                break;
                            default :
                                LINKVARIABLES['QUELMONTANT'] = 'FAC';
                                break;
                        }
						return 'OK';
					]]></value>
				</ARGS>
				<ARG name="PERIODE">
					<value>
						<![CDATA[
							if (SELECT.GROUPBY == 'MOIS') {return ROW.OID1;}
							if (SELECT.GROUPBY_2 == 'MOIS' && ROW.OID2 != '0' && ROW.OID2 != '-9999999') {return ROW.OID2;} 
							if (SELECT.GROUPBY_3 == 'MOIS' && ROW.OID3 != '0' && ROW.OID3 != '-9999999') {return ROW.OID3;} 							
							if (SELECT.GROUPBY == 'MOISV') {return ROW.OID1;}
							if (SELECT.GROUPBY_2 == 'MOISV' && ROW.OID2 != '0' && ROW.OID2 != '-9999999') {return ROW.OID2;} 
							if (SELECT.GROUPBY_3 == 'MOISV' && ROW.OID3 != '0' && ROW.OID3 != '-9999999') {return ROW.OID3;} 
							if (SELECT.GROUPBY == 'MOISF') {return ROW.OID1;}
							if (SELECT.GROUPBY_2 == 'MOISF' && ROW.OID2 != '0' && ROW.OID2 != '-9999999') {return ROW.OID2;} 
							if (SELECT.GROUPBY_3 == 'MOISF' && ROW.OID3 != '0' && ROW.OID3 != '-9999999') {return ROW.OID3;} 
							if (SELECT.GROUPBY == 'MOISEX') {return ROW.OID1;}
							if (SELECT.GROUPBY_2 == 'MOISEX' && ROW.OID2 != '0' && ROW.OID2 != '-9999999') {return ROW.OID2;} 
							if (SELECT.GROUPBY_3 == 'MOISEX' && ROW.OID3 != '0' && ROW.OID3 != '-9999999') {return ROW.OID3;} 
							
						]]>
					</value>
				</ARG>
				<ARG name="TOPERIODE">
					<value>
						<![CDATA[
							if (SELECT.GROUPBY == 'MOIS') {return ROW.OID1;} 	
							if (SELECT.GROUPBY_2 == 'MOIS' && ROW.OID2 != '0' && ROW.OID2 != '-9999999') {return ROW.OID2;} 
							if (SELECT.GROUPBY_3 == 'MOIS' && ROW.OID3 != '0' && ROW.OID3 != '-9999999') {return ROW.OID3;} 	
							if (SELECT.GROUPBY == 'MOISV') {return ROW.OID1;} 	
							if (SELECT.GROUPBY_2 == 'MOISV' && ROW.OID2 != '0' && ROW.OID2 != '-9999999') {return ROW.OID2;} 
							if (SELECT.GROUPBY_3 == 'MOISV' && ROW.OID3 != '0' && ROW.OID3 != '-9999999') {return ROW.OID3;} 
							if (SELECT.GROUPBY == 'MOISF') {return ROW.OID1;}	
							if (SELECT.GROUPBY_2 == 'MOISF' && ROW.OID2 != '0' && ROW.OID2 != '-9999999') {return ROW.OID2;} 
							if (SELECT.GROUPBY_3 == 'MOISF' && ROW.OID3 != '0' && ROW.OID3 != '-9999999') {return ROW.OID3;} 
							if (SELECT.GROUPBY == 'MOISEX') {return ROW.OID1;}	
							if (SELECT.GROUPBY_2 == 'MOISEX' && ROW.OID2 != '0' && ROW.OID2 != '-9999999') {return ROW.OID2;} 
							if (SELECT.GROUPBY_3 == 'MOISEX' && ROW.OID3 != '0' && ROW.OID3 != '-9999999') {return ROW.OID3;} 
						]]>
					</value>
				</ARG>
			</VIEWLINK>
		
			<VIEWLINK label="Comparatif" shortLabel="Comparatif"  view="ACTI000060.XML" rowContext="false" visible="= (TAB == 5)" 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 'JOURSEX'}
											   if (SELECT.GROUPBY == 'JOURS' ) {return 'JOURSEX'}
											   if (SELECT.GROUPBY == 'SEMAINEANNE' ) {return 'SEMAINEANNEEX'}
											   if (SELECT.GROUPBY == 'NUMEROTRIM' ) {return 'NUMEROTRIMEX'}
											   if (SELECT.GROUPBY == 'NUMEROMOIS' ) {return 'NUMEROMOISEX'}
											   if (SELECT.GROUPBY == 'MOIS' ) {return 'MOISEX'}
											   if (SELECT.GROUPBY == 'TRIM' ) {return 'TRIMEX'}
											   if (SELECT.GROUPBY == 'ANNEE' ) {return 'ANNEEEX'}
					" />				
					<ARG name="GROUPBY_2" value="return SELECT.GROUBY_2" />
					<ARG name="DATA1" value="'NSEJ'" />
					<ARG name="DATA2" value="'MVFAC'" />
					<ARG name="DATA3" value="'MVFHC'" />
					<ARG name="TYPE_COMPARAISON" value="'2'" />
			</VIEWLINK>
			<VIEWLINK label="Evolution" shortLabel="Evolution"  view="ACTI000059.XML" rowContext="false" visible="= (TAB == 5)" enabled="true" buttonType="EVOLUTION" componentName="PERIODICITE_VIEWLINK" >
				<ARG name="PERIODE" value="return SELECT.PERIODE.substr(0,4)+'-01-01'"/>
				<ARG name="DATA" value="'MVFAC'"/>
				<ARG name="GROUPBY" value="return 'UFS';"/>
				<ARG name="PERIODICITE" value="if(SELECT.PERIODE.substr(5,7) == '01') {return 'WEEK2';} else {return 'MONTH';}" /> 
			</VIEWLINK>
			<VIEWLINK label="Analyse croisée" shortLabel="Analyse croisée" view="ACTI000137.XML" visible="= (TAB == 5)" enabled="true" rowContext="false" buttonType="ANALYSE_CROISEE" >
				<ARG name="ALIAS_PERIODE" value="return '-1'" />
				<ARG name="PERIODE" value="return VIEW.X_PERIODE;" />
				<ARG name="DATA" value="'MVFAC'" />
				<ARG name="COLUMNBY" value="'NUMEROMOISEX'" />
				<ARG name="GROUPBY" value="'ANNEEEX'" />
				<ARG name="GROUPBY_2" value="return 'UFS';"/>
				<ARG name="GROUPBY_TAB" value="'TAB'" />
				<ARG name="COLUMNBYCOUNT" value="'12'" />
			</VIEWLINK>
			<VIEWLINK label="Analyse" shortLabel="Analyse" view="ACTI000057.XML" enabled="true" rowContext="false" visible="= (TAB == 5)" buttonType="ANALYSE" >
				<ARG name="ALIAS_PERIODE" value="return '-1'" />
				<ARG name="GROUPBY" value="if (SELECT.GROUPBY == 'JOUR') {return 'JOUREX'}
											   if (SELECT.GROUPBY == 'JOURS' ) {return 'JOURSEX'}
											   if (SELECT.GROUPBY == 'MOIS' ) {return 'NUMEROMOISEX'}
											   if (SELECT.GROUPBY == 'NUMEROMOIS' ) {return 'NUMEROMOISEX'};" />
				<ARG name="GROUPBY_TAB" value="'TAB'" />
			</VIEWLINK>	
			<VIEWLINK label="Liste des séjours" shortLabel="Séjours" view="ACTI000058.XML"  visible="= (TAB == 5)" componentName="ETA_DOS_BASE_VIEWLINK" component2Name="STANDARD_BASE_VIEWLINK">
				<ARG name="PERIODE">
					<value>
						<![CDATA[
							if (SELECT.GROUPBY == 'MOIS') {return ROW.OID1;}
							if (SELECT.GROUPBY_2 == 'MOIS' && ROW.OID2 != '0' && ROW.OID2 != '-9999999') {return ROW.OID2;} 
							if (SELECT.GROUPBY_3 == 'MOIS' && ROW.OID3 != '0' && ROW.OID3 != '-9999999') {return ROW.OID3;} 
							if (SELECT.GROUPBY == 'MOISF') {return ROW.OID1;}
							if (SELECT.GROUPBY_2 == 'MOISF' && ROW.OID2 != '0' && ROW.OID2 != '-9999999') {return ROW.OID2;} 
							if (SELECT.GROUPBY_3 == 'MOISF' && ROW.OID3 != '0' && ROW.OID3 != '-9999999') {return ROW.OID3;} 
							if (SELECT.GROUPBY == 'MOISEX') {return ROW.OID1;}
							if (SELECT.GROUPBY_2 == 'MOISEX' && ROW.OID2 != '0' && ROW.OID2 != '-9999999') {return ROW.OID2;} 
							if (SELECT.GROUPBY_3 == 'MOISEX' && ROW.OID3 != '0' && ROW.OID3 != '-9999999') {return ROW.OID3;} 
							
						]]>
					</value>
				</ARG>
				<ARG name="TOPERIODE">
					<value>
						<![CDATA[
							if (SELECT.GROUPBY == 'MOIS') {return ROW.OID1;} 	
							if (SELECT.GROUPBY_2 == 'MOIS' && ROW.OID2 != '0' && ROW.OID2 != '-9999999') {return ROW.OID2;} 
							if (SELECT.GROUPBY_3 == 'MOIS' && ROW.OID3 != '0' && ROW.OID3 != '-9999999') {return ROW.OID3;} 
							if (SELECT.GROUPBY == 'MOISF') {return ROW.OID1;}	
							if (SELECT.GROUPBY_2 == 'MOISF' && ROW.OID2 != '0' && ROW.OID2 != '-9999999') {return ROW.OID2;} 
							if (SELECT.GROUPBY_3 == 'MOISF' && ROW.OID3 != '0' && ROW.OID3 != '-9999999') {return ROW.OID3;} 
							if (SELECT.GROUPBY == 'MOISEX') {return ROW.OID1;}	
							if (SELECT.GROUPBY_2 == 'MOISEX' && ROW.OID2 != '0' && ROW.OID2 != '-9999999') {return ROW.OID2;} 
							if (SELECT.GROUPBY_3 == 'MOISEX' && ROW.OID3 != '0' && ROW.OID3 != '-9999999') {return ROW.OID3;} 
						]]>
					</value>
				</ARG>
				<ARG name="QUELLEDATE">
					<value>
						<![CDATA[
								return '3';
						]]>
					</value>
				</ARG>
				<ARG name="QDETAIL_TIERS"> 
					<value>
						<![CDATA[
							return '-1';
						]]>
					</value>
				</ARG>		
			</VIEWLINK>
		</VIEWLINKS>
		<ONGLET excelLabel="Synthèse" label="Synthèse" multiTab="true" queryNumber="6">
			<CHART title="Analyse par mois" type="lineChart" maxItems="12" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq="" visibleCondition="(SELECT.GROUPBY == 'MOIS') || (SELECT.GROUPBY == 'NUMEROMOIS')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
				<SERIE field="CATOTAL" displayName="C.A. Sorti"/>
				<SERIE field="CATOTALOCC" displayName="C.A. Activité"/>
				<SERIE field="CA_FAC" displayName="C.A. Facturés"/>
				<!-- <SERIE field="CA_REG" displayName="C.A. Réglés"/>  -->
			</CHART> 			
			<CHART title="Analyse par mois" type="lineChart" maxItems="12" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq="" visibleCondition="(SELECT.GROUPBY == 'MOIS') || (SELECT.GROUPBY == 'NUMEROMOIS')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
				<SERIE field="NSEJSO" displayName="Nb sejour Sorti"/>
				<SERIE field="NSEJOCC" displayName="Nb sejour Activité"/>
				<SERIE field="SEJ_FAC" displayName="Nb sejour Facturé"/>
				<SERIE field="SEJ_EXP" displayName="Nb sejour Expédié"/>
				 <SERIE field="SEJ_REG" displayName="Nb sejour Réglé"/>  
			</CHART> 			
			<CHART title="Analyse par semaine annuelle" type="lineChart" maxItems="52" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq="" visibleCondition="(SELECT.GROUPBY == 'SEMAINEANNE')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
				<SERIE field="CATOTAL" displayName="C.A. Sortis"/>
				<SERIE field="CATOTALOCC" displayName="C.A. Activité"/>
				<SERIE field="CA_FAC" displayName="C.A. Facturés"/>
				<!-- <SERIE field="CA_REG" displayName="C.A. Réglés"/>  -->
			</CHART>   
			<CHART title="Analyse par semaine annuelle" type="lineChart" maxItems="52" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq="" visibleCondition="(SELECT.GROUPBY == 'SEMAINEANNE')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
				<SERIE field="CATOTAL" displayName="C.A. Sortis"/>
				<SERIE field="CATOTALOCC" displayName="C.A. Activité"/>
				<SERIE field="CA_FAC" displayName="C.A. Facturés"/>
				<SERIE field="CA_EXP" displayName="C.A. Expédiés "/>
				<SERIE field="CA_REG" displayName="C.A. Réglés"/> 
			</CHART>  			
			<CHART title="Analyse par jour (30 premiers)" type="lineChart" maxItems="30" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq="" visibleCondition="(SELECT.GROUPBY == 'JOUR') || (SELECT.GROUPBY == 'JOURS')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
				<SERIE field="CATOTALOCC" displayName="C.A. Activité"/>
				<SERIE field="CA_GRB" displayName="C.A. Groupé"/>
				<SERIE field="CATOTAL" displayName="C.A. Sorti"/>
				<SERIE field="CA_FAC" displayName="C.A. Facturé"/>
			</CHART>  
			<CHART title="Analyse par jour (30 premiers)" type="lineChart" maxItems="30" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq="" visibleCondition="(SELECT.GROUPBY == 'JOUR') || (SELECT.GROUPBY == 'JOURS')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
				<SERIE field="CATOTALOCC" displayName="C.A. Activité"/>
				<SERIE field="CATOTAL" displayName="C.A. Sorti"/>
				<SERIE field="CA_GRB" displayName="C.A. Groupé"/>
				<SERIE field="CA_FAC" displayName="C.A. Facturé"/>
				<SERIE field="CA_EXP" displayName="C.A. Expédié"/>
				 <SERIE field="CA_REG" displayName="C.A. Réglé"/> 
			</CHART>  
			<CHART title="Analyse par Trimestre" type="lineChart" maxItems="50" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq="" visibleCondition="(SELECT.GROUPBY == 'NUMEROTRIM') || (SELECT.GROUPBY == 'TRIM')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
				<SERIE field="CATOTAL" displayName="C.A. Sortis"/>
				<SERIE field="CATOTALOCC" displayName="C.A. Activité"/>
				<SERIE field="CA_FAC" displayName="C.A. Facturés"/>	
			</CHART>	
			<CHART title="Analyse par Trimestre" type="lineChart" maxItems="50" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq="" visibleCondition="(SELECT.GROUPBY == 'NUMEROTRIM') || (SELECT.GROUPBY == 'TRIM')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
				<SERIE field="CATOTAL" displayName="C.A. Sortis"/>
				<SERIE field="CATOTALOCC" displayName="C.A. Activité"/>
				<SERIE field="CA_FAC" displayName="C.A. Facturés"/>
				<SERIE field="CA_EXP" displayName="C.A. Expédiés"/>
				<SERIE field="CA_REG" displayName="C.A. Réglés"/> 
			</CHART>			
			<DATAGRID title="" total="true" showOthers="true" headerHeight="60" selectRowInRows="= ROW.OID == '-9999997'" otherRowInRows="= ROW.OID == '-9999998'" totalRowInRows="= ROW.OID == '-9999999'" sortable="= SELECT.GROUPBY_3 == '-1' &amp;&amp; (SELECT.GROUPBY_2 == '-1' || SELECT.GROUPBY_TAB == 'TAB')">
				<INSERT name="DATAGRID_MULTITAB_STYLES"/>
				<COLUMN dataField="ONGLET" width="60" type="Number" visible="false" headerText="Onglet">
				</COLUMN>				
				<COLUMN dataField="OID" width="60" type="Char" visible="false" headerText="Oid">
				</COLUMN>
				<COLUMN dataField="COD" width="70" type="Char" visible="true" headerText="Code" textAlign="left" otherFunction="text" totalFunction="text">
					<INSERT name="COLUMN_COD_MULTITAB_STYLES"/>
				</COLUMN>
				<COLUMN dataField="TXT" type="Char" minWidth="50" headerText="SELECT.GROUPBY_LABEL" headerTextCalc="true" textAlign="left" totalFunction="text" totalComplement="TOTAL" otherFunction="text" otherComplement="Autres">
				</COLUMN>
				<COLUMN dataField="NSEJOCC" width="70" type="Number" visible="true" outputFormat="#" currency="" fixed="false" currencyAlign="right" headerText="Séjour Activité" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de séjour activité total" >
					<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
					<HEADERCELLSTYLE name="textAlign" value="center"/>						
				</COLUMN>
				<COLUMN dataField="CATOTALOCC" width="80" type="Number" visible="true" outputFormat="#E" fixed="false" headerText="C.A.@LF@Activité" textAlign="right" totalFunction="sum" otherFunction="sum"   description="C.A. activité total" >
					<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
					<HEADERCELLSTYLE name="textAlign" value="center"/>						
				</COLUMN>				
				<COLUMN dataField="SEJ_GRB" width="70" type="Number" visible="true" outputFormat="#" currency="" currencyAlign="right" headerText="Séjour Groupé" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de séjour groupé total" >
					<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
					<HEADERCELLSTYLE name="textAlign" value="center"/>						
				</COLUMN>
				<COLUMN dataField="CA_GRB" width="80" type="Number" visible="true" outputFormat="#E" fixed="false" headerText="C.A.@LF@Groupé" textAlign="right" totalFunction="sum" otherFunction="sum"   description="C.A. groupé total" >
					<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
					<HEADERCELLSTYLE name="textAlign" value="center"/>						
				</COLUMN>
				<COLUMN dataField="NSEJSO" width="65" type="Number" visible="true" outputFormat="#" currency="" currencyAlign="right" headerText="Séjour Sorti" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de séjour sorti total" >
					<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
					<HEADERCELLSTYLE name="textAlign" value="center"/>						
				</COLUMN>
				<COLUMN dataField="CATOTAL" width="80" type="Number" visible="true" outputFormat="#E" fixed="false" headerText="C.A.@LF@Sorti" textAlign="right" totalFunction="sum" otherFunction="sum"   description="C.A. sorti total( C.A. Facturé + C.A. Valorisé)" >
					<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
					<HEADERCELLSTYLE name="textAlign" value="center"/>						
				</COLUMN>				
				<COLUMN dataField="SEJ_FAC" width="65" type="Number" visible="true" outputFormat="#" currency="" currencyAlign="right" headerText="Séjour Facturé" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de séjour facturé" >
					<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
					<HEADERCELLSTYLE name="textAlign" value="center"/>						
				</COLUMN>
				<COLUMN dataField="CA_FAC"   width="80" type="Number" visible="true" outputFormat="#E" fixed="false" headerText="C.A.@LF@Facturé" textAlign="right" totalFunction="sum" otherFunction="sum" description="C.A. facturé sur la période" >
					<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
					<HEADERCELLSTYLE name="textAlign" value="center"/>						
				</COLUMN>
				<COLUMN dataField="SEJ_EXP" width="65" type="Number" visible="true" outputFormat="#" currency="" currencyAlign="right" headerText="Séjour Expédié" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de séjour expédié" >
					<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
					<HEADERCELLSTYLE name="textAlign" value="center"/>						
				</COLUMN>
				<COLUMN dataField="CA_EXP" width="80" type="Number" visible="true" outputFormat="#E" fixed="false" headerText="C.A.@LF@Expédié" selectable="true" textAlign="right" totalFunction="sum" otherFunction="sum" description="C.A. expédié sur la période" >
					<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
					<HEADERCELLSTYLE name="textAlign" value="center"/>						
				</COLUMN>
				<COLUMN dataField="SEJ_REG" width="65" type="Number" visible="true" outputFormat="#" currency="" currencyAlign="right" headerText="Séjour Réglé" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de séjour Réglé" >
					<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
					<HEADERCELLSTYLE name="textAlign" value="center"/>						
				</COLUMN>
				<COLUMN dataField="CA_REG" width="80" type="Number" visible="true" outputFormat="#E" fixed="false" headerText="C.A.@LF@Réglé" textAlign="right" totalFunction="sum" otherFunction="sum" description="C.A. réglé sur la période" >
					<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
					<HEADERCELLSTYLE name="textAlign" value="center"/>						
				</COLUMN>
			</DATAGRID>
		</ONGLET>
		<ONGLET excelLabel="Activité" label="Activité" multiTab="true">
			<CHART title="Analyse (12 mois)" type="lineChart" maxItems="12" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq="" visibleCondition="(SELECT.GROUPBY == 'MOIS') || (SELECT.GROUPBY == 'NUMEROMOIS') || (SELECT.GROUPBY == 'ANNEE')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
				<SERIE field="MFPVO" displayName="C.A. Total"  />
				<SERIE field="MMOCC" displayName="C.A. Moyen"  />
			</CHART> 	
			<CHART title="Analyse (12 mois)" type="columnChart" maxItems="12" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq="" subType="overlaid" visibleCondition="(SELECT.GROUPBY == 'MOIS') || (SELECT.GROUPBY == 'NUMEROMOIS')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
					<SERIE field="NSEJO" displayName="Nb séjour"  />
			</CHART>
			<CHART title="Analyse  (52 premiers)" type="lineChart" maxItems="52" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq="" visibleCondition="(SELECT.GROUPBY == 'SEMAINEANNE')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
				<SERIE field="MFPVO" displayName="C.A. Total"  />
			</CHART> 
			<CHART title="Analyse  (30 jours)" type="lineChart" maxItems="31" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq="" visibleCondition="(SELECT.GROUPBY == 'JOUR') || (SELECT.GROUPBY == 'JOURS')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
				<SERIE field="MFPVO" displayName="C.A. Total"  />
				<SERIE field="MJOCC" displayName="C.A. Moyen"  />
			</CHART>  			
			<CHART title="Analyse  (30 jours)" type="mixedChart" maxItems="31" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq="" visibleCondition="(SELECT.GROUPBY == 'JOUR') || (SELECT.GROUPBY == 'JOURS')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
				<SERIE field="MFPVO" displayName="C.A. Total"  type="column" />
				<SERIE field="MJOCC" displayName="C.A. Moyen" type="line" />
			</CHART>  
			<CHART title="Analyse par Trimestre" type="columnChart" maxItems="12" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq="" subType="overlaid" visibleCondition="(SELECT.GROUPBY == 'NUMEROTRIM') || (SELECT.GROUPBY == 'TRIM')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
					<SERIE field="MFPVO" displayName="C.A. Total"  />
			</CHART> 			
				<DATAGRID title="" total="true" showOthers="true" key="COD" headerHeight="54" selectRowInRows="= ROW.OID == '-9999997'" otherRowInRows="= ROW.OID == '-9999998'" totalRowInRows="= ROW.OID == '-9999999'" sortable="= SELECT.GROUPBY_3 == '-1' &amp;&amp; (SELECT.GROUPBY_2 == '-1' || SELECT.GROUPBY_TAB == 'TAB')">
					<INSERT name="DATAGRID_MULTITAB_STYLES"/>
					<COLUMN dataField="OID" width="60" type="Char" visible="false" headerText="Oid">
					</COLUMN>
					<COLUMN dataField="COD" width="70" type="Char" visible="true" headerText="Code" textAlign="left" otherFunction="text" totalFunction="text">
						<INSERT name="COLUMN_COD_MULTITAB_STYLES"/>
					</COLUMN>
					<COLUMN dataField="TXT" type="Char" minWidth="50" headerText="SELECT.GROUPBY_LABEL" headerTextCalc="true" textAlign="left" totalFunction="text" totalComplement="TOTAL" otherFunction="text" otherComplement="Autres">
					</COLUMN>
					<COLUMN dataField="NSEJO" width="65" type="Number" visible="true" outputFormat="#" fixed="false"  currency="" currencyAlign="right" headerText="Séjours" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de séjours">
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>						
					</COLUMN>
					<COLUMN dataField="NFACO" width="60" type="Number" outputFormat="#" headerText="Nb Factures" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de factures en tenant compte des compléments de facture(Avoir-Additif)" >
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>					
					</COLUMN>
					<COLUMN dataField="MFPVO" width="80" type="Number" visible="true" outputFormat="#E" fixed="false" headerText="C.A. total" textAlign="right" totalFunction="calc" otherFunction="calc" calc="true"  description="C.A. Total" >
						<CALC formula="ROW.MFACO + ROW.MNFACO" />
						<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>	
					</COLUMN>
					<COLUMN dataField="PTMFPVO" type="Number" headerText="% Total" width="55" outputFormat="#%" fixed="false" textAlign="right" totalFunction="calc" otherFunction="calc" calc="true" description="">
						<CALC formula="ROW.MFPVO * 100 / TOTALROW.MFPVO" />
						<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>	
					</COLUMN>
					<COLUMN dataField="CA_Moyen_fvo" type="Number" headerText="C.A. Moyen" width="55" outputFormat="#E" fixed="false" textAlign="right" totalFunction="calc" otherFunction="calc" calc="true" description="C.A. Moyen">
						<CALC formula="ROW.MFPVO / ROW.NSEJO" />					
						<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>	
					</COLUMN>
					<COLUMN dataField="MFACO" width="80" type="Number" visible="true" outputFormat="#E" fixed="false" headerText="C.A. facturé" textAlign="right" totalFunction="sum" otherFunction="sum" description="C.A. facturé période">
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>						
					</COLUMN>
					<COLUMN dataField="PTMFACO" type="Number" headerText="% Total" width="55" outputFormat="#%" fixed="false" textAlign="right" totalFunction="calc" otherFunction="calc" calc="true" description="% Total">
						<CALC formula="ROW.MFACO * 100 / TOTALROW.MFACO" />
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>	
					</COLUMN>				
					<COLUMN dataField="CA_Moyen_fo" type="Number" headerText="C.A. Moyen" width="55" outputFormat="#E" fixed="false" textAlign="right" totalFunction="calc" otherFunction="calc" calc="true" description="C.A. Moyen">
						<CALC formula="ROW.MFACO / ROW.NSEJO" />
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>	
					</COLUMN>
					<COLUMN dataField="NNFACO" width="65" type="Number" outputFormat="#" fixed="false" visible="true" headerText="Nb Valorisé" selectable="true" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de factures de référence non facturées">
						<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>	
					</COLUMN>
					<COLUMN dataField="MNFACO" width="80" type="Number" visible="true" outputFormat="#E" fixed="false" headerText="C.A. valorisé" textAlign="right" totalFunction="sum" otherFunction="sum"  description="C.A. de la valorisation des factures de référence non facturées" >
						<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>	
					</COLUMN>
					<COLUMN dataField="PTMNFACO" type="Number" headerText="% Total" width="55" outputFormat="#%" fixed="false" textAlign="right" totalFunction="calc" otherFunction="calc" calc="true" >
						<CALC formula="ROW.MNFACO * 100 / TOTALROW.MNFACO" />
						<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>	
					</COLUMN>
					<COLUMN dataField="CA_Moyen_vo" type="Number" headerText="C.A. Moyen" width="55" outputFormat="#E" fixed="false" textAlign="right" totalFunction="calc" otherFunction="calc" calc="true" >
						<CALC formula="ROW.MNFACO / ROW.NNFACO" />
						<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>	
					</COLUMN>
					<COLUMN dataField="MJOCC" width="80" type="Number" visible="false" outputFormat="#E" fixed="false" headerText="C.A. total"  textAlign="right" totalFunction="sum" otherFunction="sum">
					</COLUMN>					
					<COLUMN dataField="MMOCC" width="80" type="Number" visible="false" outputFormat="#E" fixed="false" headerText="C.A. total"  textAlign="right" totalFunction="sum" otherFunction="sum">
					</COLUMN>
				</DATAGRID>
			</ONGLET>
		<ONGLET excelLabel="PMSI" label="PMSI" multiTab="true" queryNumber="1" >
			<CHART title="Analyse (12 mois)" type="lineChart" maxItems="12" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq="" visibleCondition="(SELECT.GROUPBY == 'MOIS') || (SELECT.GROUPBY == 'NUMEROMOIS') || (SELECT.GROUPBY == 'ANNEE')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
				<SERIE field="MFPV" displayName="C.A. Total"/>
				<SERIE field="MMGRP" displayName="C.A. Moyen"/>
			</CHART> 			
			<CHART title="Analyse (12 mois)" type="columnChart" maxItems="12" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq="" subType="overlaid"   visibleCondition="(SELECT.GROUPBY == 'MOIS') || (SELECT.GROUPBY == 'NUMEROMOIS') || (SELECT.GROUPBY == 'ANNEE')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
					<SERIE field="NSEJ" displayName="Nb séjour"  />
			</CHART>			

			<CHART title="Analyse par sempaine annuelle" type="lineChart" maxItems="52" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq="" visibleCondition="(SELECT.GROUPBY == 'SEMAINEANNE')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
				<SERIE field="MFPV" displayName="C.A. Total"  />
			</CHART> 
			<CHART title="Analyse par Trimestre" type="columnChart" maxItems="12" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq="" subType="overlaid"  visibleCondition="(SELECT.GROUPBY == 'NUMEROTRIM') || (SELECT.GROUPBY == 'TRIM')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
				<SERIE field="MFPV" displayName="C.A. Total"  />
			</CHART>  			
			<CHART title="Analyse par jour (30 jours)  |  C.A. moyen calculer par 30 ème" type="lineChart" maxItems="30" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq="" visibleCondition="(SELECT.GROUPBY == 'JOUR') || (SELECT.GROUPBY == 'JOURS')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
				<SERIE field="MFPV" displayName="C.A. Total"  />
				<SERIE field="MJGRP" displayName="C.A Moyen" />
			</CHART>  				
			<CHART title="Analyse par jour (30 jours)" type="columnChart" maxItems="30" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq="" visibleCondition="(SELECT.GROUPBY == 'JOUR') || (SELECT.GROUPBY == 'JOURS')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
					<SERIE field="NSEJ" displayName="Nb séjour"  />
			</CHART>  			
			<DATAGRID title="" total="true" showOthers="true" key="COD" headerHeight="54" selectRowInRows="= ROW.OID == '-9999997'" otherRowInRows="= ROW.OID == '-9999998'" totalRowInRows="= ROW.OID == '-9999999'" sortable="= SELECT.GROUPBY_3 == '-1' &amp;&amp; (SELECT.GROUPBY_2 == '-1' || SELECT.GROUPBY_TAB == 'TAB')">
				<INSERT name="DATAGRID_MULTITAB_STYLES"/>
				<COLUMN dataField="OID" width="60" type="Char" visible="false" headerText="Oid">
				</COLUMN>
				<COLUMN dataField="COD" width="70" type="Char" visible="true" headerText="Code" textAlign="left" otherFunction="text" totalFunction="text">
					<INSERT name="COLUMN_COD_MULTITAB_STYLES"/>
				</COLUMN>
				<COLUMN dataField="TXT" type="Char" minWidth="50" headerText="SELECT.GROUPBY_LABEL" headerTextCalc="true" textAlign="left" totalFunction="text" totalComplement="TOTAL" otherFunction="text" otherComplement="Autres">
				</COLUMN>
				<COLUMN dataField="NSEJ" width="65" type="Number" visible="true" outputFormat="#" fixed="false" currency="" currencyAlign="right" headerText="Séjours" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de séjours groupés">
					<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
					<HEADERCELLSTYLE name="textAlign" value="center"/>	
				</COLUMN>
				<COLUMN dataField="NFAC" width="60" type="Number" outputFormat="#" headerText="Nb Factures" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de factures en tenant compte des compléments de facture(Avoir-Additif)" >
					<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
					<HEADERCELLSTYLE name="textAlign" value="center"/>					
				</COLUMN>
				<COLUMN dataField="MFPV" width="80" type="Number" visible="true" outputFormat="#E" fixed="false" headerText="C.A. total" selectable ="true" textAlign="right" totalFunction="calc" otherFunction="calc" calc="true"  description="C.A. de la valorisation des factures de référence non facturées" >
					<CALC formula="ROW.MFAC + ROW.MNFAC" />
					<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
					<HEADERCELLSTYLE name="textAlign" value="center"/>			
				</COLUMN>
				<COLUMN dataField="PTMFPV" type="Number" headerText="% Total" width="55" outputFormat="#%" fixed="false" textAlign="right" totalFunction="calc" otherFunction="calc" calc="true" description="% Total">
					<CALC formula="ROW.MFPV * 100 / TOTALROW.MFPV" />
					<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
					<HEADERCELLSTYLE name="textAlign" value="center"/>			
				</COLUMN>
				<COLUMN dataField="CA_Moyen_fv" type="Number" headerText="C.A. Moyen" width="55" outputFormat="#E" fixed="false" textAlign="right" totalFunction="calc" otherFunction="calc" calc="true" description="C.A. Moyen (C.A. Total) ">
					<CALC formula="ROW.MFPV / ROW.NSEJ" />
					<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
					<HEADERCELLSTYLE name="textAlign" value="center"/>			
				</COLUMN>
				<COLUMN dataField="NSEJF" type="Number" headerText="Nb facturé" width="55" outputFormat="#" fixed="false" textAlign="right" totalFunction="calc" otherFunction="calc" calc="true" description="Nombre séjours facturé">
					<CALC formula="ROW.NSEJ - ROW.NNFAC" />
					<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
					<HEADERCELLSTYLE name="textAlign" value="center"/>			
				</COLUMN>
				<COLUMN dataField="MFAC" width="80" type="Number" visible="true" outputFormat="#E" fixed="false" selectable="true" headerText="C.A. facturé" textAlign="right" totalFunction="sum" otherFunction="sum" description="C.A. facturé période">
					<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
					<HEADERCELLSTYLE name="textAlign" value="center"/>	
				</COLUMN>
				<COLUMN dataField="PTMFAC" type="Number" headerText="% Total" width="55" outputFormat="#%" fixed="false" textAlign="right" totalFunction="calc" otherFunction="calc" calc="true" description="% Total">
					<CALC formula="ROW.MFAC * 100 / TOTALROW.MFAC" />
					<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
					<HEADERCELLSTYLE name="textAlign" value="center"/>	
				</COLUMN>				
				<COLUMN dataField="CA_Moyen_f" type="Number" headerText="C.A. Moyen" width="55" outputFormat="#E" fixed="false" textAlign="right" totalFunction="calc" otherFunction="calc" calc="true" description="C.A. Moyen (C.A. facturé) ">
					<CALC formula="ROW.MFAC / ROW.NSEJ" />
					<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
					<HEADERCELLSTYLE name="textAlign" value="center"/>	
				</COLUMN>
				<COLUMN dataField="NNFAC" width="65" type="Number" outputFormat="#" fixed="false" visible="true" headerText="Nb Valorisé" selectable="true" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de factures de référence non facturées">
					<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
					<HEADERCELLSTYLE name="textAlign" value="center"/>			
				</COLUMN>
				<COLUMN dataField="MNFAC" width="80" type="Number" visible="true" outputFormat="#E" fixed="false" headerText="C.A. valorisé" selectable="true" textAlign="right" totalFunction="sum" otherFunction="sum"  description="C.A. de la valorisation des factures de référence non facturées" >
					<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
				    <HEADERCELLSTYLE name="textAlign" value="center"/>			
				</COLUMN>
				<COLUMN dataField="PTMNFAC" type="Number" headerText="% Total" width="55" outputFormat="#%" fixed="false" textAlign="right" totalFunction="calc" otherFunction="calc" calc="true" description="% Total">
					<CALC formula="ROW.MNFAC * 100 / TOTALROW.MNFAC" />
					<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
					<HEADERCELLSTYLE name="textAlign" value="center"/>			
				</COLUMN>
				<COLUMN dataField="CA_Moyen_v" type="Number" headerText="C.A. Moyen" width="55" outputFormat="#E" fixed="false" textAlign="right" totalFunction="calc" otherFunction="calc" calc="true" description="C.A. Moyen (C.A. valorisé)">
					<CALC formula="ROW.MNFAC / ROW.NNFAC" />
					<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
					<HEADERCELLSTYLE name="textAlign" value="center"/>			
				</COLUMN>
				<COLUMN dataField="MJGRP" width="80" type="Number" visible="false" outputFormat="#E" fixed="false" headerText="C.A. total"  textAlign="right" totalFunction="sum" otherFunction="sum">
				</COLUMN>				
				<COLUMN dataField="MMGRP" width="80" type="Number" visible="false" outputFormat="#E" fixed="false" headerText="C.A. total"  textAlign="right" totalFunction="sum" otherFunction="sum">
				</COLUMN>
			</DATAGRID>
		</ONGLET>
		<ONGLET excelLabel="Sortie" label="Sortie" multiTab="true" queryNumber="2">
				<CHART title="Analyse (12 mois)" type="lineChart" maxItems="12" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq="" visibleCondition="(SELECT.GROUPBY == 'MOIS') || (SELECT.GROUPBY == 'NUMEROMOIS') || (SELECT.GROUPBY == 'ANNEE')" condition="ROW.LVL == '1'">
					<CATEGORY field="TXT" type="Char"/>
					<SERIE field="MFPV" displayName="C.A. Total"/>
					<SERIE field="MMSOR" displayName="C.A. Moyen"/>
				</CHART> 			
				<CHART title="Analyse (12 mois)" type="columnChart" maxItems="12" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq="" subType="overlaid"   visibleCondition="(SELECT.GROUPBY == 'MOIS') || (SELECT.GROUPBY == 'NUMEROMOIS') || (SELECT.GROUPBY == 'ANNEE')" condition="ROW.LVL == '1'">
					<CATEGORY field="TXT" type="Char"/>
					<SERIE field="NSEJ" displayName="Nb séjour"  />
				</CHART>			
	
				<CHART title="Analyse par sempaine annuelle" type="lineChart" maxItems="52" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq="" visibleCondition="(SELECT.GROUPBY == 'SEMAINEANNE')" condition="ROW.LVL == '1'">
					<CATEGORY field="TXT" type="Char"/>
					<SERIE field="MFPV" displayName="C.A. Total"  />
				</CHART> 
				<CHART title="Analyse par Trimestre" type="columnChart" maxItems="12" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq="" subType="overlaid"  visibleCondition="(SELECT.GROUPBY == 'NUMEROTRIM') || (SELECT.GROUPBY == 'TRIM')" condition="ROW.LVL == '1'">
					<CATEGORY field="TXT" type="Char"/>
					<SERIE field="MFPV" displayName="C.A. Total"  />
				</CHART>  			
				<CHART title="Analyse par jour (30 jours)  |  C.A. moyen calculer par 30 ème" type="lineChart" maxItems="30" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq="" visibleCondition="(SELECT.GROUPBY == 'JOUR') || (SELECT.GROUPBY == 'JOURS')" condition="ROW.LVL == '1'">
					<CATEGORY field="TXT" type="Char"/>
					<SERIE field="MFPV" displayName="C.A. Total"  />
					<SERIE field="MJSOR" displayName="C.A Moyen" />
				</CHART>  				
				<CHART title="Analyse par jour (30 jours)" type="columnChart" maxItems="30" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq="" visibleCondition="(SELECT.GROUPBY == 'JOUR') || (SELECT.GROUPBY == 'JOURS')" condition="ROW.LVL == '1'">
					<CATEGORY field="TXT" type="Char"/>
					<SERIE field="NSEJ" displayName="Nb séjour"  />
				</CHART>  			
				<DATAGRID title="" total="true" showOthers="true" key="COD" headerHeight="54" selectRowInRows="= ROW.OID == '-9999997'" otherRowInRows="= ROW.OID == '-9999998'" totalRowInRows="= ROW.OID == '-9999999'" sortable="= SELECT.GROUPBY_3 == '-1' &amp;&amp; (SELECT.GROUPBY_2 == '-1' || SELECT.GROUPBY_TAB == 'TAB')">
					<INSERT name="DATAGRID_MULTITAB_STYLES"/>
					<COLUMN dataField="OID" width="60" type="Char" visible="false" headerText="Oid">
					</COLUMN>
					<COLUMN dataField="COD" width="70" type="Char" visible="true" headerText="Code" textAlign="left" otherFunction="text" totalFunction="text">
						<INSERT name="COLUMN_COD_MULTITAB_STYLES"/>
					</COLUMN>
					<COLUMN dataField="TXT" type="Char" minWidth="50" headerText="SELECT.GROUPBY_LABEL" headerTextCalc="true" textAlign="left" totalFunction="text" totalComplement="TOTAL" otherFunction="text" otherComplement="Autres">
					</COLUMN>
					<COLUMN dataField="NSEJ" width="65" type="Number" visible="true" outputFormat="#" fixed="false" currency="" currencyAlign="right" headerText="Séjours" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de séjours">
						<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>					
					</COLUMN>
					<COLUMN dataField="NFAC" width="60" type="Number" outputFormat="#" headerText="Nb Factures" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de factures en tenant compte des compléments de facture(Avoir-Additif)" >
						<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>	
					</COLUMN>
					<COLUMN dataField="MFPV" width="80" type="Number" visible="true" outputFormat="#E" fixed="false" headerText="C.A. total" selectable ="true" textAlign="right" totalFunction="calc" otherFunction="calc" calc="true"  description="C.A. de la valorisation des factures de référence non facturées" >
						<CALC formula="ROW.MFAC + ROW.MNFAC" />
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>			
					</COLUMN>
					<COLUMN dataField="PTMFPV" type="Number" headerText="% Total" width="55" outputFormat="#%" fixed="false" textAlign="right" totalFunction="calc" otherFunction="calc" calc="true" description="% Total">
						<CALC formula="ROW.MFPV * 100 / TOTALROW.MFPV" />
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>			
					</COLUMN>
					<COLUMN dataField="CA_Moyen_fv" type="Number" headerText="C.A. Moyen" width="55" outputFormat="#E" fixed="false" textAlign="right" totalFunction="calc" otherFunction="calc" calc="true" description="C.A. Moyen (C.A. Total) ">
						<CALC formula="ROW.MFPV / ROW.NSEJ" />
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>			
					</COLUMN>
					<COLUMN dataField="NSEJF" type="Number" headerText="Nb facturé" width="55" outputFormat="#" fixed="false" textAlign="right" totalFunction="calc" otherFunction="calc" calc="true" description="Nombre séjours facturé">
						<CALC formula="ROW.NSEJ - ROW.NNFAC" />
						<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>	
					</COLUMN>
					<COLUMN dataField="MFAC" width="80" type="Number" visible="true" outputFormat="#E" fixed="false" selectable="true" headerText="C.A. facturé" textAlign="right" totalFunction="sum" otherFunction="sum" description="C.A. facturé période">
						<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
					    <HEADERCELLSTYLE name="textAlign" value="center"/>	
					</COLUMN>
					<COLUMN dataField="PTMFAC" type="Number" headerText="% Total" width="55" outputFormat="#%" fixed="false" textAlign="right" totalFunction="calc" otherFunction="calc" calc="true" description="% Total">
						<CALC formula="ROW.MFAC * 100 / TOTALROW.MFAC" />
						<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>	
					</COLUMN>				
					<COLUMN dataField="CA_Moyen_f" type="Number" headerText="C.A. Moyen" width="55" outputFormat="#E" fixed="false" textAlign="right" totalFunction="calc" otherFunction="calc" calc="true" description="C.A. Moyen (C.A. facturé) ">
						<CALC formula="ROW.MFAC / ROW.NSEJ" />
						<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>	
					</COLUMN>
					<COLUMN dataField="NNFAC" width="65" type="Number" outputFormat="#" fixed="false" visible="true" headerText="Nb Valorisé" selectable="true" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de factures de référence non facturées">
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
					    <HEADERCELLSTYLE name="textAlign" value="center"/>			
					</COLUMN>
					<COLUMN dataField="MNFAC" width="80" type="Number" visible="true" outputFormat="#E" fixed="false" headerText="C.A. valorisé" selectable="true" textAlign="right" totalFunction="sum" otherFunction="sum"  description="C.A. de la valorisation des factures de référence non facturées" >
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
					    <HEADERCELLSTYLE name="textAlign" value="center"/>			
					</COLUMN>
					<COLUMN dataField="PTMNFAC" type="Number" headerText="% Total" width="55" outputFormat="#%" fixed="false" textAlign="right" totalFunction="calc" otherFunction="calc" calc="true" description="% Total">
						<CALC formula="ROW.MNFAC * 100 / TOTALROW.MNFAC" />
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>			
					</COLUMN>
					<COLUMN dataField="CA_Moyen_v" type="Number" headerText="C.A. Moyen" width="55" outputFormat="#E" fixed="false" textAlign="right" totalFunction="calc" otherFunction="calc" calc="true" description="C.A. Moyen (C.A. valorisé)">
						<CALC formula="ROW.MNFAC / ROW.NNFAC" />
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>			
					</COLUMN>
					<COLUMN dataField="MJSOR" width="80" type="Number" visible="false" outputFormat="#E" fixed="false" headerText="C.A. total"  textAlign="right" totalFunction="sum" otherFunction="sum">
					</COLUMN>				
					<COLUMN dataField="MMSOR" width="80" type="Number" visible="false" outputFormat="#E" fixed="false" headerText="C.A. total"  textAlign="right" totalFunction="sum" otherFunction="sum">
					</COLUMN>
				</DATAGRID>
			</ONGLET>
		<ONGLET excelLabel="Facturation" label="Facturation" multiTab="true" queryNumber="3" >
			<CHART title="Analyse (12 mois)" type="lineChart" maxItems="12" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq=""  visibleCondition="(SELECT.GROUPBY == 'MOIS') || (SELECT.GROUPBY == 'NUMEROMOIS')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
				<SERIE field="MFACF" displayName="C.A. Total"/>
				<SERIE field="MMVEN" displayName="C.A. Moyen"/>
			</CHART>
			<CHART title="Analyse (12 mois)" type="columnChart" maxItems="12" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq="" subType="stacked" visibleCondition="(SELECT.GROUPBY == 'MOIS') || (SELECT.GROUPBY == 'NUMEROMOIS')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
					<SERIE field="NSEJFF" displayName="Nb séjour"  />
			</CHART>			
			<CHART title="Analyse  (52 premiers)" type="lineChart" maxItems="52" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq=""  visibleCondition="(SELECT.GROUPBY == 'SEMAINEANNE')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
				<SERIE field="MFACF" displayName="C.A. Total"/>
			</CHART> 
			<CHART title="Analyse  (30 Jours)" type="lineChart" maxItems="30" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq="" visibleCondition="(SELECT.GROUPBY == 'JOUR') || (SELECT.GROUPBY == 'JOURS')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
				<SERIE field="MFACF" displayName="C.A. Total"/>
				<SERIE field="MJVEN" displayName="C.A. Moyen"/>
			</CHART>  			
			<CHART title="Analyse  (30 Jours)" type="columnChart" maxItems="30" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq="" visibleCondition="(SELECT.GROUPBY == 'JOUR') || (SELECT.GROUPBY == 'JOURS')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
					<SERIE field="NSEJFF" displayName="Nb séjour"  />
			</CHART>  
			<CHART title="Analyse par Trimestre" type="columnChart" maxItems="8" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq="" subType="stacked" visibleCondition="(SELECT.GROUPBY == 'NUMEROTRIM') || (SELECT.GROUPBY == 'TRIM')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
				<SERIE field="MFACF" displayName="C.A. Total"/>
			</CHART> 			
			<DATAGRID title="" total="true" showOthers="true" key="COD" headerHeight="54" selectRowInRows="= ROW.OID == '-9999997'" otherRowInRows="= ROW.OID == '-9999998'" totalRowInRows="= ROW.OID == '-9999999'" sortable="= SELECT.GROUPBY_3 == '-1' &amp;&amp; (SELECT.GROUPBY_2 == '-1' || SELECT.GROUPBY_TAB == 'TAB')">
				<INSERT name="DATAGRID_MULTITAB_STYLES"/>
				<COLUMN dataField="OID" width="60" type="Char" visible="false" headerText="Oid">
				</COLUMN>
				<COLUMN dataField="COD" width="70" type="Char" visible="true" headerText="Code" textAlign="left" otherFunction="text" totalFunction="text">
					<INSERT name="COLUMN_COD_MULTITAB_STYLES"/>
				</COLUMN>
				<COLUMN dataField="TXT" type="Char" minWidth="50" headerText="SELECT.GROUPBY_LABEL" headerTextCalc="true" textAlign="left" totalFunction="text" totalComplement="TOTAL" otherFunction="text" otherComplement="Autres">
				</COLUMN>
				<COLUMN dataField="NSEJFF" width="65" type="Number" visible="true" outputFormat="#" fixed="false" currency="" currencyAlign="right" headerText="Séjours" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de séjours">
					<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
					<HEADERCELLSTYLE name="textAlign" value="center"/>	
				</COLUMN>
				<COLUMN dataField="NFACSF" width="60" type="Number" outputFormat="#" headerText="Nb Factures" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de factures en tenant compte des compléments de facture(Avoir-Additif)">
					<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
				    <HEADERCELLSTYLE name="textAlign" value="center"/>	
				</COLUMN>
				<COLUMN dataField="MFACF" width="80" type="Number" visible="true" outputFormat="#E" fixed="false" headerText="C.A. facturé" selectable="true" textAlign="right" totalFunction="sum" otherFunction="sum" description="C.A. facturé sur la période">
					<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
				    <HEADERCELLSTYLE name="textAlign" value="center"/>			
				</COLUMN>
				<COLUMN dataField="PTMFACF" type="Number" headerText="% Total" width="55" outputFormat="#%" fixed="false" textAlign="right" totalFunction="calc" otherFunction="calc" calc="true" description="% Total">
						<CALC formula="ROW.MFACF * 100 / TOTALROW.MFACF"/>
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>			
				</COLUMN>
				<COLUMN dataField="MFACFAV" width="80" type="Number" visible="true" outputFormat="#E" fixed="false" headerText="C.A. facturé dont avoir" selectable="true" textAlign="right" totalFunction="sum" otherFunction="sum" description="C.A. facturé sur la période">
					<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
				    <HEADERCELLSTYLE name="textAlign" value="center"/>			
				</COLUMN>
				<COLUMN dataField="CA_Moyen_ff" type="Number" headerText="C.A. Moyen" width="80" outputFormat="#E" fixed="false" textAlign="right" totalFunction="calc" otherFunction="calc" calc="true" description="C.A. Moyen">
						<CALC formula="ROW.MFACF / ROW.NSEJFF"/>
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>			
				</COLUMN>
				<COLUMN dataField="SEJHC" width="65" type="Number" visible="true" outputFormat="#" fixed="false" currency="" currencyAlign="right" headerText="Séjours HC" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de séjours HC">
					<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
					<HEADERCELLSTYLE name="textAlign" value="center"/>	
				</COLUMN>
				<COLUMN dataField="MFACHC" width="80" type="Number" visible="true" outputFormat="#E" fixed="false" headerText="C.A. facturé HC" selectable="true"  textAlign="right" totalFunction="sum" otherFunction="sum" description="C.A. facturé HC">
					<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
					<HEADERCELLSTYLE name="textAlign" value="center"/>	
				</COLUMN>
				<COLUMN dataField="PTMFACFHC" type="Number" headerText="% Total" width="80" outputFormat="#%" fixed="false" textAlign="right" totalFunction="calc" otherFunction="calc" calc="true" description="% Total">
						<CALC formula="ROW.MFACHC * 100 / TOTALROW.MFACHC" />
						<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>	
				</COLUMN>
				<COLUMN dataField="CA_Moyen_HC" type="Number" headerText="C.A. Moyen HC" width="80" outputFormat="#E" fixed="false" textAlign="right" totalFunction="calc" otherFunction="calc" calc="true" description="C.A. Moyen">
						<CALC formula="ROW.MFACHC / ROW.SEJHC"/>
						<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>			
				</COLUMN>
				<COLUMN dataField="SEJHJ" width="65" type="Number" visible="true" outputFormat="#" fixed="false" currency="" currencyAlign="right" headerText="Séjours HJ" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de séjours HJ">
					<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
					<HEADERCELLSTYLE name="textAlign" value="center"/>	
				</COLUMN>
				<COLUMN dataField="MFACHJ" width="80" type="Number" visible="true" outputFormat="#E" fixed="false" headerText="C.A. facturé HJ" selectable="true" textAlign="right" totalFunction="sum" otherFunction="sum" description="C.A. facturé HJ">
					<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
				    <HEADERCELLSTYLE name="textAlign" value="center"/>
				</COLUMN>
				<COLUMN dataField="PTMFACFHJ" type="Number" headerText="% Total" width="55" outputFormat="#%" fixed="false" textAlign="right" totalFunction="calc" otherFunction="calc" calc="true" description="% Total">
						<CALC formula="ROW.MFACHJ * 100 / TOTALROW.MFACHJ" />
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>
				</COLUMN>
				<COLUMN dataField="CA_Moyen_HJ" type="Number" headerText="C.A. Moyen HJ" width="80" outputFormat="#E" fixed="false" textAlign="right" totalFunction="calc" otherFunction="calc" calc="true" description="C.A. Moyen HJ">
						<CALC formula="ROW.MFACHJ / ROW.SEJHJ"/>
						<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>			
				</COLUMN>
				<COLUMN dataField="SEJAUT" width="65" type="Number" visible="true" outputFormat="#" fixed="false" currency="" currencyAlign="right" headerText="Séjours Autres" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de séjours Autres">
					<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
					<HEADERCELLSTYLE name="textAlign" value="center"/>	
				</COLUMN>
				<COLUMN dataField="MFACAUT" width="80" type="Number" visible="true" outputFormat="#E" fixed="false" headerText="C.A. facturé@LF@Autres"  selectable="true" textAlign="right" totalFunction="sum" otherFunction="sum" description="C.A. facturé Autres" >
					<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
				    <HEADERCELLSTYLE name="textAlign" value="center"/>			
				</COLUMN>
				<COLUMN dataField="MJVEN" width="80" type="Number" visible="false" outputFormat="#E" fixed="false" headerText="C.A. total"  textAlign="right" totalFunction="sum" otherFunction="sum">
				</COLUMN>
				<COLUMN dataField="MMVEN" width="80" type="Number" visible="false" outputFormat="#E" fixed="false" headerText="C.A. total"  textAlign="right" totalFunction="sum" otherFunction="sum">
				</COLUMN>
			</DATAGRID>
		</ONGLET>
		<ONGLET excelLabel="Expédition" label="Expédition" multiTab="true" queryNumber="4">
			<CHART title="Analyse (12 mois)" type="lineChart" maxItems="12" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq=""  visibleCondition="(SELECT.GROUPBY == 'MOIS') || (SELECT.GROUPBY == 'NUMEROMOIS')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
				<SERIE field="MEXP" displayName="C.A. Total"/>
				<SERIE field="MMEXP" displayName="C.A. Moyen"/>
			</CHART>			
			<CHART title="Analyse (12 mois)" type="columnChart" maxItems="12" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq="" subType="stacked" visibleCondition="(SELECT.GROUPBY == 'MOIS') || (SELECT.GROUPBY == 'NUMEROMOIS')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
					<SERIE field="NSEJEX" displayName="Nb séjour"  />
			</CHART>
			<CHART title="Analyse  (52 premiers)" type="lineChart" maxItems="52" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq="" visibleCondition="(SELECT.GROUPBY == 'SEMAINEANNE')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
				<SERIE field="MEXP" displayName="C.A. Total"/>
				<SERIE field="MMEXP" displayName="C.A. Moyen"/>
			</CHART> 
			<CHART title="Analyse  (30 jours)" type="lineChart" maxItems="30" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq="" visibleCondition="(SELECT.GROUPBY == 'JOUR') || (SELECT.GROUPBY == 'JOURS')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
				<SERIE field="MEXP" displayName="C.A. Total"/>
				<SERIE field="MJEXP" displayName="C.A. Moyen"/>
			</CHART>			
			<CHART title="Analyse  (30 jours)" type="columnChart" maxItems="30" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq="" visibleCondition="(SELECT.GROUPBY == 'JOUR') || (SELECT.GROUPBY == 'JOURS')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
					<SERIE field="NSEJEX" displayName="Nb séjour"  />
			</CHART>
			<CHART title="Analyse par Trimestre" type="columnChart" maxItems="12" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq="" subType="stacked" visibleCondition="(SELECT.GROUPBY == 'NUMEROTRIM') || (SELECT.GROUPBY == 'TRIM')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
				<SERIE field="MEXP" displayName="C.A. Total"/>
			</CHART> 			
			<DATAGRID title="" total="true" showOthers="true" headerHeight="72" selectRowInRows="= ROW.OID == '-9999997'" otherRowInRows="= ROW.OID == '-9999998'" totalRowInRows="= ROW.OID == '-9999999'" sortable="= SELECT.GROUPBY_3 == '-1' &amp;&amp; (SELECT.GROUPBY_2 == '-1' || SELECT.GROUPBY_TAB == 'TAB')">
				<INSERT name="DATAGRID_MULTITAB_STYLES"/>
				<COLUMN dataField="OID" width="60" type="Char" visible="false" headerText="Oid">
				</COLUMN>
				<COLUMN dataField="COD" width="70" type="Char" visible="true" headerText="Code" textAlign="left" otherFunction="text" totalFunction="text">
					<INSERT name="COLUMN_COD_MULTITAB_STYLES"/>
				</COLUMN>
				<COLUMN dataField="TXT" type="Char" minWidth="50" headerText="SELECT.GROUPBY_LABEL" headerTextCalc="true" textAlign="left" totalFunction="text" totalComplement="TOTAL" otherFunction="text" otherComplement="Autres">
				</COLUMN>
				<COLUMN dataField="NSEJEX" width="65" type="Number" visible="true" outputFormat="#" fixed="false" currency="" currencyAlign="right" headerText="Séjours" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de séjours" >
					<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
					<HEADERCELLSTYLE name="textAlign" value="center"/>	
				</COLUMN>
				<COLUMN dataField="NFACSEX" width="60" type="Number" outputFormat="#" headerText="Nb Factures" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de factures en tenant compte des compléments de facture(Avoir-Additif)" >
					<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
				    <HEADERCELLSTYLE name="textAlign" value="center"/>	
				</COLUMN>
				<COLUMN dataField="MEXP" width="80" type="Number" visible="true" outputFormat="#E" fixed="false" headerText="C.A. expédié" selectable="true" textAlign="right" totalFunction="sum" otherFunction="sum" description="C.A. expédié sur la période" >
					<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
					<HEADERCELLSTYLE name="textAlign" value="center"/>			
				</COLUMN>
				<COLUMN dataField="PTMEXP" type="Number" headerText="% Total" width="55" outputFormat="#%" fixed="false" textAlign="right" totalFunction="calc" otherFunction="calc" calc="true" description="% Total">
						<CALC formula="ROW.MEXP * 100 / TOTALROW.MEXP" />
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>			
				</COLUMN>
				<COLUMN dataField="CA_Moyen_exp" type="Number" headerText="C.A. Moyen" width="55" outputFormat="#E" fixed="false" textAlign="right" totalFunction="calc" otherFunction="calc" calc="true" description="C.A. Moyen">
						<CALC formula="ROW.MEXP / ROW.NSEJEX" />
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>			
				</COLUMN>
				<COLUMN dataField="MEXPAMO" width="80" type="Number" visible="true" outputFormat="#E" fixed="false" headerText="C.A. expédié AMO" selectable="true" textAlign="right" totalFunction="sum" otherFunction="sum" description="C.A. expédié sur la période" >
					<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
				    <HEADERCELLSTYLE name="textAlign" value="center"/>	
				</COLUMN>
				<COLUMN dataField="MEXPAMC" width="80" type="Number" visible="true" outputFormat="#E" fixed="false" headerText="C.A. expédié AMC" selectable="true" textAlign="right" totalFunction="sum" otherFunction="sum" description="C.A. expédié sur la période" >
					<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
				    <HEADERCELLSTYLE name="textAlign" value="center"/>			
				</COLUMN>
				<COLUMN dataField="MEXPPAT" width="80" type="Number" visible="true" outputFormat="#E" fixed="false" headerText="C.A. expédié Patient" selectable="true" textAlign="right" totalFunction="sum" otherFunction="sum" description="C.A. expédié sur la période" >
					<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
				    <HEADERCELLSTYLE name="textAlign" value="center"/>	
				</COLUMN>
				<COLUMN dataField="MJEXP" width="80" type="Number" visible="false" outputFormat="#E" fixed="false" headerText="C.A. total"  textAlign="right" totalFunction="sum" otherFunction="sum">
				</COLUMN>
				<COLUMN dataField="MMEXP" width="80" type="Number" visible="false" outputFormat="#E" fixed="false" headerText="C.A. total"  textAlign="right" totalFunction="sum" otherFunction="sum">
				</COLUMN>
			</DATAGRID>
		</ONGLET>
		<ONGLET excelLabel="Réglement" label="Réglement" multiTab="true" queryNumber="5">
			<CHART title="Analyse (12 mois)" type="lineChart" maxItems="12" sortField="" sortSeq="D"   visibleCondition="(SELECT.GROUPBY == 'MOIS') || (SELECT.GROUPBY == 'NUMEROMOIS')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
				<SERIE field="MREG" displayName="C.A. Total"  />
			    <!-- <SERIE field="MMREG" displayName="C.A. Moyen"  />  -->
			</CHART>			
			<CHART title="Analyse (12 mois)" type="columnChart" maxItems="12" sortField="" sortSeq="D" subType="stacked"  visibleCondition="(SELECT.GROUPBY == 'MOIS') || (SELECT.GROUPBY == 'NUMEROMOIS')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
					<SERIE field="NSEJR" displayName="Nb séjour"  />
				<!-- <SERIE field="MMREG" displayName="C.A. Moyen" type="line"/>  -->
			</CHART>
			<CHART title="Analyse  (30 jours)" type="lineChart" maxItems="31" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq="" visibleCondition="(SELECT.GROUPBY == 'JOUR') || (SELECT.GROUPBY == 'JOURS')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
				<SERIE field="MREG" displayName="C.A. Total"  />
			   <!-- <SERIE field="MJREG" displayName="C.A. Moyen"  />  -->
			</CHART>  			
			<CHART title="Analyse  (30 jours)" type="columnChart" maxItems="31" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq="" visibleCondition="(SELECT.GROUPBY == 'JOUR') || (SELECT.GROUPBY == 'JOURS')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
				<SERIE field="MREG" displayName="C.A. Total"  />
				 <!-- <SERIE field="MJREG" displayName="C.A. Moyen" type="line" />  -->
			</CHART>  
			<CHART title="Analyse  (52 premiers)" type="lineChart" maxItems="52" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq="" visibleCondition="(SELECT.GROUPBY == 'SEMAINEANNE')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
				<SERIE field="MREG" displayName="C.A. Total"  />
			</CHART> 
			<CHART title="Analyse par Trimestre" type="columnChart" maxItems="50" maxItemsSortOn="" maxItemsSortSeq="A" sortField="" sortSeq="" visibleCondition="(SELECT.GROUPBY == 'NUMEROTRIM') || (SELECT.GROUPBY == 'TRIM')" condition="ROW.LVL == '1'">
				<CATEGORY field="TXT" type="Char"/>
				<SERIE field="MREG" displayName="C.A. Total"  />
			</CHART> 	
			<DATAGRID title="" total="true" showOthers="true" headerHeight="72" selectRowInRows="= ROW.OID == '-9999997'" otherRowInRows="= ROW.OID == '-9999998'" totalRowInRows="= ROW.OID == '-9999999'" sortable="= SELECT.GROUPBY_3 == '-1' &amp;&amp; (SELECT.GROUPBY_2 == '-1' || SELECT.GROUPBY_TAB == 'TAB')">
				<INSERT name="DATAGRID_MULTITAB_STYLES"/>
				<COLUMN dataField="OID" width="60" type="Char" visible="false" headerText="Oid">
				</COLUMN>
				<COLUMN dataField="COD" width="70" type="Char" visible="true" headerText="Code" textAlign="left" otherFunction="text" totalFunction="text">
					<INSERT name="COLUMN_COD_MULTITAB_STYLES"/>
				</COLUMN>
				<COLUMN dataField="TXT" type="Char" minWidth="50" headerText="SELECT.GROUPBY_LABEL" headerTextCalc="true" textAlign="left" totalFunction="text" totalComplement="TOTAL" otherFunction="text" otherComplement="Autres">
				</COLUMN>
				<COLUMN dataField="NSEJR" width="65" type="Number" visible="true" outputFormat="#" currency="" currencyAlign="right" headerText="Séjours" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de séjours" >
					<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
					<HEADERCELLSTYLE name="textAlign" value="center"/>	
				</COLUMN>
				<COLUMN dataField="NFACSR" width="60" type="Number" outputFormat="#" headerText="Nb Factures" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de factures en tenant compte des compléments de facture(Avoir-Additif)" >
					<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
					<HEADERCELLSTYLE name="textAlign" value="center"/>	
				</COLUMN>
				<COLUMN dataField="MREG" width="80" type="Number" visible="true" outputFormat="#E" fixed="false" headerText="C.A. Réglé" textAlign="right" totalFunction="sum" otherFunction="sum" description="C.A. Réglé sur la période" >
					<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
					<HEADERCELLSTYLE name="textAlign" value="center"/>			
				</COLUMN>
				<COLUMN dataField="PTMREG" type="Number" headerText="% Total" width="55" outputFormat="#%" fixed="false" textAlign="right" totalFunction="calc" otherFunction="calc" calc="true" description="% Total">
						<CALC formula="ROW.MREG * 100 / TOTALROW.MREG" />
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>			
				</COLUMN>
				<COLUMN dataField="CA_Moyen_exp" type="Number" headerText="C.A. Moyen" width="55" outputFormat="#E" fixed="false" textAlign="right" totalFunction="calc" otherFunction="calc" calc="true" description="C.A. Moyen">
						<CALC formula="ROW.MREG / ROW.NSEJR" />
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>			
				</COLUMN>
				<COLUMN dataField="MREG1" width="80" type="Number" visible="true" outputFormat="#E" fixed="false" headerText="C.A. Réglé AMO" textAlign="right" totalFunction="sum" otherFunction="sum" description="" >
					<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
					<HEADERCELLSTYLE name="textAlign" value="center"/>	
				</COLUMN>
				<COLUMN dataField="MREG2" width="80" type="Number" visible="true" outputFormat="#E" fixed="false" headerText="C.A. Réglé AMC" textAlign="right" totalFunction="sum" otherFunction="sum" description="" >
					<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
					<HEADERCELLSTYLE name="textAlign" value="center"/>			
				</COLUMN>
				<COLUMN dataField="MREG0" width="80" type="Number" visible="true" outputFormat="#E" fixed="false" headerText="C.A. Réglé Patient " textAlign="right" totalFunction="sum" otherFunction="sum" description="" >
					<HEADERCELLSTYLE name="backgroundColor" value="EFEFEF"/>
					<HEADERCELLSTYLE name="textAlign" value="center"/>	
				</COLUMN>
				<COLUMN dataField="MMREG" width="80" type="Number" visible="false" outputFormat="#E" fixed="false" headerText="C.A. total"  textAlign="right" totalFunction="sum" otherFunction="sum">
				</COLUMN>
				<COLUMN dataField="MJREG" width="80" type="Number" visible="false" outputFormat="#E" fixed="false" headerText="C.A. total"  textAlign="right" totalFunction="sum" otherFunction="sum">
				</COLUMN>
			</DATAGRID>
		</ONGLET>
	</PRESENTATION>
</VUE>