Navigation:  Introduction > Managing Documents >

Sending Documents with Report outputs

Previous pageReturn to chapter overviewNext page

HireTrack NX includes the option of being able to email or print supplementary documents that you would like to link to a report. For example, when printing a delivery note you might also want to print safety instruction or user guides; for Quotes you might want to send customer specific Terms & Conditions. Such documents can be stored against jobs, equipment types,  customers or even people using the Documents tab that is found in various places in HireTrack NX.

 

When a document is stored HireTrack records what "repository" the document belongs to (e.g. a Job or an Equipment Type) and it records the unique identifier value for the repository type, e.g. the Job ID or the Equipment Type ID. Repository types will be one of the following:

rtJobs
rtCRM
rtProjects
rtCompany
rtPeople
rtEquipmentType
rtVenue
rtItem

 

In order to have a report gather a list of "supplementary documents" that might be needed to be emailed or printed with it, you need to write some code on the Calc tab that will call a special HireTrack NX function called "GetStoredDocuments". In the example below we are coding an Equipment List based Quote report to gather any documents associated with the Customer for a job and for any Equipment Types on the list being quoted for.

 

To begin with we want to get all documents linked to equipment types:

Suppdocs1

 

Note how the code is written for the Detail band's BeforePrint event. The GetStoredDocuments function is passed the repository type "rtEquipmentType" and the data field "Hetype.Type".

Suppdocs2

 

Next we want any documents linked to the Customer for the Job. We get this in the Report's BeforePrint event:

Suppdocs3

 

If we now save the report and run it from the Equipment List editor then when the Print or Email buttons in the Preview window are clicked, any documents linked to equipment types on the list or for the customer for the job will be displayed in a prompt form:

Suppdocs4

 

Once the Proceed button is clicked any "Selected" documents (default is checked) will be either printed or linked to HireTrack's Email form, along with the actual report document:

Suppdocs5

 

Once defined you can then use them when assigning Documents:

Suppdocs6

 

 

So, returning back to our Supplementary Documents popup form, we can apply filters to narrow down the documents required thus:

Suppdocs7