Bonjour a tous,
je me suis créé un tableau qui me permet d'afficher plusieurs informations concernant une personne (sa fonctiuon, son poste,sa societe...) bref tous ce qui concerne sa carriere.
j'alimente ce tableau avec une base oracle, et donc a chaque fois que ma requete trouve une info pour une date donnée il me créé une nouvelle ligne dans mon tableau.
par contre ce que j'aimerais pouvoir faire, c'est lorsque par exemple pour une date donnée il n'y a que la date et la categorie qui sont renseignés et que le poste et la societe ne soient pas renseignes alors que cette ligne n'apparaisse pas dans mon tableau.
merci de votre aide
je vous joint le code de ma page ou se trouve le tableau:
<% if session("login")="" then response.redirect("connexion.asp")%>
<%
'connexion avec la base de données
set conn=Application("connexion")
'recup du matricule salarie
if request.queryString("liste_salarie")<>"" then
cle = request.queryString("liste_salarie")
'recup des données du salarie
sql_salarie = "SELECT S.*,Aff.dateDebAff,Aff.dateFinAff,Aff.idDomainePersonnel,Dom.libelleDomaine,Dom.libTronqueDomaine,Aff.idSociete,Soc.nomSociete,Aff.idCategorieProf,CatPro.libCategorieProf,Aff.idUnitStruct,US.libUnitStruct,Aff.idUnitStructReg,USR.libUnitStructReg,Aff.idContrat,C.libContrat,Aff.idFonction,F.libFonction,Aff.idPoste,P.libPoste,Aff.idTrancheDecompte FROM Salarie S,Affectation Aff,DomainePersonnel Dom,Societe Soc,CategorieProfessionnelle CatPro,UniteStructurelle US,UniteStructurelleRegroupee USR,Contrat C,Fonction F,Poste P,TrancheDecompte TD where S.matricule ='" & cle & "' and S.matricule = Aff.matricule(+) and Aff.idDomainePersonnel = Dom.idDomainePersonnel(+) and Aff.idSociete = Soc.idSociete(+) and Aff.idCategorieProf = CatPro.idCategorieProf(+) and Aff.idUnitStruct = US.idUnitStruct(+) and Aff.idUnitStructReg = USR.idUnitStructReg(+) and Aff.idContrat = C.idContrat(+) and Aff.idFonction = F.idFonction(+) and Aff.idPoste = P.idPoste(+) and Aff.idTrancheDecompte = TD.idTrancheDecompte(+) order by (dateDebAff) DESC"
set infos_salarie = conn.Execute(sql_salarie)
Session("liste_salarie")=cle
if not(infos_salarie.EOF) then
nom = infos_salarie("nom")
prenom = infos_salarie("prenom")
libelleDomaine = infos_salarie("libelleDomaine")
libTronqueDomaine = infos_salarie("libTronqueDomaine")
nomSociete = infos_salarie("nomSociete")
libCategorieProf = infos_salarie("libCategorieProf")
libUnitStruct = infos_salarie("libUnitStruct")
libUnitStructReg = infos_salarie("libUnitStructReg")
libContrat = infos_salarie("libContrat")
libFonction = infos_salarie("libFonction")
libPoste = infos_salarie("libPoste")
idTrancheDecompte = infos_salarie("idTrancheDecompte")
dateDebAff = infos_salarie("dateDebAff")
dateDebAff = Day(dateDebAff )&"/"&Month(dateDebAff )&"/"&Year(dateDebAff )
dateFinAff = infos_salarie("dateFinAff")
dateFinAff = Day(dateFinAff )&"/"&Month(dateFinAff )&"/"&Year(dateFinAff )
end if
end if
%>
<html>
<head>
<title>Affectation(s) du salarié</title>
</head>
<body bgcolor="#FFCCCC">
<p align="center"><font size="5" color="#808080"><b>Historique des affectations</b></font></p>
<hr>
<br>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1" height="74">
<tr>
<td width="18%" align="center" height="51">
<p align="center"><b>Cat. Pro.</b></td>
<td width="32%" align="center" height="51"><b>Société</b></td>
<td width="9%" height="51">
<p align="center">
<b>Dom. Pers.</b></td>
<td width="9%" height="51">
<p align="center"><b>Service</b></td>
<td width="15%" height="51">
<p align="center"><b>Poste</b></td>
<td width="14%" height="51">
<p align="center"><b>Fonction</b></td>
<td width="10%" height="51">
<p align="center"><b>Date d'effet</b></td>
</tr>
<% Do While Not(infos_salarie.EOF) %>
<tr>
<% dateDebAff = infos_salarie("dateDebAff")
if dateDebAff<>0 then
dateDebAff = Day(dateDebAff )&"/"&Month(dateDebAff )&"/"&Year(dateDebAff )
end if
%>
<td width="18%" height="22">
<input type="text" disabled name="libCategorieProf" VALUE= "<%=infos_salarie("libCategorieProf")%>" size="7" style="font-size: 8pt" ></td>
<td width="32%" height="22">
<input type="text" disabled name="nomSociete" VALUE= "<%=infos_salarie("nomSociete")%>" size="30" style="font-size: 8pt" ></td>
<td width="17%" height="22">
<input type="text" disabled name="libTronqueDomaine" VALUE= "<%=infos_salarie("libTronqueDomaine")%>" size="10" style="font-size: 8pt" ></td>
<td width="17%" height="22">
<input type="text" disabled name="libUnitStructReg" VALUE= "<%=infos_salarie("libUnitStructReg")%>" size="25" style="font-size: 8pt" ></td>
<td width="15%" height="22">
<input type="text" disabled name="libPoste" VALUE= "<%=infos_salarie("libPoste")%>" size="22" style="font-size: 8pt" ></td>
<td width="14%" height="22">
<input type="text" disabled name="libFonction" VALUE= "<%=infos_salarie("libFonction")%>" size="23" style="font-size: 8pt" ></td>
<td width="10%" height="22">
<input type="text" disabled name="dateDebAff" VALUE= "<%=dateDebAff%>" size="9" style="font-size: 8pt" ></td>
<% infos_salarie.MoveNext
Loop
infos_salarie.close
set infos_salarie=NOTHING
%>
</tr>
</table>
<br>
<hr>
</body>
</html>