Create & Run Reports

Run a Default Report on an event, room, or resource, or, with a little knowledge of HTML and CSS, use a Default Report to create your own Custom Report.

Select Run a Report on the left sidebar on any page in the application to run or create a report based on the information on the main page.

Run a Report

Once you choose Run a Report, you can choose information to get a Default Report or choose edit reports to create a Custom Report.

Report Details
  1. Choose the dates you'd like to run the report by selecting a start date and end date.
  2. Look through the types of reports from the dropdown. Each report will list their description when chosen.
  3. Export the report on a PDF or Web Page.
  4. Show only events that aren't fully approved, or check to add room setup diagrams at the end of the report.

Choose run report to access the report.

Preview of a Default Report

Create a Custom Report

Once you select edit reports, choose a Default Report as your starting point for any custom report by selecting New.

Default Reports List

Default Reports cannot be deleted.

Give your report a name as well as a description then use the code to get the information you'd like on your report. The code can help you gain a better understanding of how reports work and identify patterns and techniques you can implement in your own report.

New Report
Coding Information

Custom report creation:

When writing liquid templates, use tags and objects.

Output markup is enclosed in pairs of curly brackets:

{{ Output markup goes here }}

Tag markup is enclosed in curly brackets and percent signs:

{% Tag markup goes here %}

Output objects allow you to access data stored in the database and display dynamic content. Output markup can produce text that will be displayed in the report. Below, we have listed all the variables that PCO has made available for you to use in your Resources reports.

Tag markup allow you to write programming logic that tells the template what to do. Unlike output markup, it cannot produce text. There are a number of tags that can be used but the most common ones in reports are if and for.

If/else statements tells the report to only do something if a certain condition is met. For example:

{% if person.name == “Jake” %}
    Hi Jake.
{% else %}
    Your name is not Jake!
{% endif %}

For more information about if/else statements, see the Liquid documentation here.

In many cases you’ll want to iterate through a collection of objects such as events, rooms, resources, or days. With liquid, the best way to do this is with a for loop. The syntax is {% for item in collection %}. For example, to loop through the resources and display the name, you’d do:

{% for resource in resources %}
    {{ resource.name }}
{% endfor %}

For more information about for loops, see the Liquid documentation here. Liquid has a number of filters which allow you to modify text, numbers or dates. You can read more about the Liquid filters here.

Template code documentation:

Collections

Generally, when writing a report, you’ll start with one of these collections and loop through the elements of the collection to display more information information about the events, rooms, or resources.

       {{ days }} - A collection of the days within your report’s date range.

       {{ events }} - A collection of events within your report.

       {{ resources }} - A collection of the resources within your report.

       {{ rooms }} - A collection of the rooms within your report.

Report Variables

These variables will give you information that describes the report itself.

       {{ report.title }} - The title of your report (its name in the report list).

       {{ report.start_date }} - The start date of your report (Format: MM/DD/YYYY).

       {{ report.end_date }} - The end date of your report (Format: MM/DD/YYYY).

       {{ report.scope }} - The name of the object or location from where the report was created.

       {{ report.stylesheet_href }} - The url of the reports CSS stylesheet.

Report Days

Report days are the individual elements in the {{ days }} collection.

       {{ day.date }} - The date of the report day (Format: YYYY-MM-DD). You can use a date filter to format this to your needs, i.e. {{day.date | date: '%A, %B %-d, %Y'}}

       {{ day.instances }} - A collection of the event instances occurring that day. This is useful when creating a report by date. You can loop through the {{ days }} variable with {{ for day in days }}. Then you can loop through the events on a given day with  {{ for instance in day.instances }}.

Events

Every event has its own properties as well as instances, reservations, and event times. Event instances represent the individual times that an event occurs whereas reservations correspond to reservation blocks. The event times collection contains the time blocks from the event schedule.

       {{ event.name }} - The name of the event.

       {{ event.instances }} - A collection of the event instances.

       {{ event.approval_status }} - The approval status of the event.

       {{ event.details }} - The description of the event (maximum of 255 characters).

       {{ event.owner}} - The person who owns the event. To get the name, use {{ event.owner.name }}.

       {{ instance.to_s }} - A readable title for the event instance. Example: Thursday, October 16, 2014 from 8:00am to 5:30pm.

       {{ instance.event }} - The event to which the event instance belongs.

       {{ instance.starts_at }} - The starting date and time of the event instance.

       {{ instance.ends_at }} - The ending date and time of the event instance.

       {{ instance.event_times }} - A collection of event times for the instance. These event times are the blocks that make up the event schedule.  

       {{ instance.reservation }} - The reservation block to which the event instance belongs.

       {{ reservation.name }} - The name of the reservation block.

       {{ reservation.primary_room_request }} - The primary room request for the reservation block.

       {{ reservation.room_requests }} - A collection of the reservation block’s room requests.

       {{ reservation.resource_requests }} - A collection of the reservation block’s resource requests.

       {{ reservation.simple_room_requests }} - A collection of the reservation block’s simple room requests. A request is considered simple if there are no room setups, answered questions, or associated resource requests.

       {{ reservation.complex_room_requests }} - A collection of the reservation block’s complex room requests. This collection does not include simple room requests.

       {{ reservation.simple_resource_requests }} - A collection of the reservation block’s simple resource requests.

       {{ reservation.complex_resource__requests }} - A collection of the reservation block’s complex resource requests. This collection does not include simple resource requests.

       {{ event_time.name }} - The name of the time block on the event schedule.

       {{ event_time.starts_at }} - The starting time of the event time.

       {{ event_time.ends_at }} - The ending time of the event time.

Resources and Rooms

