Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>For the drilldown, you need two reports: one that has all the records for an instructor, and one that has all the details for a particular student with that instructor. If the columns you want to display are substantially the same between the two reports, then you can actually do this with a single .asp file, but I'll assume you want to have two files.</p> <p>First, make the detail report. This should get a student ID and instructor ID from the querystring. Presumably, there should also be an academic year or period or some such time limit.</p> <pre class="lang-vbs prettyprint-override"><code>&lt;html&gt;&lt;head&gt;&lt;blah blah blah&gt; &lt;% dim AY, SID, IID, SQL '-etc. AY = Request.Querystring("AY") SID = Request.Querystring("S") IID = Request.Querystring("I") '- validate the inputs and assign default values as needed %&gt;&lt;/head&gt;&lt;body&gt; &lt;% SQL = "SELECT StudentName, Course, DateofClass, Attendance FROM AttendanceView" SQL = SQL &amp; " WHERE StudentID = " &amp; SID &amp; " AND InstructorID = " &amp; IID SQL = SQL &amp; " AND AY = " &amp; AY '- or whatever other filters are needed '- open a recordset and write it out, probably in a table '- close recordset, close table %&gt;&lt;/body&gt;&lt;/html&gt; </code></pre> <p>Then, in the main report, when you're writing out the row for a student, make one of the columns a link to the detail report. </p> <pre class="lang-vbs prettyprint-override"><code>'... response.write "&lt;td&gt;&lt;a href='DetailReport.asp?I=" &amp; rs("InstructorID") response.write "&amp;S=" &amp; rs("StudentID") &amp; "&amp;AY=" &amp; rs("AY") &amp; "'" response.write " title='Click to see details' target='_blank'&gt;" response.write rs("TotalAttendance") &amp; "&lt;/a&gt;&lt;/td&gt;" '--- </code></pre> <p>I've put a target="_blank" on the link, but with a little bit of JavaScript, you can make the detail report come up in a popup window/overlay instead. Also, if you prefer, you can put the detail link in its own column, so instead of clicking, say, the total attendance number, the user would click a plus sign or the word "details" or an arrow or something. The basic idea is the still the same, though: put the identifying information for each row into the link, and then the detail report can read it from the querystring.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload