37
Copyright © 2006, Infinite Campus, Inc. All rights reserved. Ad Hoc Reporting with Pass-Through SQL

Copyright © 2006, Infinite Campus, Inc. All rights reserved. Ad Hoc Reporting with Pass-Through SQL

Embed Size (px)

Citation preview

Page 1: Copyright © 2006, Infinite Campus, Inc. All rights reserved. Ad Hoc Reporting with Pass-Through SQL

Copyright © 2006, Infinite Campus, Inc. All rights reserved.

Ad Hoc Reporting with Pass-Through SQL

Page 2: Copyright © 2006, Infinite Campus, Inc. All rights reserved. Ad Hoc Reporting with Pass-Through SQL

Copyright © 2007, Infinite Campus, Inc. All rights reserved.

Agenda

1. Objectives

2. Ad Hoc Reporting

3. Tips and Tricks

4. Finding Information

Page 3: Copyright © 2006, Infinite Campus, Inc. All rights reserved. Ad Hoc Reporting with Pass-Through SQL

Copyright © 2007, Infinite Campus, Inc. All rights reserved.

Objectives

1. Learn about the three types of filters that can be created in Filter Designer and how to choose the best one for a given task

2. Understand the data types available and how filter options can assist you in searching for information

3. Learn how to design a Custom Form Letter, containing Data Elements, in the Report Designer

4. Combine an Ad Hoc filter and a Custom Form Letter in Report Builder

5. Learn what the Data Export tool is used for

Page 4: Copyright © 2006, Infinite Campus, Inc. All rights reserved. Ad Hoc Reporting with Pass-Through SQL

Copyright © 2007, Infinite Campus, Inc. All rights reserved.

Ad Hoc Reporting Module

The Ad Hoc Reporting Module has five parts.We will review the first four.

(Cube Designer is an advanced feature that isdiscussed in another session.)

• The Filter Designer is used to select data from Campus

• The Report Designer is used to create custom reports (form letters)

• The Report Builder allows you to join Filters with Reports

• The Data Export Tool is used to export data from saved Filters

Page 5: Copyright © 2006, Infinite Campus, Inc. All rights reserved. Ad Hoc Reporting with Pass-Through SQL

Copyright © 2007, Infinite Campus, Inc. All rights reserved.

Filter Designer The Filter Designer

provides three ways to filter data Query Wizard Selection Editor Pass-through

SQL Query There are three types

of data from which the user can select Student Census/Staff (person) Course/Section (curriculum)

Page 6: Copyright © 2006, Infinite Campus, Inc. All rights reserved. Ad Hoc Reporting with Pass-Through SQL

Copyright © 2007, Infinite Campus, Inc. All rights reserved.

Filter Designer – Query Wizard

The Query Wizard allows a user to generate dynamic custom searches on any of the three data types.

Page 7: Copyright © 2006, Infinite Campus, Inc. All rights reserved. Ad Hoc Reporting with Pass-Through SQL

Copyright © 2007, Infinite Campus, Inc. All rights reserved.

Query Wizard Fields

The Query Name should be descriptive.

Select all of the fields that will be used as filter criteria or that you would like displayed on the output.

Fields in the blue list on the left expand, making thousands of possible filter combinations.

Page 8: Copyright © 2006, Infinite Campus, Inc. All rights reserved. Ad Hoc Reporting with Pass-Through SQL

Copyright © 2007, Infinite Campus, Inc. All rights reserved.

Finding your Fields

TO FIND: LOOK IN:

Transcript information Learner Portfolio > Transcript Detail

Student enrollment and schedules

Learner > Schedule

Medical flags Learner > Programs

Special Ed status Learner > Active Enrollment > Special Ed elements OR Learner > Enrollment History > Special Ed elements

Person GUID or Guardian information

Census > Contact Summary

Page 9: Copyright © 2006, Infinite Campus, Inc. All rights reserved. Ad Hoc Reporting with Pass-Through SQL

Copyright © 2007, Infinite Campus, Inc. All rights reserved.

Query Wizard Filter OptionsThe Query Wizard uses of Filter Options to narrow your search:

Equal or Not Equal (=, <>)

IN, NOT IN

LIKE

SOUNDS LIKE

IS NULL, IS NOT NULL

For numeric values:

>, >=, <, <=

For dates:

IS TODAY, IS YESTERDAY

• Use the Organized To field to save the filter for your own use or share it with other User Groups you belong to.

• Use the Help tab while in the Wizard for a description of each option.

Page 10: Copyright © 2006, Infinite Campus, Inc. All rights reserved. Ad Hoc Reporting with Pass-Through SQL

Copyright © 2007, Infinite Campus, Inc. All rights reserved.

Filter Option Examples

1. Filter students in grade 9 or 12IN – using commas (no space) student.grade IN 09,12

2. Filter on students with a last name that Sounds Like - as. (Filter could return az, as, aas)student.lastName SOUNDS LIKE as

3. Find students that do not have certain information entered into Campus. (i.e. birthdates, race ethnicity, middle name ) Is Null

student.birthdate IS NULL

4. Find people who have unwanted information entered into Campus. Is Not Nullstudent.ssn IS NOT NULL

Page 11: Copyright © 2006, Infinite Campus, Inc. All rights reserved. Ad Hoc Reporting with Pass-Through SQL

Copyright © 2007, Infinite Campus, Inc. All rights reserved.

The LIKE Option Uses Wildcards% matches a string of zero or more characters

student.lastName LIKE Mc% will find all names that begins with “Mc”

student.lastName LIKE %en% will find all names that includes the letters “en” (Bennet, Green, McBadden)

_ matches one characterstudent.lastName LIKE Anders_n will find “Anderson” and “Andersen” but not “Andersohn”

[ ] matches each single character enclosed in the bracketsstudent.lastName LIKE [ABCD]% will find every name beginning with A, B, C or D

student.lastName LIKE [CKL]ars[eo]n will find “Carsen”, “Karsen”, “Larsen”, “Carson”, “Karson” and “Larson”

^ when used with square brackets, it means NOTstudent.lastName LIKE M[^c]% will find all names beginning with M that do not have c as the second letter

Page 12: Copyright © 2006, Infinite Campus, Inc. All rights reserved. Ad Hoc Reporting with Pass-Through SQL

Copyright © 2007, Infinite Campus, Inc. All rights reserved.

Query Wizard Output

Output can be pasted into a spreadsheet for further manipulation or printed as is.

Click on the Test button to see the results of your Query:

Page 13: Copyright © 2006, Infinite Campus, Inc. All rights reserved. Ad Hoc Reporting with Pass-Through SQL

Copyright © 2007, Infinite Campus, Inc. All rights reserved.

Filter Designer – Selection Editor

The Selection Editor creates a static list of individually selected Students.

Page 14: Copyright © 2006, Infinite Campus, Inc. All rights reserved. Ad Hoc Reporting with Pass-Through SQL

Copyright © 2007, Infinite Campus, Inc. All rights reserved.

Selection Editor

Students are chosen from a list of all students in the selected Calendar.

Since the list is static, any changes must be made manually.

Page 15: Copyright © 2006, Infinite Campus, Inc. All rights reserved. Ad Hoc Reporting with Pass-Through SQL

Copyright © 2007, Infinite Campus, Inc. All rights reserved.

Filter Designer – Pass-through SQL Query

A Structured Query Language pass-through filter can be created on any data type.

To use this filter type you need knowledge of the Campus database schema and SQL, a database programming language.

Page 16: Copyright © 2006, Infinite Campus, Inc. All rights reserved. Ad Hoc Reporting with Pass-Through SQL

Copyright © 2007, Infinite Campus, Inc. All rights reserved.

SQL Query Editor

Creates a SQL SELECT statement Returns only these fields:

lastName, firstName, grade, studentNumber

Page 17: Copyright © 2006, Infinite Campus, Inc. All rights reserved. Ad Hoc Reporting with Pass-Through SQL

Copyright © 2007, Infinite Campus, Inc. All rights reserved.

SQL Syntax SELECT

A list of the Fields that will be returned FROM (A)

A list of the database Tables or Views the Fields come from and how they are related to each other

WHERE (B) Conditions that must be met for data to be returned

Example: Students with enrollment dates outside of their Calendar:SELECT DISTINCT student.personIDFROM studentINNER JOIN Calendar c ON c.calendarID = student.calendarIDWHERE student.calendarID = <selected Calendar>AND (student.startDate <= c.startDateOR (student.endDate >= c.endDate OR student.endDate IS NULL))

Page 18: Copyright © 2006, Infinite Campus, Inc. All rights reserved. Ad Hoc Reporting with Pass-Through SQL

Copyright © 2007, Infinite Campus, Inc. All rights reserved.

Joins INNER JOIN (fields must match in both tables)

Students with bad end dates:SELECT DISTINCT student.personIDFROM studentINNER JOIN Calendar c ON

c.calendarID = student.calendarIDWHERE student.calendarID = 46AND student.endDate > c.endDate

LEFT OUTER JOIN (all fields in first table even if there is no matching field in the second table) Students without Guardians:SELECT DISTINCT student.personIDFROM studentLEFT OUTER JOIN v_CensusContact Summary v ON v.personID =

