Right, sorry for the confusion. I am setting $attachmentDao as follows:
#set( $attachmentDao = $documentSource )
Jeff
------------------------------
Jeff Abbott
Leidos
Orlando FL
------------------------------
Original Message:
Sent: 10-10-2022 08:39
From: Alessandro Valli
Subject: Jama variables and tools available to Velocity Reports
Hey Jeff,
are you using a Jama version < 8.42?
DAOs are not available in newer versions.
Here you can use $documentSource.getAttachment($mathTool.toInteger($nAttId))
------------------------------
Alessandro
Systems Engineer
SICK AG
Original Message:
Sent: 10-10-2022 06:48
From: Jeff Abbott
Subject: Jama variables and tools available to Velocity Reports
Thanks for the pointer Alessandro,
I found my first problem which as not setting $doc = $vDoc.document. To my surprise, the custom fields were also retrievable using $velocityReportUtil.getValueForField($doc, "req_list_type", $dateFormat ))
However, my new challenge is not being able to access the attachments (figures) on each item. Neither of these two methods work for me:
#set( $attachmentList = $attachmentDAO.getDocument_DocAttachments($mathTool.toInteger($docI.Id) )
#set($attachmentId= $doc.getAttachment())
Jeff
------------------------------
Jeff Abbott
Leidos
Orlando FL
Original Message:
Sent: 10-08-2022 08:36
From: Alessandro Valli
Subject: Jama variables and tools available to Velocity Reports
#foreach($docitem in $documentList)
do something with $docitem.document
or call a method from $documentSource by using the item id ($docitem.document.id)
#end
------------------------------
Alessandro
Systems Engineer
SICK AG
Original Message:
Sent: 10-07-2022 07:15
From: Jeff Abbott
Subject: Jama variables and tools available to Velocity Reports
I'm trying to generate a report from a set of item types that includes a folder hierarchy.
I have set my report to be context sensitive so that $documentList includes all item types. However I am unable to return any fields at all through either $doc.getCustomFields() or $velocityReportUtil.getValueForField().
I would greatly appreciate a generic example that simply iterates over the fields (picklists, string#, and integers) of an ContourItem and prints those out in an HTML velocity template.