Adding Parameters to a Custom Report
Overview
Overview
Parameters for end-user input can be added to FiLMS Custom Reports. The way to specify a parameter in a custom report is to add a tag to the SQL like this: {Name:Type}
Name
Name
Name can be whatever you want, including spaces
Type
Type
DetailTypes:
- Number
- Text
- TrueFalse
- DateTime
Examples
Examples
Number
Number
WHERE e.curriculum_id = {CurriculumId:Number}
DateTime
DateTime
AND e.completed_at >= '{StartDate:DateTime}'
AND e.completed_at <= '{EndDate:DateTime}'
User information
Additionally, there is a special case for automatically pulling information about the current user. {__films_db__:Name}
Where Name is one of the following:
- users.organization_id
- users.id
- users.role_id
- users.login
- users.password
- users.password_hint
- users.name
- users.is_active
- users.inactive_at
- users.language_id
- users.role - The role's name
- users.language - the language's name
- users.organization - the organization's name
- users.<detail field name> - the value of the user detail field with the matching name