In this article
Tips for handling Studio editor errors and exporting raw survey data, including permissions and linking the end user list to the data hub.
Compiler and Runtime Errors
While you work in the Studio editor, any changes you make are saved after a few seconds. Studio checks the saved code continuously to ensure it does not contain errors, and if it notices anything unexpected it will present error messages to tell you that something is wrong. The error messages are displayed in red across the bottom of the CDL Editor panel.
Note
To reduce distraction while you are typing the code, compiler errors are suppressed in the line you are currently typing in and the new code will be assessed once you move out of that line. However the code you are currently writing may create discrepancies elsewhere in the report. For example, typing a { character into a line will mean that a corresponding } character is required at some point later in the report.
The general classes of error messages that may be presented are:
Compiler errors
A compiler error occurs when the CDL syntax is incorrect, for example a required field is missing or there is a typing error in the code. The compiler for Studio reports "knows" what to expect inside each block of the code, so if it encounters something unexpected it will notify you with an error message presented at the bottom of the CDL Editor panel. Click the up-arrow in the message to open the message. Information about the error is then presented along with a very useful Go to link. The error message will normally contain enough information so you can understand the reason for the error, and how to rectify it.
Runtime Errors
When a Runtime error is presented, it usually means that something went wrong with the data request.
In each case, the first information provided is the actual location of the error, given as [row,position], in this case row 5 position 17. This is followed by examples of what should be at that location, then finally what has actually be found there, in this case the = character.
When you click Go to line, the CDL Editor panel moves to show the line in which the error is located. In addition, the row is highlighted and the error location is underlined.
Sometimes a compiler error will be presented that lacks complete information.
For example:
Expected "/*", "//", "config", "import", [\n\r;], application, end of input, identifier, title, use, or whitespace but "}" found.
In this case it appears there is a problem with brackets; the compiler found a "}" character where there shouldn’t be one. This could for example indicate that you are missing an opening bracket {, or you have too many closing brackets } in total.
Tip: Good practice (that may save your sanity) is to indent the code. This makes the code look neater, and it is much easier to spot if something is out of place. To do this, right-click in the CDL Editor and select Format Document from the drop-down menu, or press the Shift+Alt+F keys on your keyboard.
Exporting Raw Survey Data Errors
The most common causes of problems with raw survey data exports, and their solutions, are described here.
If while exporting the raw survey data, an end-user gets the error Survey Data Export: Forbidden, this indicates that the user does not have the necessary permission to export raw data.
The following requirements must be fulfilled for an end user to be able to export raw survey data:
The exported survey must be included in the hub registered in the config hub {} block in the report CDL.
The corresponding end-user list must contain the corresponding hub id in its properties.
Template Issue
If you are not able to export raw survey data that has been filtered by the data template, check that the template includes at least one variable from the response level. The raw survey data export does not accept respondent-only templates.
Widgets Present No Data for End Users
If the end user can access your report but the widgets do not present any data, check that the end user list is linked to the same hub that is providing the data for the report. If this is not linked correctly then even though the end user can access the report, no data will be displayed in the widgets.