> Tech > Listing 1

Listing 1

Tech - Par iTPro - Publié le 24 juin 2010
email

Page drillthrough.asp qui affiche des données détaillées

<%@ Language=VBScript %>
<%
‘ ASP page displays DRILLTHROUGH data.
Response.Buffer=True
Response.Expires=à˜
%>

<html>
<head>
<meta NAME=”GENERATOR” Content=”Microsoft Visual Studio 6.à˜”>
</head>
<body bgcolor=”Ivory”>
<font FACE=”Verdana” size=2>
<h2>Detail Data</h2>

<%
‘ Print the table.
Sub PrintTable()
  %>
  <TABLE border=1 width=1à˜à˜%>
  <% For

i = à˜ to rs.Fields.Count – 1 %>
<TH><font size=-2><% =rs.Fields(i).Name %></font></TH>
<% Next %>
<% Do While Not rs.EOF %>
<TR>
<% For i = à˜ to rs.Fields.Count – 1 %>
<TD><FONT size=-2><% =rs(i).Value %></FONT></TH>
<% Next %>
</TR>
<% rs.MoveNext
Loop %>
</TABLE> <%
End Sub

‘ Set connection objects for the multidimensional catalog and
‘ cellset.
Set cat = Server.CreateObject(“ADOMD.Catalog”)
Set rs = Server.CreateObject(“ADODB.Recordset”)

‘ Check to see whether the Session object Server Name is present.
If Len(Session(“ServerName”)) > à˜ Then
cat.ActiveConnection = “Data Source=” &
Session(“ServerName”) & “;Initial Catalog=” &
Session(“InitialCatalog”) & “;Provider=msolap;”
strSource = “DRILLTHROUGH MAXROWS 5à˜à˜à˜ “
strSource = strSource & “SELECT {“ & Request(“colName”) &
“} ON COLUMNS,”
strSource = strSource & “{“ & Request(“rowName”) & “}
ON ROWS “
strSource = strSource & “ FROM “ & Request(“cube”)
strSource = strSource & “ “ & Request(“Where”)

‘ Get the recordset.
Response.Write strSource
Set rs = cat.ActiveConnection.Execute(strSource)

Do While Not rs Is Nothing
Call PrintTable
‘ Look for data from the next partition.
Set rs = rs.NextRecordset
Loop

set rs = nothing
set cat = nothing

Else
Response.Write “This page cannot be called by itself.”
End If
%>

</font>
</body>
</html>

Téléchargez cette ressource

Etude « RSE 2023 » avec Atos et son entité sustainability EcoAct

Etude « RSE 2023 » avec Atos et son entité sustainability EcoAct

La réglementation qui oblige désormais les entreprises à agir vertueusement envers le climat, va se renforcer pour évaluer les efforts et la communication de leurs actions et leur suivi. L’enquête d’Atos vise à déterminer la connaissance des entreprises sur les réglementations et les obligations qui leur incombent. Votre entreprise est-elle équipée efficacement pour répondre à ces défis, à la réglementation et aux nouvelles attentes ? Voici 10 questions qui vous permettront de faire un état des lieux.

Tech - Par iTPro - Publié le 24 juin 2010