Dynamically generating rows for pdf

720 views
Skip to first unread message

banerjee...@gmail.com

unread,
Nov 25, 2015, 1:15:41 AM11/25/15
to Fujitsu RunMyProcess Developer Community
Hi Team,

I am trying to generate the numbers of rows in my table dynamically for the pdf, can u give me an idea, how to do this??

Suppose for an example if the array has more than one value, then the next value(of the array) for that column will be in the , next row which will be generated dynamically.

Please suggest...

Regards
Somjit

Pankaj Kumar

unread,
Dec 1, 2015, 3:54:07 AM12/1/15
to Fujitsu RunMyProcess Developer Community
Hi,

Please use/test with the XSL template file provided on the user guide, which could generate the PDF in tabular format.
And based on your requirement, XSL format needs to be customized.

Also please use the "transpose" function to to transpose array before passing the array in pdf activity. By transposing the array widget, you get the arrays of object i.e.

[{"name":"John","age":"35"},{"name":"Jessica","age":"28"},{"name":"James","age":"52"}]

Below is freemarker code to pass the arrays values:-

<#assign transpose_columns = transpose(my_array)>
{
"my_var_main":{

"client_name":${client_name},
"users_array":${transpose_columns},
"date":${date}

}

Thank you,
Pankaj Kumar
Fujitsu RunMyProcess Support

Somjit

--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/30ea2b04-9d12-442b-9022-88069ad97e98%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/d/optout.

freal...@gmail.com

unread,
Dec 2, 2015, 10:35:58 AM12/2/15
to Fujitsu RunMyProcess Developer Community
Hi Team.
Where I put the freemarker code? I have one array, that name is array_tt and I want that this array with 5 lines for example was printed in pdf. Is it possible?

gunjan.ra...@gmail.com

unread,
Dec 23, 2015, 5:36:42 AM12/23/15
to Fujitsu RunMyProcess Developer Community, freal...@gmail.com
Hi Bruno,
You can use the below freemarker code in process input parameters:

<#assign transpose_columns = transpose(array_widget)>
{"my_var_main":{"users_array":${transpose_columns}}}

where array_widget is the Value variable of the array widget you are using in Web Interface and users_array is the variable mentioned in the XSL file you have used to generate pdf via http://docs.runmyprocess.com/Developer_Guide/Process/Design/PDF


Regards
Gunjan

freal...@gmail.com

unread,
Dec 23, 2015, 5:49:32 AM12/23/15
to Fujitsu RunMyProcess Developer Community, freal...@gmail.com, gunjan.ra...@gmail.com
Thank you.
Reply all
Reply to author
Forward
0 new messages