student.personID AND v.guardian = 1WHERE student.calendarID = 46AND v.personID IS NULL

X

X X

X X

X

X

X

XX

X X

X

X

X X

X X

X

X

X

XX

X X

X

Student Calendar

Student v_CensusContactSummary

Page 19: Copyright © 2006, Infinite Campus, Inc. All rights reserved. Ad Hoc Reporting with Pass-Through SQL

Copyright © 2007, Infinite Campus, Inc. All rights reserved.

SQL Query Examples

Students in 12th Grade with less than 20 credits.

A: INNER JOIN v_transcriptdetail v ON v.personID = student.personID

B: AND student.grade = '12'

GROUP BY student.personID,

student.lastName, student.firstName,

student.grade, student.studentNumber

HAVING(SUM(v.creditsearned)) <20

Page 20: Copyright © 2006, Infinite Campus, Inc. All rights reserved. Ad Hoc Reporting with Pass-Through SQL

Copyright © 2007, Infinite Campus, Inc. All rights reserved.

SQL Query Examples

Birthdates in a specific rangeA: NothingB: AND student.birthDate BETWEEN '5/1/1991' AND '5/31/1991‘

Birthdays in a monthA: NothingB: AND month(student.birthDate)=’02’

Courses without a certain taskA: INNER JOIN gradingtaskcredit gtc ON gtc.courseID =

course.courseID AND gtc.calendarID = course.calendarIDB: AND gtc.taskID <> 56

Page 21: Copyright © 2006, Infinite Campus, Inc. All rights reserved. Ad Hoc Reporting with Pass-Through SQL

Copyright © 2007, Infinite Campus, Inc. All rights reserved.

SQL Query Examples

Requested Course that students did not getA: INNER JOIN request r ON r.personID = student.personID AND r.calendarID

= student.calendarIDINNER JOIN course c ON c.courseID = r.courseID and c.number ='0355‘INNER JOIN [section] s ON s.courseID = c.courseIDLEFT OUTER JOIN roster ro ON ro.personID = r.personID AND ro.sectionID = s.sectionID

B: AND ro.personID IS NULL

Page 22: Copyright © 2006, Infinite Campus, Inc. All rights reserved. Ad Hoc Reporting with Pass-Through SQL

Copyright © 2007, Infinite Campus, Inc. All rights reserved.

Why use Pass-through Queries when I have the Query Wizard?

Allows you to search for data in a more customized way

Allows you to search on Tables, Views and Fields not available in the Query Wizard Fields list

Allows you to use SQL operators such as BETWEEN for birthdates, or SQL functions such as or HAVING(COUNT()) to count a student’s credits

Page 23: Copyright © 2006, Infinite Campus, Inc. All rights reserved. Ad Hoc Reporting with Pass-Through SQL

Copyright © 2007, Infinite Campus, Inc. All rights reserved.

Report Designer

Report Designer allows districts to create their own custom reports or letters using a WYSIWYG editor.

Once the reports have been saved, users can use the Report Builder to generate the printed version of the report.

Page 24: Copyright © 2006, Infinite Campus, Inc. All rights reserved. Ad Hoc Reporting with Pass-Through SQL

Copyright © 2007, Infinite Campus, Inc. All rights reserved.

A Custom Report

Type the layout of the report in the text field, adding Campus Fields and Sub-Reports where needed.

Letters can be shared with other users by choosing a group in Organized To.

Page 25: Copyright © 2006, Infinite Campus, Inc. All rights reserved. Ad Hoc Reporting with Pass-Through SQL

Copyright © 2007, Infinite Campus, Inc. All rights reserved.

Report Builder

Filters and Reports are joined together in the Report Builder.

If you wish to use more than one Filter, you can choose Union or Intersection in the Set Operation field.

X

X X

X XX

X

X

XX

X X

XX

X X

X XX

X

X

XX

X X

X

Union (all Dodgeball Team members and all 10th grade boys)

Intersection (Dodgeball Team members who are also 10th grade boys)

Page 26: Copyright © 2006, Infinite Campus, Inc. All rights reserved. Ad Hoc Reporting with Pass-Through SQL

Copyright © 2007, Infinite Campus, Inc. All rights reserved.

Building a Report

The Campus Fields will populate with the desired information.

The letters can then be printed and distributed.

Page 27: Copyright © 2006, Infinite Campus, Inc. All rights reserved. Ad Hoc Reporting with Pass-Through SQL

Copyright © 2007, Infinite Campus, Inc. All rights reserved.

