0

I am using Microsoft SQL Server Report Builder 2008 and I am dealing with a report that shows the user various bit of information about a student enrolled in a class.

A user requested a new feature to show the date that the pre-requisite class was completed. I have pulled the pre-requisite class code and pre-requisite class name from the other dataset, and have it existing in ReportItems!Textbox13.Value.

The tricky part is that all completed courses exist within the current scope of the dataset "ClassInfo", just on a different row in the SQL table. If I was able to have my own SQL query in the Textbox, I could easily query it...

Whenever I try to use lookup() to discover the date that the pre-requisite class was completed, I receive 'Nothing'. Any help would be appreciated!

This is my current lookup:

    =lookup(CSTR(ReportItems!Textbox13.Value) & CSTR(Fields!StdId.Value), CSTR(Fields!COURSEID.Value) & CSTR(Fields!.StdId.Value), Fields!DateCompleted.Value, "ClassInfo")
J Gil
  • 1
  • 1
  • Can you modify the dataset source to overlay an existing prerequisite with your data? – Ross Bush Jun 14 '18 at 17:58
  • What do you mean by that? – J Gil Jun 14 '18 at 18:25
  • Is it possible to return your class info with extra columns to identify pre-requisites? – Ross Bush Jun 14 '18 at 18:45
  • The problem I have is not identifying the pre-requisite, I am able to do so and have done so in a separate lookup (on a separate table) which resulted in ReportItems!TextBox13.Value. The problem is displaying the date the course pre-requisite was completed. That information doesnt exist in the table where the pre-req codes exist, but in the same table where the main info is coming in (namely, with all classes). If I were able to somehow pseudo SQL query it, it would look like: SELECT CompletedDate FROM ClassInfo WHERE StdID = (Fields!StdID.Value) and CourseID = (ReportItems!Textbox13.Value) – J Gil Jun 14 '18 at 19:08
  • However, since the Matrix is only pulling up class info for the current class and current student id (as selected from the parameters), what I want to do is query other rows in the database (but not other rows in SSRS, hence why I cant use Previous()). – J Gil Jun 14 '18 at 19:10

0 Answers0