Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 19th, 2008, 07:32 AM
Registered User
 
Join Date: Feb 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Displaying Matrix Report

Hi

I am using Classic ASP. I want to display a matrix report on screen from the same table. I want to display products horizontally across the top of the page and the test gear vertically down the left hand side. for each product that the test gear is using, I want to mark it, so:


                              Products
Test Gear | Part No | Equipment 1 | 2 | 3 | 4 | etc
A AA Y Y
B BB Y Y Y
C CC Y

I can display the equipment along the top, but the test gear will not display along the left side.

Code:
 While ((Repeat1__numRows <> 0) AND (NOT rsTestGear.EOF)) %>
 <td> <%=(rsTestGear.Fields.Item("EQUIPMENT").Value)%> </td> (Displays equipment on the top)

  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  rsTestGear.MoveNext()

Wend

Currently I can display:

Description | Part No | Equipment |

                               Equipment 1 2 3 etc

All equipments across the top as I wanted, but items on the left under desc and part no are not showing.

I have tried to display those records within while wend loop, display everything as a normal display three columns and loads of rows. when i tried to put it after the wend, it says asp error.
This is the code for the two columns:

<td> <%=(rsTestGear.Fields.Item("desc").Value)%> </td>
<td> <%=(rsTestGear.Fields.Item("part_no").Value)%> </td>

Any help appreciated.
Ahmed

 
Old February 19th, 2008, 07:38 AM
Friend of Wrox
 
Join Date: Oct 2007
Posts: 130
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via AIM to urtrivedi
Default

First post your table structure and tell me which backend you are using?

urt

Help yourself by helping someone.
 
Old February 19th, 2008, 07:52 AM
Registered User
 
Join Date: Feb 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

urt

i am using SQL Server Enterprise

Table below. Note, to display result of query for desc and part_no are not included. i have tried to put in within while loop and outside, does not work. ASP error

Thanks.

<table id="table01" width="100%" border="0" cellpadding="2" cellspacing="2">

<tr bgcolor="#DDDDDD">

<td><a>Description</a></td>
<td> <a>Part No</a></td>
<td><a>Equipment</a></td>

<tr>
 (two blank cells to line first two cells of desc and part_no in row 1)

</tr>
<tr bgcolor="#EEEEEE">
<td></td> <td></td>
<%
previous =""

While ((Repeat1__numRows <> 0) AND (NOT rsTestGear.EOF)) %>
<%
if previous = rsTestGear.Fields.Item("EQUIPMENT").Value or isnull(rsTestGear.Fields.Item("EQUIPMENT").Value) then
else
%>

<td> <%=(rsTestGear.Fields.Item("EQUIPMENT").Value)%> </td>
<%
  previous = rsTestGear.Fields.Item("EQUIPMENT").Value
end if

  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  rsTestGear.MoveNext()

Wend
%>

</tr>

   </table>

 
Old February 19th, 2008, 11:56 PM
Friend of Wrox
 
Join Date: Oct 2007
Posts: 130
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via AIM to urtrivedi
Default

I was asking for database table structure

urt

Help yourself by helping someone.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Matrix report issue aranjan BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 0 February 4th, 2007 02:42 AM
fusion between matrix and tabular report.. johnnygut Reporting Services 0 November 16th, 2006 04:15 PM
matrix report rhbandagi Classic ASP Databases 0 March 24th, 2006 04:06 AM
2 independent Column Groups in report matrix? Andrei Reporting Services 1 February 21st, 2006 12:42 AM
matrix report output saravananedu Oracle 1 March 3rd, 2005 10:20 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.