Data Export The Data Export tool is used to export data from filters that were

created with the Query Wizard in several formats. HTML opens a browser pop-up window

XML is a Web language used by computer programs

Comma Separated Values and Tab delimited Values can be used in a program such as Excel

PDF report can be saved and printed, but not edited

Page 28: Copyright © 2006, Infinite Campus, Inc. All rights reserved. Ad Hoc Reporting with Pass-Through SQL

Copyright © 2007, Infinite Campus, Inc. All rights reserved.

More Uses for Ad Hoc Filters

Mailing LabelsCensus > Reports > Mailing Labels

Ad Hoc Filter dropdown list will contain all your saved filters

Other reportsSimilar to Mailing Labels

Advanced SearchSearch tab

Search for a Student

Advanced Search >>

Select a Saved Filter from the list and click the Search button

Page 29: Copyright © 2006, Infinite Campus, Inc. All rights reserved. Ad Hoc Reporting with Pass-Through SQL

Copyright © 2007, Infinite Campus, Inc. All rights reserved.

Tips In Query Wizard, deselect a Filter Option when you

remove a criteria from the right hand box Active students

student.activeToday = 1 (check box or Y/N values are recorded as 1 or 0)

Certain fields are stored as code numbers rather than descriptions. Look at Campus dropdown lists to determine how to search for your desired results.

Example: for non-White students, student.raceEthnicity <> 5

Page 30: Copyright © 2006, Infinite Campus, Inc. All rights reserved. Ad Hoc Reporting with Pass-Through SQL

Copyright © 2007, Infinite Campus, Inc. All rights reserved.

Activities – Attendance

Create a Daily Approximation filter to find all students who are absent today. Try yesterday too.

Filter on Ethnicity as well Decide on the type of Demographic,

Attendance, and Date filters to use.

Page 31: Copyright © 2006, Infinite Campus, Inc. All rights reserved. Ad Hoc Reporting with Pass-Through SQL

Copyright © 2007, Infinite Campus, Inc. All rights reserved.

Activities – Attendance

Hints Fields from Demographics: firstName,

lastName. Fields from Attendance>Daily Approx Detail:

Date. Filter on date IS YESTERDAY/IS TODAY.

Page 32: Copyright © 2006, Infinite Campus, Inc. All rights reserved. Ad Hoc Reporting with Pass-Through SQL

Copyright © 2007, Infinite Campus, Inc. All rights reserved.

Activities – Attendance

Create a filter that pulls 10th and 11th grade students with 15 or more period absences and 10 or more course absences.

Hint Students should be Active

Page 33: Copyright © 2006, Infinite Campus, Inc. All rights reserved. Ad Hoc Reporting with Pass-Through SQL

Copyright © 2007, Infinite Campus, Inc. All rights reserved.

Activities – Grades

Students with Ds & Fs this Term:Student > Demographics

student.lastName LIKE [ABCDEFG]% student.firstName student.middleName student.grade = 09

(whatever grade level you choose)

Page 34: Copyright © 2006, Infinite Campus, Inc. All rights reserved. Ad Hoc Reporting with Pass-Through SQL

Copyright © 2007, Infinite Campus, Inc. All rights reserved.

Activities – Grades

Students with Ds & Fs this Term – Cont:Student > Grading

grading.courseNumber grading.courseName grading.sectionNumber grading.teacherDisplayname grading.termName grading.task grading.score IN D-,D,D+,F

Page 35: Copyright © 2006, Infinite Campus, Inc. All rights reserved. Ad Hoc Reporting with Pass-Through SQL

Copyright © 2007, Infinite Campus, Inc. All rights reserved.

Activities – Grades

Find grade 10 female students whose last names begin with letters between F and M who took courses whose names begin with Wo or We who have a Term 2 GPA of 4.0.

Hint – The name ranges require wildcard entries L[ae]% finds names that start with La or Le LIKE [ABCDEFG]% Between A and G

Page 36: Copyright © 2006, Infinite Campus, Inc. All rights reserved. Ad Hoc Reporting with Pass-Through SQL

Copyright © 2007, Infinite Campus, Inc. All rights reserved.

Extra Activity

Create a filter that pulls absences for students < 16 years.

Hint – Students over 16 not needed

Page 37: Copyright © 2006, Infinite Campus, Inc. All rights reserved. Ad Hoc Reporting with Pass-Through SQL

Copyright © 2007, Infinite Campus, Inc. All rights reserved.

Questions

1. How would you design a filter in the Query Wizard that will allow us to search or build a report for all ethnic minorities?

2. How would you build the list of students in debate?

3. Name one way you could benefit from using the Ad Hoc Report module.