<?xml version="1.0" encoding="ISO-8859-1"?>
<VUE name="COMPTA000048" 
	label="Comparatif par critère" 
	title="= 'Comptabilité analytique. Comparatif ' + SELECT.DATA_LABEL + ' par ' + SELECT.GROUPBY_LABEL + ' à ' + SELECT.MOIS_LABEL + ' (' + SELECT.TYPEPERIODE_LABEL + ')'" 
	database="iCTI" 
	swf="*CTI_view1" 
	globals="COMPTA_globals.XML"
	componentsFile="COMPTA_components.XML"
	dboptimizer="COMPTA_dboptimizer.XML"
	softCode="iCTI_compta"
	softOption="iCTI_compta_analytique_shs"
	>
	
	<VIEWPROPERTIES componentName="MULTICRITERES_ANALYTIQUE_PROPERTIES" />
	
	<VIEWPROPERTIES>
	
		<PROPERTY name="ARBRE2_PADDING" value="[EVAL 
			$padding = 0;
			if ('[ARBRE1]' != '-1') {
				$padding = $padding + 1;
			}
			return $padding;
		EVAL]" />
		<PROPERTY name="ARBRE3_PADDING" value="[EVAL 
			$padding = 0;
			if ('[ARBRE1]' != '-1') {
				$padding = $padding + 1;
			}
			if ('[ARBRE2]' != '-1') {
				$padding = $padding + 1;
			}
			return $padding;
		EVAL]" />
		<PROPERTY name="ARBRE4_PADDING" value="[EVAL 
			$padding = 0;
			if ('[ARBRE1]' != '-1') {
				$padding = $padding + 1;
			}
			if ('[ARBRE2]' != '-1') {
				$padding = $padding + 1;
			}
			if ('[ARBRE3]' != '-1') {
				$padding = $padding + 1;
			}
			return $padding;
		EVAL]" />
		<PROPERTY name="ARBRE5_PADDING" value="[EVAL 
			$padding = 0;
			if ('[ARBRE1]' != '-1') {
				$padding = $padding + 1;
			}
			if ('[ARBRE2]' != '-1') {
				$padding = $padding + 1;
			}
			if ('[ARBRE3]' != '-1') {
				$padding = $padding + 1;
			}
			if ('[ARBRE4]' != '-1') {
				$padding = $padding + 1;
			}
			return $padding;
		EVAL]" />
		<PROPERTY name="GROUPBY_PADDING" value="[EVAL 
			$padding = 0;
			if ('[ARBRE1]' != '-1') {
				$padding = $padding + 1;
			}
			if ('[ARBRE2]' != '-1') {
				$padding = $padding + 1;
			}
			if ('[ARBRE3]' != '-1') {
				$padding = $padding + 1;
			}
			if ('[ARBRE4]' != '-1') {
				$padding = $padding + 1;
			}
			if ('[ARBRE5]' != '-1') {
				$padding = $padding + 1;
			}
			return $padding;
		EVAL]" />

		<PROPERTY name="DATA_FIELD" value="[EVAL 
												$field = 'v_repartitions_analytiques_shs_1.montant_';
												if (substr('[DATA]',0,1) == 'P') {
													$field = $field . 'prevision_';
												}
												else {
													$field = $field . 'realisation_';
												}	
												if (substr('[DATA]',1,1) == 'A') {
													$field = $field . 'avant_repartition';
												}
												else {
													if (substr('[DATA]',1,1) == 'P') {
														$field = $field . 'apres_repartition';
													}
													else {
														$field = $field . substr('[DATA]',1,1);
													}
												}
												
												return $field;
											EVAL]" />
											
		<PROPERTY name="DATA_SELECT" value="[EVAL 
												$select = '';
												if (substr('[DATA]',0,1) == 'P') {
													$select = $select . &quot;AND code_prevision_realisation = 'P' &quot;;
												}
												else {
													$select = $select . &quot;AND code_prevision_realisation = 'R' &quot;;
												}	
												if (substr('[DATA]',1,1) == 'A') {
													$select = $select . 'AND etape_id = 0 ';
												}
												else {
													if (substr('[DATA]',1,1) == 'P') {
														$select = $select . &quot;AND est_derniere_etape = '1' &quot;;
													}
													else {
														$select = $select . 'AND etape_id = ' . substr('[DATA]',1,1) . ' ';
													}
												}
												
												return $select;
											EVAL]" />
		

								
		<PROPERTY dataLink="VIEWPROPERTIES" nameField="name" valueField="value" />
	</VIEWPROPERTIES>
	
	<SELECTIONS label="Paramètres de l'analyse" displayText="">

		<GROUP label="Période">
			<FIELD name="MOIS" label="" UI="combo" width="150" default="*FIRST" globalListProvider="MOIS">
			</FIELD>
			<FIELD name="TYPEPERIODE" label="" UI="combo" width="250" default="X"  >
				<OPTION data="X" label="Exercice" />
				<OPTION data="A" label="Année civile" />
			</FIELD>
		</GROUP>
		
		<GROUP label="">
			<FIELD name="DATA" label="Indicateur" UI="combo" width="200" default="RP" globalListProvider="ETAPES_DATA" >
			</FIELD>
		</GROUP>
		
		
		<GROUP label="Arborescence">
			<FIELD name="ARBRE1" label="" UI="combo" width="250" default="-1"  tree="true" >
				<OPTION data="-1" label="Pas de 1er niveau" />
				<OPTION data="MOI" label="Mois comptable" />
				<OPTION data="CPT" label="Compte général" globalListProvider="CPT_GROUPBY_OPTION" />
				<OPTION data="ANA" label="Section analytique" globalListProvider="ANA_GROUPBY_OPTION" />
				<OPTION data="AOR" label="Section analytique origine" globalListProvider="AOR_GROUPBY_OPTION" />
			</FIELD>
			<FIELD name="GROUPBY_TAB" width="100" label="Présentation" UI="combo" default="AUTO" visible="= SELECT.ARBRE1 != '-1' ">
				<OPTION label="Automatique" data="AUTO" />
				<OPTION label="Arbre" data="TREE" />
				<OPTION label="Onglet" data="TAB" />
			</FIELD>
		</GROUP>
		<GROUP label="">
			<FIELD name="ARBRE2" label="" UI="combo" width="250" default="-1" tree="true" >
				<OPTION data="-1" label="Pas de 2nd niveau" />
				<OPTION data="MOI" label="Mois comptable" />
				<OPTION data="CPT" label="Compte général" globalListProvider="CPT_GROUPBY_OPTION" />
				<OPTION data="ANA" label="Section analytique" globalListProvider="ANA_GROUPBY_OPTION" />
				<OPTION data="AOR" label="Section analytique origine" globalListProvider="AOR_GROUPBY_OPTION" />
			</FIELD>
			<FIELD name="ARBRE3" label="" UI="combo" width="250" default="-1" tree="true" >
				<OPTION data="-1" label="Pas de 3ème niveau" />
				<OPTION data="MOI" label="Mois comptable" />
				<OPTION data="CPT" label="Compte général" globalListProvider="CPT_GROUPBY_OPTION" />
				<OPTION data="ANA" label="Section analytique" globalListProvider="ANA_GROUPBY_OPTION" />
				<OPTION data="AOR" label="Section analytique origine" globalListProvider="AOR_GROUPBY_OPTION" />
			</FIELD>
		</GROUP>
		<GROUP label="">
			<FIELD name="ARBRE4" label="" UI="combo" width="250" default="-1" tree="true"  >
				<OPTION data="-1" label="Pas de 4ème niveau" />
				<OPTION data="MOI" label="Mois comptable" />
				<OPTION data="CPT" label="Compte général" globalListProvider="CPT_GROUPBY_OPTION" />
				<OPTION data="ANA" label="Section analytique" globalListProvider="ANA_GROUPBY_OPTION" />
				<OPTION data="AOR" label="Section analytique origine" globalListProvider="AOR_GROUPBY_OPTION" />
			</FIELD>
			<FIELD name="ARBRE5" label="" UI="combo" width="250" default="-1" tree="true"  >
				<OPTION data="-1" label="Pas de 5ème niveau" />
				<OPTION data="MOI" label="Mois comptable" />
				<OPTION data="CPT" label="Compte général" globalListProvider="CPT_GROUPBY_OPTION" />
				<OPTION data="ANA" label="Section analytique" globalListProvider="ANA_GROUPBY_OPTION" />
				<OPTION data="AOR" label="Section analytique origine" globalListProvider="AOR_GROUPBY_OPTION" />
			</FIELD>
		</GROUP>
		<GROUP label="">
			<FIELD name="GROUPBY" label="Regroupement" UI="combo" width="250" default="ANA" tree="true"  >
				<OPTION data="MOI" label="Mois comptable" />
				<OPTION data="CPT" label="Compte général" globalListProvider="CPT_GROUPBY_OPTION" />
				<OPTION data="ANA" label="Section analytique" globalListProvider="ANA_GROUPBY_OPTION" />
				<OPTION data="AOR" label="Section analytique origine" globalListProvider="AOR_GROUPBY_OPTION" />
			</FIELD>
		</GROUP>

	</SELECTIONS>
	
	<SELECTIONS componentName="ANALYTIQUE_SHS_SELECTIONS" />
	
	
	
	<QUERIES> 
		<QUERY> 
			<SQL 	
					optimizer=""
					cacheEnabled="true"
					select="
					[EVAL 
					if ('[ARBRE1]' != '-1') {
						$groupby = '';
						$qtab = false;
						if ('[GROUPBY_TAB]' == 'TAB') {
							$qtab = true;
						}
						if ('[GROUPBY_TAB]' == 'AUTO' &amp;&amp; '[ARBRE2]' != '-1') {
							$qtab = true;
						}

						if ($qtab == false) {
							return &quot;
							(SELECT 
								[VIEW.TAB1_RESUME_FIELDS],
								[VIEW.ARBRE1_FIELDS], [VIEW.GROUP0BY_FIELDS], [VIEW.GROUP0BY_FIELDS], 
								[VIEW.GROUP0BY_FIELDS], [VIEW.GROUP0BY_FIELDS], [VIEW.GROUP0BY_FIELDS], 
								[VIEW.ARBRE1_FIELDS], [VIEW.ARBRE1TEXT_FIELDS],
								1, 0,
								sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM2] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
								sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM1] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
								sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM0] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
								sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM0] THEN [VIEW.DATA_FIELD] ELSE 0 END) -
								sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM1] THEN [VIEW.DATA_FIELD] ELSE 0 END),
								sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X2D] AND [VIEW.X2F] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
								sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X1D] AND [VIEW.X1F] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
								sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X0D] AND [VIEW.X0F] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
								sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X0D] AND [VIEW.X0F] THEN [VIEW.DATA_FIELD] ELSE 0 END) -
								sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X1D] AND [VIEW.X1F] THEN [VIEW.DATA_FIELD] ELSE 0 END)
							FROM compta.v_repartitions_analytiques_shs_1
							WHERE 
							(v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X0D] AND [VIEW.X0F] 
								OR v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X1D] AND [VIEW.X1F] 
								OR v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X2D] AND [VIEW.X2F]) 
								[VIEW.ANALYTIQUE_SHS_SELECT]
								AND [VIEW.DATA_FIELD] &lt;&gt; 0 [VIEW.DATA_SELECT]
							GROUP BY 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18
							)
							UNION ALL &quot;;
						}
						else {
							return &quot;
							(SELECT 
								[VIEW.TAB1_RESUME_FIELDS],
								[VIEW.ARBRE1_FIELDS], [VIEW.GROUP0BY_FIELDS], [VIEW.GROUP0BY_FIELDS], 
								[VIEW.GROUP0BY_FIELDS], [VIEW.GROUP0BY_FIELDS], [VIEW.GROUP0BY_FIELDS], 
								[VIEW.ARBRE1_FIELDS], [VIEW.ARBRE1TEXT_FIELDS],
								1, 0,
								sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM2] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
								sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM1] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
								sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM0] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
								sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM0] THEN [VIEW.DATA_FIELD] ELSE 0 END) -
								sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM1] THEN [VIEW.DATA_FIELD] ELSE 0 END),
								sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X2D] AND [VIEW.X2F] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
								sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X1D] AND [VIEW.X1F] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
								sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X0D] AND [VIEW.X0F] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
								sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X0D] AND [VIEW.X0F] THEN [VIEW.DATA_FIELD] ELSE 0 END) -
								sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X1D] AND [VIEW.X1F] THEN [VIEW.DATA_FIELD] ELSE 0 END)
							FROM compta.v_repartitions_analytiques_shs_1
							WHERE 
							(v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X0D] AND [VIEW.X0F] 
								OR v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X1D] AND [VIEW.X1F] 
								OR v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X2D] AND [VIEW.X2F]) 
								[VIEW.ANALYTIQUE_SHS_SELECT]
								AND [VIEW.DATA_FIELD] &lt;&gt; 0 [VIEW.DATA_SELECT]
							GROUP BY 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18
							)
							UNION ALL
							(SELECT 
								[VIEW.TAB1_FIELDS],
								[VIEW.ARBRE1_FIELDS], [VIEW.GROUP0BY_FIELDS], [VIEW.GROUP0BY_FIELDS], 
								[VIEW.GROUP0BY_FIELDS], [VIEW.GROUP0BY_FIELDS], [VIEW.GROUP0BY_FIELDS], 
								-9999999, 'Total', 'Total',
								9, 0,
								sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM2] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
								sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM1] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
								sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM0] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
								sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM0] THEN [VIEW.DATA_FIELD] ELSE 0 END) -
								sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM1] THEN [VIEW.DATA_FIELD] ELSE 0 END),
								sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X2D] AND [VIEW.X2F] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
								sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X1D] AND [VIEW.X1F] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
								sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X0D] AND [VIEW.X0F] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
								sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X0D] AND [VIEW.X0F] THEN [VIEW.DATA_FIELD] ELSE 0 END) -
								sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X1D] AND [VIEW.X1F] THEN [VIEW.DATA_FIELD] ELSE 0 END)
							FROM compta.v_repartitions_analytiques_shs_1
							WHERE 
							(v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X0D] AND [VIEW.X0F] 
								OR v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X1D] AND [VIEW.X1F] 
								OR v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X2D] AND [VIEW.X2F]) 
								[VIEW.ANALYTIQUE_SHS_SELECT]
								AND [VIEW.DATA_FIELD] &lt;&gt; 0 [VIEW.DATA_SELECT]
							GROUP BY 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18
							)
							UNION ALL&quot; ;
						}
					}
					EVAL]
					
					
					
					[EVAL 
					if ([ARBRE2] != '-1') {
						return '
						(SELECT  
							[VIEW.TAB1_FIELDS],
							[VIEW.ARBRE1_FIELDS], [VIEW.ARBRE2_FIELDS], [VIEW.GROUP0BY_FIELDS], 
							[VIEW.GROUP0BY_FIELDS], [VIEW.GROUP0BY_FIELDS], [VIEW.GROUP0BY_FIELDS], 
							[VIEW.ARBRE2_FIELDS], [VIEW.ARBRE2TEXT_FIELDS],
							2, [VIEW.ARBRE2_PADDING],
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM2] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM1] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM0] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM0] THEN [VIEW.DATA_FIELD] ELSE 0 END) -
								sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM1] THEN [VIEW.DATA_FIELD] ELSE 0 END),
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X2D] AND [VIEW.X2F] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X1D] AND [VIEW.X2F] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X0D] AND [VIEW.X2F] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X0D] AND [VIEW.X2F] THEN [VIEW.DATA_FIELD] ELSE 0 END) -
								sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X1D] AND [VIEW.X2F] THEN [VIEW.DATA_FIELD] ELSE 0 END)
						FROM compta.v_repartitions_analytiques_shs_1
						WHERE 
						(v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X0D] AND [VIEW.X0F] 
							OR v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X1D] AND [VIEW.X1F] 
							OR v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X2D] AND [VIEW.X2F]) 
							[VIEW.ANALYTIQUE_SHS_SELECT]
							AND [VIEW.DATA_FIELD] &lt;&gt; 0 [VIEW.DATA_SELECT]
						GROUP BY 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18
						)
						UNION ALL';
					}
					EVAL]
					
					[EVAL 
					if ([ARBRE3] != '-1') {
						return '
						(SELECT  
							[VIEW.TAB1_FIELDS],
							[VIEW.ARBRE1_FIELDS], [VIEW.ARBRE2_FIELDS], [VIEW.ARBRE3_FIELDS], 
							[VIEW.GROUP0BY_FIELDS], [VIEW.GROUP0BY_FIELDS], [VIEW.GROUP0BY_FIELDS], 
							[VIEW.ARBRE3_FIELDS], [VIEW.ARBRE3TEXT_FIELDS],
							3, [VIEW.ARBRE3_PADDING],
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM2] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM1] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM0] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM0] THEN [VIEW.DATA_FIELD] ELSE 0 END) -
								sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM1] THEN [VIEW.DATA_FIELD] ELSE 0 END),
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X2D] AND [VIEW.X2F] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X1D] AND [VIEW.X2F] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X0D] AND [VIEW.X2F] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X0D] AND [VIEW.X2F] THEN [VIEW.DATA_FIELD] ELSE 0 END) -
								sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X1D] AND [VIEW.X2F] THEN [VIEW.DATA_FIELD] ELSE 0 END)
						FROM compta.v_repartitions_analytiques_shs_1
						WHERE 
						(v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X0D] AND [VIEW.X0F] 
							OR v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X1D] AND [VIEW.X1F] 
							OR v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X2D] AND [VIEW.X2F]) 
							[VIEW.ANALYTIQUE_SHS_SELECT]
							AND [VIEW.DATA_FIELD] &lt;&gt; 0 [VIEW.DATA_SELECT]
						GROUP BY 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18
						)
						UNION ALL';
					}
					EVAL]
					
					[EVAL 
					if ([ARBRE4] != '-1') {
						return '
						(SELECT  
							[VIEW.TAB1_FIELDS],
							[VIEW.ARBRE1_FIELDS], [VIEW.ARBRE2_FIELDS], [VIEW.ARBRE3_FIELDS], 
							[VIEW.ARBRE4_FIELDS], [VIEW.GROUP0BY_FIELDS], [VIEW.GROUP0BY_FIELDS], 
							[VIEW.ARBRE4_FIELDS], [VIEW.ARBRE4TEXT_FIELDS],
							4, [VIEW.ARBRE4_PADDING],
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM2] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM1] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM0] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM0] THEN [VIEW.DATA_FIELD] ELSE 0 END) -
								sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM1] THEN [VIEW.DATA_FIELD] ELSE 0 END),
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X2D] AND [VIEW.X2F] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X1D] AND [VIEW.X2F] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X0D] AND [VIEW.X2F] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X0D] AND [VIEW.X2F] THEN [VIEW.DATA_FIELD] ELSE 0 END) -
								sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X1D] AND [VIEW.X2F] THEN [VIEW.DATA_FIELD] ELSE 0 END)
						FROM compta.v_repartitions_analytiques_shs_1
						WHERE 
						(v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X0D] AND [VIEW.X0F] 
							OR v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X1D] AND [VIEW.X1F] 
							OR v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X2D] AND [VIEW.X2F]) 
							[VIEW.ANALYTIQUE_SHS_SELECT]
							AND [VIEW.DATA_FIELD] &lt;&gt; 0 [VIEW.DATA_SELECT]
						GROUP BY 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18
						)
						UNION ALL';
					}
					EVAL]
					
					[EVAL 
					if ([ARBRE5] != '-1') {
						return '
						(SELECT  
							[VIEW.TAB1_FIELDS],
							[VIEW.ARBRE1_FIELDS], [VIEW.ARBRE2_FIELDS], [VIEW.ARBRE3_FIELDS], 
							[VIEW.ARBRE4_FIELDS], [VIEW.ARBRE5_FIELDS], [VIEW.GROUP0BY_FIELDS], 
							[VIEW.ARBRE5_FIELDS], [VIEW.ARBRE5TEXT_FIELDS],
							5, [VIEW.ARBRE5_PADDING],
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM2] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM1] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM0] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM0] THEN [VIEW.DATA_FIELD] ELSE 0 END) -
								sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM1] THEN [VIEW.DATA_FIELD] ELSE 0 END),
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X2D] AND [VIEW.X2F] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X1D] AND [VIEW.X2F] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X0D] AND [VIEW.X2F] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X0D] AND [VIEW.X2F] THEN [VIEW.DATA_FIELD] ELSE 0 END) -
								sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X1D] AND [VIEW.X2F] THEN [VIEW.DATA_FIELD] ELSE 0 END)
						FROM compta.v_repartitions_analytiques_shs_1
						WHERE 
						(v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X0D] AND [VIEW.X0F] 
							OR v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X1D] AND [VIEW.X1F] 
							OR v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X2D] AND [VIEW.X2F]) 
							[VIEW.ANALYTIQUE_SHS_SELECT]
							AND [VIEW.DATA_FIELD] &lt;&gt; 0 [VIEW.DATA_SELECT]
						GROUP BY 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18
						)
						UNION ALL';
					}
					EVAL]
					
					(SELECT  
							[VIEW.TAB1_FIELDS],
	 						[VIEW.ARBRE1_FIELDS], [VIEW.ARBRE2_FIELDS], [VIEW.ARBRE3_FIELDS], 
							[VIEW.ARBRE4_FIELDS], [VIEW.ARBRE5_FIELDS], [VIEW.GROUPBY_FIELDS], 
							[VIEW.GROUPBY_FIELDS], [VIEW.TEXT_FIELDS],
							6, [VIEW.GROUPBY_PADDING],
						
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM2] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM1] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM0] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM0] THEN [VIEW.DATA_FIELD] ELSE 0 END) -
								sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM1] THEN [VIEW.DATA_FIELD] ELSE 0 END),
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X2D] AND [VIEW.X2F] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X1D] AND [VIEW.X1F] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X0D] AND [VIEW.X0F] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X0D] AND [VIEW.X0F] THEN [VIEW.DATA_FIELD] ELSE 0 END) -
								sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X1D] AND [VIEW.X1F] THEN [VIEW.DATA_FIELD] ELSE 0 END)
						
					FROM compta.v_repartitions_analytiques_shs_1
					WHERE 
						(v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X0D] AND [VIEW.X0F] 
							OR v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X1D] AND [VIEW.X1F] 
							OR v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X2D] AND [VIEW.X2F]) 
							[VIEW.ANALYTIQUE_SHS_SELECT]
							AND [VIEW.DATA_FIELD] &lt;&gt; 0 [VIEW.DATA_SELECT]

					GROUP BY 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18
						HAVING SUM([VIEW.DATA_FIELD]) &lt;&gt; 0
					)
					
					UNION ALL
					
					(SELECT 
						[VIEW.TAB1_RESUME_FIELDS],
						0, '',  0, '',  0, '',  0, '',  0, '',  0, '',  
						-9999999, 'Total', 'Total',
						9, 0,
						
						sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM2] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
						sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM1] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
						sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM0] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
						sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM0] THEN [VIEW.DATA_FIELD] ELSE 0 END) -
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable = [VIEW.AM1] THEN [VIEW.DATA_FIELD] ELSE 0 END),
						sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X2D] AND [VIEW.X2F] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
						sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X1D] AND [VIEW.X1F] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
						sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X0D] AND [VIEW.X0F] THEN [VIEW.DATA_FIELD] ELSE 0 END), 
						sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X0D] AND [VIEW.X0F] THEN [VIEW.DATA_FIELD] ELSE 0 END) -
							sum(CASE WHEN v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X1D] AND [VIEW.X1F] THEN [VIEW.DATA_FIELD] ELSE 0 END)
						
					FROM compta.v_repartitions_analytiques_shs_1
					WHERE 
						(v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X0D] AND [VIEW.X0F] 
							OR v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X1D] AND [VIEW.X1F] 
							OR v_repartitions_analytiques_shs_1.mois_comptable BETWEEN [VIEW.X2D] AND [VIEW.X2F]) 
							[VIEW.ANALYTIQUE_SHS_SELECT]
							HAVING SUM([VIEW.DATA_FIELD]) &lt;&gt; 0

					)


					ORDER BY 2, 5, 7, 9, 11, 13, 14 " >
				<FIELDS>
					<FIELD name="TABD" />
					<FIELD name="TABDL" />
					<FIELD name="TABDLL" />
					<FIELD name="OID1" />
					<FIELD name="COD1" />
					<FIELD name="OID2" />
					<FIELD name="COD2" />
					<FIELD name="OID3" />
					<FIELD name="COD3" />
					<FIELD name="OID4" />
					<FIELD name="COD4" />
					<FIELD name="OID5" />
					<FIELD name="COD5" />
					<FIELD name="OID6" />
					<FIELD name="COD6" />
					<FIELD name="OID" />
					<FIELD name="COD" />
					<FIELD name="TXT" />
					<FIELD name="LVL" />
					<FIELD name="PAD" />
					<FIELD name="SOLM2" />
					<FIELD name="SOLM1" />
					<FIELD name="SOLM" />
					<FIELD name="VARM" />
					<FIELD name="SOLX2" />
					<FIELD name="SOLX1" />
					<FIELD name="SOLX" />
					<FIELD name="VARX" />
					
				</FIELDS>
			</SQL>
		</QUERY>	
				
		
		<QUERY type="propertiesLink" name="VIEWPROPERTIES" forSelections="false"> 
			<SQL  
				select="SELECT 'M2', texte_court 
							FROM base.p_calendrier_mois
							WHERE mois = [MOIS] - 200
						UNION
						SELECT 'M1', texte_court 
							FROM base.p_calendrier_mois
							WHERE mois = [MOIS] - 100
						UNION
						SELECT 'M0', texte_court 
							FROM base.p_calendrier_mois
							WHERE mois = [MOIS]
						" >
				<FIELDS>
					<FIELD name="name" />
					<FIELD name="value" />
				</FIELDS>
			</SQL>
			<SQL  
				select="SELECT 'AM2', mois
							FROM base.p_calendrier_mois
							WHERE mois = [MOIS] - 200
						UNION
						SELECT 'AM1', mois
							FROM base.p_calendrier_mois
							WHERE mois = [MOIS] - 100
						UNION
						SELECT 'AM0', mois
							FROM base.p_calendrier_mois
							WHERE mois = [MOIS]
						" >
				<FIELDS>
					<FIELD name="name" />
					<FIELD name="value" />
				</FIELDS>
			</SQL>
			
			<SQL enabled="[TYPEPERIODE!=X::false]"  
				select="SELECT 'X2', exercice_comptable
							FROM base.p_calendrier_mois
							WHERE mois = [MOIS] - 200
						UNION
						SELECT 'X1', exercice_comptable
							FROM base.p_calendrier_mois
							WHERE mois = [MOIS] - 100
						UNION
						SELECT 'X0', exercice_comptable
							FROM base.p_calendrier_mois
							WHERE mois = [MOIS]						
						UNION
						SELECT 'X2D', exercice_mois_comptable_1
							FROM base.p_calendrier_mois
							WHERE mois = [MOIS] - 200
						UNION
						SELECT 'X2F', mois
							FROM base.p_calendrier_mois
							WHERE mois = [MOIS] - 200
						UNION
						SELECT 'X1D', exercice_mois_comptable_1
							FROM base.p_calendrier_mois
							WHERE mois = [MOIS] - 100
						UNION
						SELECT 'X1F', mois
							FROM base.p_calendrier_mois
							WHERE mois = [MOIS] - 100
						UNION
						SELECT 'X0D', exercice_mois_comptable_1
							FROM base.p_calendrier_mois
							WHERE mois = [MOIS]	
						UNION
						SELECT 'X0F', mois
							FROM base.p_calendrier_mois
							WHERE mois = [MOIS]	
						" >
				<FIELDS>
					<FIELD name="name" />
					<FIELD name="value" />
				</FIELDS>
			</SQL>
			
			
			<SQL enabled="[TYPEPERIODE!=A::false]"  
				select="SELECT 'X2', annee
							FROM base.p_calendrier_mois
							WHERE mois = [MOIS] - 200
						UNION
						SELECT 'X1', annee
							FROM base.p_calendrier_mois
							WHERE mois = [MOIS] - 100
						UNION
						SELECT 'X0', annee
							FROM base.p_calendrier_mois
							WHERE mois = [MOIS]
						UNION
						SELECT 'X2D', annee * 100 + 1
							FROM base.p_calendrier_mois
							WHERE mois = [MOIS] - 200
						UNION
						SELECT 'X2F', mois
							FROM base.p_calendrier_mois
							WHERE mois = [MOIS] - 200
						UNION
						SELECT 'X1D', annee * 100 + 1
							FROM base.p_calendrier_mois
							WHERE mois = [MOIS] - 100
						UNION
						SELECT 'X1F', mois
							FROM base.p_calendrier_mois
							WHERE mois = [MOIS] - 100
						UNION
						SELECT 'X0D', annee * 100 + 1
							FROM base.p_calendrier_mois
							WHERE mois = [MOIS]
						UNION
						SELECT 'X0F', mois
							FROM base.p_calendrier_mois
							WHERE mois = [MOIS]
						" >
				<FIELDS>
					<FIELD name="name" />
					<FIELD name="value" />
				</FIELDS>
			</SQL>
			
			
		</QUERY>
			
	</QUERIES> 
	
	<CALCFIELDS>
	</CALCFIELDS>
	
	<PRESENTATION>
	
		<VIEWLINKS>
			
			

		
		</VIEWLINKS>
			
		<ONGLET excelLabel="Répartition mensuelle" label="Répartition mensuelle" multiTab="true" multiTabBreakField="TABD" multiTabBreakLabelField="TABDL" multiTabBreakLonglabelField="TABDLL">
		
			<CHARTx title="Evolution mensuelle" type="lineChart" sortField="TXT" sortSeq="A"
				condition="Number(ROW.COD) &gt;= 100"
				maxItems="5"  maxItemsSortOn="SOLX" maxItemsSortSeq="D"
				serieIsCategory="true">
				<CATEGORY field="TXT" 
					type="Char"
					/>
				<SERIE field="SOLM01" displayName="VIEW.M1" displayNameCalc="true" />
				<SERIE field="SOLM02" displayName="VIEW.M2" displayNameCalc="true" />
				<SERIE field="SOLM04" displayName="VIEW.M3" displayNameCalc="true" />
				<SERIE field="SOLM04" displayName="VIEW.M4" displayNameCalc="true" />
				<SERIE field="SOLM05" displayName="VIEW.M5" displayNameCalc="true" />
				<SERIE field="SOLM06" displayName="VIEW.M6" displayNameCalc="true" />
				<SERIE field="SOLM07" displayName="VIEW.M7" displayNameCalc="true" />
				<SERIE field="SOLM08" displayName="VIEW.M8" displayNameCalc="true" />
				<SERIE field="SOLM09" displayName="VIEW.M9" displayNameCalc="true" />
				<SERIE field="SOLM10" displayName="VIEW.M10" displayNameCalc="true" />
				<SERIE field="SOLM11" displayName="VIEW.M11" displayNameCalc="true" />
				<SERIE field="SOLM12" displayName="VIEW.M12" displayNameCalc="true" />
			</CHARTx>
					
			<DATAGRID title="" key="" total="true" headerHeight="36" variableRowHeight="true" sortable="= SELECT.ARBRE1 == '-1' &amp;&amp; SELECT.ARBRE2 == '-1' &amp;&amp; SELECT.ARBRE3 == '-1' &amp;&amp; SELECT.ARBRE4 == '-1' &amp;&amp; SELECT.ARBRE5 == '-1'"
				totalRowInRows="= ROW.OID == '-9999999'">
				<ROWSTYLE name="fontSize" value="10" />
				<ROWSTYLE name="backgroundColor" value="0xFFD393" condition="ROW.LVL == '1' &amp;&amp; VIEW.QTAB != '1'"/>
				<ROWSTYLE name="fontWeight" value="bold" condition="ROW.LVL == '1' &amp;&amp; VIEW.QTAB != '1'"/>
				<ROWSTYLE name="borderStyle" value="solid" condition="ROW.LVL == '1' &amp;&amp; VIEW.QTAB != '1'"/>
				<ROWSTYLE name="borderThickness" value="2" condition="ROW.LVL == '1' &amp;&amp; VIEW.QTAB != '1'"/>
				<ROWSTYLE name="rowHeight" value="36" condition="ROW.LVL == '1' &amp;&amp; VIEW.QTAB != '1'"/>
				<ROWSTYLE name="borderSides" value="top bottom" condition="ROW.LVL == '1' &amp;&amp; VIEW.QTAB != '1'"/>
				
				<ROWSTYLE name="backgroundColor" value="0xFFD393" condition="ROW.LVL == '2' &amp;&amp; VIEW.QTAB == '1'"/>
				<ROWSTYLE name="fontWeight" value="bold" condition="ROW.LVL == '2' &amp;&amp; VIEW.QTAB == '1'"/>
				<ROWSTYLE name="borderStyle" value="solid" condition="ROW.LVL == '2' &amp;&amp; VIEW.QTAB == '1'"/>
				<ROWSTYLE name="borderThickness" value="2" condition="ROW.LVL == '2' &amp;&amp; VIEW.QTAB == '1'"/>
				<ROWSTYLE name="rowHeight" value="36" condition="ROW.LVL == '2' &amp;&amp; VIEW.QTAB == '1'"/>
				<ROWSTYLE name="borderSides" value="top bottom" condition="ROW.LVL == '2' &amp;&amp; VIEW.QTAB == '1'"/>
				
				<ROWSTYLE name="fontWeight" value="bold" condition="ROW.LVL == '2'"/>
				<ROWSTYLE name="fontWeight" value="bold" condition="ROW.LVL == '3'"/>
				<ROWSTYLE name="fontWeight" value="bold" condition="ROW.LVL == '4'"/>
				<ROWSTYLE name="rowHeight" value="24" condition="ROW.LVL == '2' &amp;&amp; VIEW.QTAB != '1'"/>
				<ROWSTYLE name="rowHeight" value="24" condition="ROW.LVL == '3'"/>
				<ROWSTYLE name="fontSize" value="11" condition="ROW.LVL == '1' &amp;&amp; VIEW.QTAB != '1'"/>
				<ROWSTYLE name="fontSize" value="11" condition="ROW.LVL == '2'"/>

				<COLUMN dataField="LVL"
					type="Number"
					headerText="lvl"
					width="40"
					visible="false" />
				<COLUMN dataField="PAD"
					type="Number"
					headerText="pad"
					width="40"
					visible="false" />
				<COLUMN dataField="OID1"
					type="Char"
					visible="false" />
				<COLUMN dataField="OID2"
					type="Char"
					visible="false" />
				<COLUMN dataField="OID3"
					type="Char"
					visible="false" />
				<COLUMN dataField="OID4"
					type="Char"
					visible="false" />
				<COLUMN dataField="OID5"
					type="Char"
					visible="false" />
				<COLUMN dataField="OID6"
					type="Char"
					visible="false" />
				<COLUMN dataField="COD1"
					type="Char"
					visible="false" />
				<COLUMN dataField="COD2"
					type="Char"
					visible="false" />
				<COLUMN dataField="COD3"
					type="Char"
					visible="false" />
				<COLUMN dataField="COD4"
					type="Char"
					visible="false" />
				<COLUMN dataField="COD5"
					type="Char"
					visible="false" />
				<COLUMN dataField="COD6"
					type="Char"
					visible="false" />
				
				<COLUMN dataField="OID"
					type="Char"
					visible="false" />
				<COLUMN dataField="COD" 
					type="Char"
					width="120"
					visible="true"
					headerText="Code" 
					totalFunction="text" 
					totalComplement="" >
					<CELLSTYLE name="paddingLeft" value="10" condition="ROW.PAD == '1'"/>
					<CELLSTYLE name="paddingLeft" value="20" condition="ROW.PAD == '2'"/>
					<CELLSTYLE name="paddingLeft" value="30" condition="ROW.PAD == '3'"/>
					<CELLSTYLE name="paddingLeft" value="40" condition="ROW.PAD == '4'"/>
					<CELLSTYLE name="paddingLeft" value="50" condition="ROW.PAD == '5'"/>
				</COLUMN>
				<COLUMN dataField="TXT" 
					type="Char"
					minWidth="150"
					visible="true"
					headerText="SELECT.GROUPBY_LABEL" 
					headerTextCalc="true" 
					totalFunction="text" 
					totalComplement="TOTAL" >
					<CELLSTYLE name="cellIndicator" value="circle, 5, right top, 0xFF6600" condition="ROW.QAJ == '1' || ROW.QAJ == '2'" />
					<CELLSTYLE name="paddingLeft" value="10" condition="ROW.PAD == '1'"/>
					<CELLSTYLE name="paddingLeft" value="20" condition="ROW.PAD == '2'"/>
					<CELLSTYLE name="paddingLeft" value="30" condition="ROW.PAD == '3'"/>
					<CELLSTYLE name="paddingLeft" value="40" condition="ROW.PAD == '4'"/>
					<CELLSTYLE name="paddingLeft" value="50" condition="ROW.PAD == '5'"/>
				</COLUMN>
				<COLUMN dataField="SOLM2"
					type="Number"
					outputFormat="#"
					width="80"
					fixed="false"
					headerText="VIEW.M2"
					headerTextCalc="true"
					align="right"
					
					totalFunction="sum" 
					totalComplement="" 
					 />
				<COLUMN dataField="SOLM1"
					type="Number"
					outputFormat="#"
					width="80"
					headerText="VIEW.M1"
					headerTextCalc="true"
					align="right"
					
					fixed="false"
					totalFunction="sum" 
					totalComplement="" 
					 />
				<COLUMN dataField="SOLM"
					type="Number"
					outputFormat="#"
					width="80"
					fixed="false"
					headerText="VIEW.M0"
					headerTextCalc="true"
					align="right"
					
					totalFunction="sum" 
					totalComplement="" 
					 />
				<COLUMN dataField="VARM"
					type="Number"
					outputFormat="#"
					width="80"
					fixed="false"
					headerText="'Var ' + VIEW.M0 + '/' + VIEW.M1"
					headerTextCalc="true"
					align="right"
					totalFunction="" 
					totalComplement="">
				</COLUMN>
				
				<COLUMN dataField="SOLX2"
					type="Number"
					outputFormat="#"
					width="80"
					fixed="false"
					headerText="VIEW.X2"
					headerTextCalc="true"
					align="right"
					
					totalFunction="sum" 
					totalComplement="" 
					 />
				<COLUMN dataField="SOLX1"
					type="Number"
					outputFormat="#"
					width="80"
					fixed="false"
					headerText="VIEW.X1"
					headerTextCalc="true"
					align="right"
					
					totalFunction="sum" 
					totalComplement="" 
					 />
				<COLUMN dataField="SOLX"
					type="Number"
					outputFormat="#"
					width="80"
					fixed="false"
					headerText="VIEW.X0"
					headerTextCalc="true"
					align="right"
					
					totalFunction="sum" 
					totalComplement="" 
					 />
				<COLUMN dataField="VARX"
					type="Number"
					outputFormat="#"
					width="80"
					fixed="false"
					headerText="'Var ' + VIEW.X0 + '/' + VIEW.X1"
					headerTextCalc="true"
					align="right"
					totalFunction="" 
					totalComplement="">
				</COLUMN>
				<COLUMN dataField="VARXP"
					type="Number"
					outputFormat="#%"
					width="70"
					fixed="false"
					headerText="'% ' + VIEW.X0 + '/' + VIEW.X1"
					headerTextCalc="true"
					align="right"
					totalFunction="" 
					totalComplement="" 
					calc="true">
					<CALC dataField="VARX" />
					<CALC dataField="SOLX1" operator="/" />
					<CALC dataField="*constant" value="100" operator="*" />
				</COLUMN>
				
								
				
			</DATAGRID>
		
		</ONGLET>
		
		
				
	</PRESENTATION>
	
</VUE>

			
