Looping in Document Template Report

Posted by ddubois on 18-Dec-2015 08:22

I have created a document template report in WORD. It looks something like this:

I have created a loop of all active students that correctly prints out a WORD document for each student.  Each student has several contacts. (i.e. Father, Mother, Grandmother etc).  I need a nested loop to print these contacts in each student document.  However, rollbase does not support nested loops.  Using the API and EVAL Blocks, one could query the contacts for this student.  Is there an easier way to create this report?  If using the API and EVAL BLocks, how does one display the contact data that results from a Query of the contact object in a WORD Document template?  Query should return an array of contacts.  We can iterate through a loop of these contacts but how do we display the values in a WORD template. 

I hope there might be a better solution to this.

Thanks for your help.

Posted by Pradeep Kagithalagudem on 21-Dec-2015 05:42

Hi,

Nested loops are not working in word templates. But Nested loops works in html,xml,text templates. You could try with html templates

Thanks and Regards

Pradeep

All Replies

Posted by Rajkumar Mateti on 21-Dec-2015 01:38

Hi David,

We are able to reproduce the issue, logged a defect for same. And we will let you know once its fixed.

Thanks,

Rajkumar

Posted by ddubois on 21-Dec-2015 05:39

I don't think that this is a defect.  Rollbase does not support nested loops by design.  

Posted by Pradeep Kagithalagudem on 21-Dec-2015 05:42

Hi,

Nested loops are not working in word templates. But Nested loops works in html,xml,text templates. You could try with html templates

Thanks and Regards

Pradeep

This thread is closed