Creating Custom Reports
Relevance to UDSv4
Custom reports in REDCap allow a REDCap user to select specific fields (rather than all fields in the project) to view and/or export. A user can limit the results included in the report to specific fields, records, or events using filtering tools. This is helpful because many times a center will add additional fields/forms to the project for internal purposes that don't need to be submitted to NACC. The Data Manager could create a custom report omitting their Center-specific fields.
Implementation for UDSv4
All UDSv4 data is contained in the event named Visit Data. Centers can also add custom forms to the same event, if they wish. This document will show you how to create a report that only renders the UDSv4 data and omits any data that is not contained in the UDSv4 forms. Reports may be helpful for analysis, quality control, or NACC submissions.
Best practices
Public reports
Some REDCap installations offer the ability to make a report 'public'. This means a project user can share the report url with others. It is highly recommended that this feature is not used for UDS data, due to the sensitivity of the data.
Instructional Video Guide
This video, provided by the REDCap Consortium, explains how Data Exports, Reports & Stats work in REDCap:
The video was made several years ago so some of the user interface may look different now, but the functionality remains. The demonstration of creating a custom report starts ~ the 2:30 mark.
Step-By-Step Guide for creating a custom report
The following example will demonstrate how to create a report that will provide you with the UDSv4 data that should be submitted to NACC. However, you can create any number of custom reports to pull other data from your UDSv4 project.
-
In the Applications section of the left-hand navigation bar, click on 'Data Exports, Reports & Stats'.
-
In section B of the reports, click on 'Make custom selections':
-
Click on each instrument in the list that is a UDSv4 instrument. Do not click on any custom instrument names. You do not need to hold down the shift key -- REDCap will keep any selections you make. To un-select an instrument, simply click on the instrument name again.
In the Events box, select only
Vis
, which contains the UDSv4 visit data.When you are done selecting all the UDSv4 instruments, click the 'Create report' button.
-
You can name your report anything you like. There is a 60 count character limit (with spaces). For our example, we will name it Records Ready for Flywheel Upload:
-
Under Step 1, if you wish, you can select who in the project has viewing and editing permissions:
-
Under Step 2, you'll see a long list of fields that will be included in the report. Note the red
❌
on the far right. You can click the❌
to remove any fields you don't want included in the report. You may also use the '+Quick Add' to select additional variables for the report.For UDSv4 data submission to NACC:
-
This report should include all UDSv4 variables that need to be submitted to NACC.
-
Any local variables (variables that have the prefix
loc_
) or checkbox variables present in the instruments should not be included in the report.
-
-
At the bottom of Step 2 is an Additional report options section. Tick the box for 'Include the repeating instance fields'. This is necessary since the UDSv4 project has repeating events.
-
In Step 3, a box is ticked to 'Show data for all events or repeating instruments/events for each record returned.' Un-tick that box.
-
In Step 3, you can apply a filter to limit which records appear in the report. In this example, we have a field in the project which indicates if the record is ready to be submitted to NACC and we've set the answer to 'yes'. This means that any record that has that field marked as 'yes' will appear in the report.
Additionally, you can mark which events the data should be pulled from. Since we are only wanting UDSv4 data which only exists in the Vis event, we select 'Vis' from the drop-down menu.
-
You may use advanced logic (Boolean logic) to limit records rather than selecting fields from the drop-down lists. Below is an example of filtering by PTID.
-
Under Step 4, you can sort the order in which the records appear. The drop-down list will give you all the variables in the project and you can choose any of them to sort by. You can apply sub-sorting by selecting variables from the drop-down lists in the subsequent rows.
If your custom report is for exporting data to NACC, leave the sort order as it is defaulted with the Record ID.
-
Click the 'save report' button.
-
Your report is now available for viewing or you may return to the main reports page or continue editing the report:
Once created, the report is bookmarked on the left-hand navigation bar in the Reports section:
With the report bookmarked, you can be working in any place in the REDCap project and be able to quickly click on the link to bring up the report.
Step-By-Step Guide for other custom reports
-
In the Applications section of the left-hand navigation bar, click on 'Data Exports, Reports & Stats'.
-
In your workspace on the right-hand side of the screen, you will see a tab 'Create New Report' and a 'create new report' button -- click on either one of those.
-
Enter a name for the report. You can optionally enter in a description or instructions in the description section.
As noted in the Best Practices section, it is advisable to NOT make the report public.
-
Under Step 1, if you wish, you can select who in the project has viewing and editing permissions:
This feature will only be available to users on the project who have "Add/Edit/Organize Reports' privileges. Multiple users might want to use a report in different ways and might choose to change some of the fields, filters or sorting options. This setting will allow you to restrict other users' ability to make those changes.
Specify the fields to include in the report. You can do this several ways:
a. Click on the 'Quick Add' button to easily tick the fields you want to see in the report.
b. Use the 'Select Instrument' option to bring in all the fields for one instrument.
c. Click on the Field drop-down to select a field, one at a time, from a drop-down list of fields.
NOTEIf your list of fields is very long, it can be easier to find them by clicking within the box and typing the variable name or field label. An autocomplete dropdown is available to easily select the field.
Specify a filter for the records (optional)
You can apply filters by selecting the relevant fields and specifying an operator (e.g. "equals") and a value to match. For complex expressions involving functions or requiring parentheses, click 'Use advanced logic' to write your filter expression.
By applying logic, you are limiting the results returned in the report. For instance, if you only want to see the results for participants who have delusions, you could use question 2a Delusions and set it to 'yes'. That would omit any records that didn't have that question marked 'yes'.
Here is how the report would render:
Note that the number of results returned is '6'. That's because out of the 7 visits across all participants in the project, 6 of them indicate the participant is having delusions.
Live filters dynamically filter data as it appears on the screen in real time. Only choice fields (yes/no, true/false, multiple choice radio button or drop-down) and the record ID field can be used as Live Filters. To apply a live filter, you can select it from the list of choices. You can add up to 3 live filters per report.
In this example, we're applying a live filter for the participant's living situation. When you first view the report (with no live filters), you would see participants who have delusions. If you wanted to know how many participants who have delusions live alone, you could click on the live filter and select 'live alone'.
You would then be looking at a sub-set of your data: participants with delusions who live alone.
Note that the field
livsitua
is not in form B5. You can use any field in the project, regardless of where it is located, as a live filter in a report. -
Specify up to three of the report fields by which the records will be sorted. By default, the report will sort by record ID, but you can sort by any other field in the project. If you were looking at the results for one participant, it might make sense to sort by the visit date.
-
Click Save Report. You will be asked if you wish to View the Report, Return to My Reports & Exports or Continue Editing report. Once you click View Report, your report will be added to your report list on the left-hand navigation bar. Once it is on the left-hand navigation bar, a project user can quickly access it from any page in the project.
Additional Resources/Tips
Labels vs variables in reports
For viewing the data within REDCap, the tables can look a little 'cleaner' by selecting the option to only view the label for both the header and choices fields. That option can be found in step 2 of building the report:
With the default setting, a report would look like this -- note the choice number in parentheses in the NPI Co-participant column:
With the label display option applied, the report now looks like this:
Note that the raw variable name does not display in the header row and the choice values do not appear in the table.