Affichage d'une requête analyse croisée (issue de Acess) sur une page ASP ! Comm

systalpa Messages postés 1 Date d'inscription samedi 27 août 2005 Statut Membre Dernière intervention 27 août 2005 - 27 août 2005 à 12:09
Zlub Messages postés 809 Date d'inscription mercredi 11 octobre 2000 Statut Membre Dernière intervention 29 septembre 2010 - 27 août 2005 à 21:49
J'ai une requête access d'analyse croisée basique :

"TRANSFORM Sum(tblVersPart.MontPaiemEurHt) AS SommeDeMontPaiemEurHt
SELECT tblVersPart.TypePaiem, Sum(tblVersPart.MontPaiemEurHt) AS [Total de MontPaiemEurHt]
FROM tblVersPart
WHERE (((tblVersPart.InitialesPartenaire)= "fc") AND ((Year([DatePaiem]))=2002))
GROUP BY tblVersPart.TypePaiem
PIVOT Format([DatePaiem],"mmm") In ("janv","févr","mars","avr","mai","juin","juil","août","sept","oct","nov","déc");
"

Je souhaite afficher cette requête sur une page asp comme je le fais pour des requêtes sélection.

Voici le code de ma page asp en cours de test :

<% Option Explicit %>
<!--#include file="commun.asp" -->
<%
Response.Buffer = True

Dim rsCont
Dim strSQLCont
strSQLCont="TRANSFORM Sum(tblVersPart.MontPaiemEurHt) AS SommeDeMontPaiemEurHt " _
& "SELECT tblVersPart.TypePaiem, Sum(tblVersPart.MontPaiemEurHt) AS tot " _
& "FROM tblVersPart " _
& "WHERE (((tblVersPart.InitialesPartenaire)='fc') AND ((Year([DatePaiem]))=2002)) " _
& "GROUP BY tblVersPart.TypePaiem " _
& "PIVOT Format([DatePaiem],'mmm') In ('janv','févr','mars','avr','mai','juin','juil','août','sept','oct','nov','déc');"
Set rsCont = Server.CreateObject("ADODB.Recordset")
rsCont.Open strSQLCont, strCon, 2, 2

%>
<html>
<head>
<title>AF_clean</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="style_principal_adm.css" type="text/css">
</head>

<table width="100%" bgcolor="#FFFFFF" border="1" bordercolor="#868686"
style="BACKGROUND-COLOR: #FFFFFF; BORDER-BOTTOM: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; WIDTH: 99%"
hlcolor="#BEC5DE" slcolor="#FFAE88" dragcolor='gray'>

<form>

----

rsCont(\"tot\") |
rsCont(\"TypePaiem\") |
Patron |
rsCont(\"SommeDeMontPaiemEurHt\") |
Code
Post.
|
Ville |
Date Départ |
Zone |
Date
Enr. Cont
|

Etat Cont. |
Date Valid. Etat |

</form>

<% Do While NOT rsCont.EOF %>

----,

<% =rsCont(\"tot\") %>

</td>
<%=rsCont("TypePaiem") %>,
<%=rsCont("tot") %>,
&,
az,
az,
az,
re,
fv,
vf,
vf,

<%
rsCont.MoveNext
Loop
%>

</td>
<td></td>
</tr>
<tr>
<td height="15"></td>
<td></td>
<td></td>
</tr>
</table>

</html>

Pour l'instant je ne sais pas comment faire ce tableau dynamique sur ma page asp et je ne trouve rien nulle part sur ce sujet !

hum hum ....

Qui a la solution ?

[mailto:systalpa75@yahoo.fr systalpa75@yahoo.fr]

Merci d'avance.

1 réponse

Zlub Messages postés 809 Date d'inscription mercredi 11 octobre 2000 Statut Membre Dernière intervention 29 septembre 2010 8
27 août 2005 à 21:49
Salut,

Tu devrais peut être poster ta question sur ce site tu aura sans doute plus de réponses

++

Zlub

<hr size="2" width="100%">
0
Rejoignez-nous