All of the methods that work on resources and resource requests will also work on rooms and room requests. Once a resource or room request has been made, a booking exists which connects the resource to an event instance.

       {{ room.name }} - The name of the room.

       {{ resource.name }} - The name of the resource.

       {{ room.bookings }} - A collection of the resource bookings for the given room.

       {{ resource.bookings }} - A collection of the resource bookings for the given resource.

       {{ booking.quantity }} - The quantity requested by the booking

       {{ booking.approval_status }} - The approval status of the room or resource booking

       {{ booking.starts_at }} - The starting date and time of the booking.

       {{ booking.ends_at }} - The ending date and time of the booking.

        {{ booking.reservation.name }} - The name of the reservation block label for which the room or resource has been booked.

       {{ booking.event }} - The event with which the room or resource booking is associated. This is useful for displaying information about the related event. For example, to display the name of the event with which the booking is associated, you can use {{ booking.event.name }}

Resource Requests

To connect a room or resource with an event, a room or resource request must be made. These variables allow you to add information about these requests into your report.

       {{ resource_request.resource }} - The resource requested by the event resource request.

       {{ resource_request.quantity }} - The number of resources requested by the event resource request.

       {{ resource_request.approval_status }} - The approval status for the request.

       {{ resource_request.simple? }} Returns true if there are no room setups, no answers, and no resource requests associated with the event resource request.

       {{ resource_request.resource_requests }} - A collection of dependent event resource requests.

       {{ resource_request.simple_resource_requests }} - A collection of the simple dependent resource requests.

       {{ resource_request.complex_resource_requests }} - A collection of the complex dependent resource requests.

       {{ resource_request.answers }} A collection of the answers associated with the resources requested by the event resource request.

       {{ room_request.room }} - The room requested by the event resource request.

       {{ room_request.approval_status }} - The approval status for the request.

       {{ event_resource_request.room_setup }} - The room setup for the request.

       {{ event_resource_request.room_setup_information }} - Special information about the room setup specific to the resource request.

       {{ room_request.answers }} - A collection of the answers associated with the resources requested by the event resource request.

Request answers

When a room our resource has questions attached to it, these questions and answers are stored as request answers. In resource reports, to display questions and answers, you loop through the request answers {{ for qa in request_answers }} and display both the question {{ qa.question }} and answer {{ qa.answer }}.

       {{ request_answer.question }} - The question to which the answer belongs.

       {{ request_answer.answer }} - The answer to the question.

       {{ request_answer.section_header? }} - Returns true if the question is in fact a section header.

       {{ request_answer.label }} - The text for the section header if section_header? is true. This allows for readable report headers.

Room Setups

       {{ room_setup.name }} - The name of the room setup.

       {{ room_setup.description }} - The description of the room setup.

People

       {{ person.name }} - The name of the person.

       {{ current_user.name }} The name of the current user

       {{ current_user.owned_events }} The events that the current user is the owner

 

CSS documentation (styling your custom report):

We have a number of styles built to help your reports be aesthetically appealing. Feel free to experiment on your custom reports to see what works.

You can style elements using the following classes. For example, if you wanted a large header with a grey background and a gutter, you could use:

<div class=”block header-large gutter-bottom-medium”>This is a header!</div>

You can also add your own inline CSS styles for further customization.

If you would like to learn more about working with CSS, check out the second half of Codecademey’s Web Fundamentals course: http://www.codecademy.com/tracks/web

Classes

Below is a list of classes included in the stylesheet which can be linked to with {{ report.stylesheet_href }}. Our default reports link to this stylesheet so the reference will already be in the <head> when you start a new report.

       .bg-soft - Sets the sets the background to a light grey color and pads the text. This is commonly used for section headers.

       .block - Adds a grey left border and increases the left margin. This is useful for visually grouping related elements.

       .container-naked - Adds a light grey border around the element.

       .container-soft - Sets the background color to light grey.

       .container-hard - Sets the background color to dark grey

       .date-header - Sets the background to grey. Makes the font bold and slightly larger.

       .divider - Creates a solid grey bar. Useful to create a visual break between elements.

       .divider-soft - Creates a dotted light grey bar.

       .gutter-top-small - Adds a small margin to the top of the element.

       .gutter-top-medium - Adds a medium margin to the top of the element.

       .gutter-bottom-small - Adds a small margin to the bottom of the element.

       .gutter-bottom-medium - Adds a medium margin to the bottom of the element.

       .header-small, .header-medium, .header-large, .header-jumbo - Creates headers of different sizes. Makes the text bold.

       .header-caps - Makes all letters capital.

       .item-title, .item-sub-title - Capitalizes the first letter of every word.

       .item--inline, .sub-item--inline - Displays the item or sub-item as an inline block.

       .level-2, .level-3, .level-4 - Adds padding to the left of the element. This is useful for visually grouping elements. For example:

<div class="level-1">
    This is at the top level.
        <div class="level-2">
            This will have some padding on the left.
                <div class="level-3">
                    This will have more padding on the left than the level-2 element.
                </div>
        </div>
</div>

       .pad-left - Adds padding to the left.

       .pad-left-small - Adds a smaller amount of padding to the left.

       .pad-right - Adds padding to the right.

       .pad-right-small - Adds a smaller amount of padding to the right.

       .status - Creates a rounded box around the element.

       .status .Approved - The box is green.

       .status .Pending - The box is orange.

       .status .Rejected - The box is red.

               This class is commonly used with an approval status object. For example:

                <span class=”status {{ obj.approval_status }}”>{{ obj.approval_status }}</span>

       .txt-strong - Makes text bold.

       .txt-center - Centers text.

       .txt-left - Left-aligns text.

       .txt-underline - Underlines text.

       .soft - Colors text light grey.

       .blue - Colors text blue.

       .green - Colors text green.

       .warning - Colors text orange.

       .red - Colors the text red.

Have more questions? Submit a request