One Report, Two Data SourcesReporting from Unidata and SQL Server in a
single report
PRESENTER: Jared Carter| [email protected] | October 11, 2010
Quick Facts about Thomas Edison State College• Primarily an online distance education institution• Approximately 18,735 students• Approximately 45% of our students in the military• Datatel (Unidata)• Blackboard (SQL Server)
ChallengeCertain military contracts required TESC to notify the military when a student fell behind in a course. Manually reporting from Mentors was:• Labor intensive• Inconsistent and confusing• Resulted in potential contract violationA decision was made to use the date the student last accessed a course to indicate “tardiness” in the course. This information will be reported regularly to the military.
SolutionCreate a report that pulls “live” data from both Datatel and Blackboard
Steps1. Identify and prepare data sources, tables, and fields needed for
reporting. 2. Define the selection criteria (Filter)3. In Informer, map data source, files, and remote links. 4. Create Informer Report.
Identify your data sources, tables, and fieldsSQL Server: Tables, Views, FieldsUnidata: Entities/Files, Attributes, computed columns/i-descriptors
Searching through 3rd party software, databases, and documentation is time consuming, and at times, very frustrating. Solicit help.
Blackboard Data Sources• USERS
– pk1– user_id
• COURSE_MAIN– pk1– users_pk1– course_id– batch_uid
• COURSE_USERS– crsmain_pk1– last_access_date
Datatel Data Sources• PERSON
– @ID– SSN, LAST.NAME, FIRST.NAME
• STUDENT.COURSE.SECTION– SCS.STUDENT– X.SCS.SYNONYM– SCS.REG.METH
• COURSE.SECTIONS– SEC.TERM– SEC.SUBJECT, SEC.COURSE.NO, SEC.START.DATE,
SEC.END.DATE, SEC.NAME
• COURSE.SEC.FACULTY– CSF.FACULTY
STUDENT.COURSE.SECTION
STUDENTS PERSON
COURSE.SECTIONS COURSE.SEC.FACULTY FACULTY PERSON
USERS COURSE_MAIN COURSE_USERS
This will not work because you need a single linked key and your associations must be a hierarchy.
STUDENT.COURSE.SECTION
STUDENTS PERSON
COURSE.SECTIONS COURSE.SEC.FACULTY FACULTY PERSON
NEW VIEW: BEHIND_PACE_vw COURSE_USERS
• In SQL, create a new view that has a unique key field called “ID”• In Unidata, create a unique computed column in the entity (file) that will be your key
to the “ID” field in your SQL view.
Blackboard Data Sources• BEHIND_PACE_vw
– BB_SCS_KEY– user_id – course_id– batch_uid– last_access_date
Datatel Data Sources• PERSON
– @ID– SSN, LAST.NAME, FIRST.NAME
• STUDENT.COURSE.SECTION– SCS.STUDENT– X.SCS.BBKEY– X.SCS.SYNONYM– SCS.REG.METH
• COURSE.SECTIONS– SEC.TERM– SEC.SUBJECT, SEC.COURSE.NO, SEC.START.DATE,
SEC.END.DATE, SEC.NAME
• COURSE.SEC.FACULTY– CSF.FACULTY
Define the selection criteria (Filter)• When using two data sources, only one data source can have a filter.
(However, if you are using a view, you can add criteria to the view.) • For this example:
– SCS.REG.METH = “EARMY”– SEC.TERM = <<PROMPT>>
Map Datasource Tables
Add Properties to your Tables
Add Links to your Tables
Add details for Remote Link
Create Informer Report
Add selection criteria
Add Fields
Add Fields
Sample Report
What’s Next?• More reports!• More data sources!
Thank you! Any questions?
Supporting documentation
SQL Script to create view BEHIND_PACE_vw.
CREATE VIEW [dbo].[BEHIND_PACE_vw] AS SELECT dbo.USERS.USER_ID + N'*' + dbo.COURSE_MAIN.BATCH_UID AS ID, dbo.USERS.USER_ID AS USERID, dbo.COURSE_MAIN.BATCH_UID AS BATCHUID, dbo.COURSE_USERS.last_access_date, dbo.COURSE_MAIN.COURSE_ID AS COURSEID, CAST(GETDATE() - dbo.COURSE_USERS.last_access_date AS int) AS dayslastaccessed FROM dbo.COURSE_USERS INNER JOIN dbo.COURSE_MAIN ON dbo.COURSE_USERS.CRSMAIN_PK1 = dbo.COURSE_MAIN.PK1 INNER JOIN dbo.USERS ON dbo.COURSE_USERS.USERS_PK1 = dbo.USERS.PK1 GO
Computed column X.SCS.BBKEY
Logical File Name: STUDENT.COURSE.SEC Demand Columns:
SCS.STUDENT SCS.COURSE.SECTION SEC.SYNONYM
Computed Column Code: string xResult1; key xKeyCourseSections for file CourseSections; xKeyCourseSections = vScsCourseSection; xResult1 = vScsStudent : "*" : vSecSynonym; return xResult1;