one report, two data sources reporting from unidata and sql server in a single report presenter:...

21
One Report, Two Data Sources Reporting from Unidata and SQL Server in a single report PRESENTER: Jared Carter| [email protected] | October 11, 2010

Upload: bailey-crowe

Post on 01-Apr-2015

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: One Report, Two Data Sources Reporting from Unidata and SQL Server in a single report PRESENTER: Jared Carter| jcarter@tesc.edu | October 11, 2010

One Report, Two Data SourcesReporting from Unidata and SQL Server in a

single report

PRESENTER: Jared Carter| [email protected] | October 11, 2010

Page 2: One Report, Two Data Sources Reporting from Unidata and SQL Server in a single report PRESENTER: Jared Carter| jcarter@tesc.edu | 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)

Page 3: One Report, Two Data Sources Reporting from Unidata and SQL Server in a single report PRESENTER: Jared Carter| jcarter@tesc.edu | October 11, 2010

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.

Page 4: One Report, Two Data Sources Reporting from Unidata and SQL Server in a single report PRESENTER: Jared Carter| jcarter@tesc.edu | October 11, 2010

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.

Page 5: One Report, Two Data Sources Reporting from Unidata and SQL Server in a single report PRESENTER: Jared Carter| jcarter@tesc.edu | October 11, 2010

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.

Page 6: One Report, Two Data Sources Reporting from Unidata and SQL Server in a single report PRESENTER: Jared Carter| jcarter@tesc.edu | October 11, 2010

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

Page 7: One Report, Two Data Sources Reporting from Unidata and SQL Server in a single report PRESENTER: Jared Carter| jcarter@tesc.edu | October 11, 2010

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.

Page 8: One Report, Two Data Sources Reporting from Unidata and SQL Server in a single report PRESENTER: Jared Carter| jcarter@tesc.edu | October 11, 2010

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.

Page 9: One Report, Two Data Sources Reporting from Unidata and SQL Server in a single report PRESENTER: Jared Carter| jcarter@tesc.edu | October 11, 2010

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

Page 10: One Report, Two Data Sources Reporting from Unidata and SQL Server in a single report PRESENTER: Jared Carter| jcarter@tesc.edu | October 11, 2010

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>>

Page 11: One Report, Two Data Sources Reporting from Unidata and SQL Server in a single report PRESENTER: Jared Carter| jcarter@tesc.edu | October 11, 2010

Map Datasource Tables

Page 12: One Report, Two Data Sources Reporting from Unidata and SQL Server in a single report PRESENTER: Jared Carter| jcarter@tesc.edu | October 11, 2010

Add Properties to your Tables

Page 13: One Report, Two Data Sources Reporting from Unidata and SQL Server in a single report PRESENTER: Jared Carter| jcarter@tesc.edu | October 11, 2010

Add Links to your Tables

Page 14: One Report, Two Data Sources Reporting from Unidata and SQL Server in a single report PRESENTER: Jared Carter| jcarter@tesc.edu | October 11, 2010

Add details for Remote Link

Page 15: One Report, Two Data Sources Reporting from Unidata and SQL Server in a single report PRESENTER: Jared Carter| jcarter@tesc.edu | October 11, 2010

Create Informer Report

Page 16: One Report, Two Data Sources Reporting from Unidata and SQL Server in a single report PRESENTER: Jared Carter| jcarter@tesc.edu | October 11, 2010

Add selection criteria

Page 17: One Report, Two Data Sources Reporting from Unidata and SQL Server in a single report PRESENTER: Jared Carter| jcarter@tesc.edu | October 11, 2010

Add Fields

Page 18: One Report, Two Data Sources Reporting from Unidata and SQL Server in a single report PRESENTER: Jared Carter| jcarter@tesc.edu | October 11, 2010

Add Fields

Sample Report

Page 19: One Report, Two Data Sources Reporting from Unidata and SQL Server in a single report PRESENTER: Jared Carter| jcarter@tesc.edu | October 11, 2010

What’s Next?• More reports!• More data sources!

Page 20: One Report, Two Data Sources Reporting from Unidata and SQL Server in a single report PRESENTER: Jared Carter| jcarter@tesc.edu | October 11, 2010

Thank you! Any questions?

Page 21: One Report, Two Data Sources Reporting from Unidata and SQL Server in a single report PRESENTER: Jared Carter| jcarter@tesc.edu | October 11, 2010

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;