Summary

This article covers the generation of query PDF reports.

Table of Contents


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 "viewQueryneeds 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:

FieldDescription
appNameThe name of the application.
recordNameThe 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.
siteNameThe name of the workgroup to which the tool belongs.
toolNameThe name of the tool.
formNameThe name of the form.
formPathThe path to the form.
questionThe question text.
displayIDThe display ID of the query.
statusThe status of the query.
valueThe current value of the question.
queryTextThe query text.
responseTextThe querie’s response text.
createEntityThe name of the user that has created the query.
responseEntityThe name of the user that has responsed to the query.
createDateThe date that the query was created.
responseDateThe date where a response was given.
queryObjectThe 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:

FieldDescription
queryAuditsThis 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:

FieldDescription
auditDateThe date of the audit event.
auditTextThe description of the audit event.
auditEntityThe user that initiated the audit event.
auditDescriptionAny 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:

FieldDescription
questionObjectThe internal question object. This is not meant to be used in PDF reports directly. It provides information to custom data providers.
questionAuditsThis 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:

FieldDescription
auditDateThis is the date of the question audit event.
auditEntityThe is the user name that caused the audit event.
currentValueThis is the value for the question after the audit event has completed.
previousValueThis is the value for the question before the audit event has occurred.
reasonForChangeThis 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.