I am trying to run a data report in Visual Basic. I have set up a command in the data environment that will filter a query to show the results I want. The query runs fine, but I cannot get the report to limit the number of rows per student to one. I just want to run the most recent test date and scores for each student. The existing SQL code that I have in there now is as follows:
select studentid, firstname, mi, lastname, testdate, testtype, testtitle, score, `testsubject`, `programtype1`, `programtype2`, `sitewish1`, `sitewish2` from qry_rpt_studentregistered1 where (((`sitewish2` = ?) or (`sitewish1` = ?)) and ((`programtype2` = ?) or (`programtype1` = ?)) and ((`testsubject` = ?)))
The query contains 3 joined tables. The way I want the report to look something like below:
Name TestDate TestType TestTitle Score
(One Record per student)
If you have any suggestions I thank you in advance.
select studentid, firstname, mi, lastname, testdate, testtype, testtitle, score, `testsubject`, `programtype1`, `programtype2`, `sitewish1`, `sitewish2` from qry_rpt_studentregistered1 where (((`sitewish2` = ?) or (`sitewish1` = ?)) and ((`programtype2` = ?) or (`programtype1` = ?)) and ((`testsubject` = ?)))
The query contains 3 joined tables. The way I want the report to look something like below:
Name TestDate TestType TestTitle Score
(One Record per student)
If you have any suggestions I thank you in advance.