Summary
This article covers the generation of query PDF reports.
Table of Contents
- Required Permissions for the Query PDF Generation
- Customizing the Output
- Extended Customization of the Output
The application allows the generation of query PDF reports for either a single query (from the query details screen) or a large number of queries (from the query manager).
This document describes the query PDF feature that uses the PDF reports feature. There is an old mechanism that also created query PDFs with the help of PDF forms. That mechanism is not part of this documentation and it is expected that it will not be in use for a long time anymore.
A query PDF document is generated with the help of a PDF report definition. You can find the manual for PDF report definitions here.
Required Permissions for the Query PDF Generation
View query
When the role has access to view a Query they are allowed the generation of query PDFs in the (single) query details view, the screen permission "viewQuery" needs to be granted. This will add a link “Download PDF” to the page. Furthermore that screen permission automatically includes the permission to see the query details (viewQuery).
Query Manager
You can generate query PDF reports from the Query Manager, when the screen permission "viewQuery” and the action permission “getQueryPdf” is granted. With these permissions a number of queries can be marked in the manager and the action “Download PDF” can be applied to all of them. This means that one PDF report for all marked queries is generated.
Customizing the Output
The PDF report uses the report definition called “viewQueryPdf.pdfrep“. One common version is available for all trials. If the output should be customized, then you can create a modified "viewQueryPdf.pdfrep" document and upload it with the Trial Manager to any appropriate level whether it might be a sponsor or study level. Ask the project manager for a copy of the most current base report to customize. To successfully customize the query PDF reports you need to know the data fields for the query data providers and (first of all) you need to know the manual for PDF reports.
The Query Data Providers
The task of the system data provider for the PDF reporting is the providing of data in a map of field names according to the current context. You need to know the data fields to generate reports on the data.
Standard data provider "query"
This data provider retrieves basic query data. It does not add any question or query audit trail data. Thus it runs more efficiently than the versions that need to retrieve audit trail data. Here is a list of the data fields:
Field | Description |
appName | The name of the application. |
recordName | The label of the record. This is not the recordName as configured in the data architect file. That information is available as standard element within the PDF records. |
siteName | The name of the workgroup to which the tool belongs. |
toolName | The name of the tool. |
formName | The name of the form. |
formPath | The path to the form. |
question | The question text. |
displayID | The display ID of the query. |
status | The status of the query. |
value | The current value of the question. |
queryText | The query text. |
responseText | The querie’s response text. |
createEntity | The name of the user that has created the query. |
responseEntity | The name of the user that has responsed to the query. |
createDate | The date that the query was created. |
responseDate | The date where a response was given. |
queryObject | The internal query object. This is not meant to be used in PDF reports directly. It provides information to custom data providers. |
Standard data provider “queryQryAuditTrail"
When this data provider is used, the report-generating user needs to have “viewHistory” screen permissions.
This data provider retrieves basic query data combined with audit trail data for the query. It includes all fields of the query data provider plus this field:
Field | Description |
queryAudits | This field maps to a list of new information. Each list item offers new data field map. |
This is the list of data fields inside the "queryAudits" container:
Field | Description |
auditDate | The date of the audit event. |
auditText | The description of the audit event. |
auditEntity | The user that initiated the audit event. |
auditDescription | Any further information like the reason for change. |
Standard data provider “queryQstAuditTrail"
When this data provider is used, the report-generating user needs to have “viewAudit” screen permissions.
This data provider retrieves basic query data combined with audit trail data for the question. It includes all fields of the query data provider plus this field:
Field | Description |
questionObject | The internal question object. This is not meant to be used in PDF reports directly. It provides information to custom data providers. |
questionAudits | This field maps to a list of new information for all question audit events. Each list item offers new data field map. |
This is the list of data fields inside the "questionAudits" container:
Field | Description |
auditDate | This is the date of the question audit event. |
auditEntity | The is the user name that caused the audit event. |
currentValue | This is the value for the question after the audit event has completed. |
previousValue | This is the value for the question before the audit event has occurred. |
reasonForChange | This is the reason for change associated with the audit event. |
Standard data provider “queryQryQstAuditTrail"
This data provider retrieves basic query data combined with audit trail data for the query and the question.
It will include all fields that are available in the query data provider, the queryQryAuditTrail data provider and the queryQstAuditTrail data provider
Extended Customization of the Output
If you are still not able to create the report that you need, then the implementation of a custom data provider might be the solution. It can retrieve exactly the data that you need for your report . Ask your project manager for more information on this possibility.
Need more help?
Please visit the Fountayn Contact Information page.